diff --git a/Directory.Packages.props b/Directory.Packages.props
index b258da1d4..d0114c13b 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -9,7 +9,7 @@
2.1.0
12.1.0
- 12.1.0
+ 12.1.3-alpha.0.occ-313
diff --git a/src/Libraries/OrchardCore.Commerce.MoneyDataType/Currency.extra.cs b/src/Libraries/OrchardCore.Commerce.MoneyDataType/Currency.extra.cs
index 0449f4b96..d391caf63 100644
--- a/src/Libraries/OrchardCore.Commerce.MoneyDataType/Currency.extra.cs
+++ b/src/Libraries/OrchardCore.Commerce.MoneyDataType/Currency.extra.cs
@@ -133,6 +133,7 @@ public static ICurrency Euro
public static ICurrency TurkishLira => _defaultProvider.GetCurrency("TRY");
public static ICurrency TrinidadAndTobagoDollar => _defaultProvider.GetCurrency("TTD");
public static ICurrency NewTaiwanDollar => _defaultProvider.GetCurrency("TWD");
+ public static ICurrency UgandanShilling => _defaultProvider.GetCurrency("UGX");
public static ICurrency UkrainianHryvnia => _defaultProvider.GetCurrency("UAH");
public static ICurrency UsDollar => _defaultProvider.GetCurrency("USD");
public static ICurrency UruguayanPeso => _defaultProvider.GetCurrency("UYU");
diff --git a/src/Modules/OrchardCore.Commerce.Payment/Constants/CurrencyCollectionConstants.cs b/src/Modules/OrchardCore.Commerce.Payment/Constants/CurrencyCollectionConstants.cs
index b13691560..de963821d 100644
--- a/src/Modules/OrchardCore.Commerce.Payment/Constants/CurrencyCollectionConstants.cs
+++ b/src/Modules/OrchardCore.Commerce.Payment/Constants/CurrencyCollectionConstants.cs
@@ -3,7 +3,11 @@
namespace OrchardCore.Commerce.Payment.Constants;
public static class CurrencyCollectionConstants
{
- public static readonly IEnumerable SpecialCases = ["HUF", "TWD", "UGX"];
+ public static readonly IEnumerable SpecialCases = ["ISK", "HUF", "TWD", "UGX"];
+
+ // Note that https://docs.stripe.com/currencies#zero-decimal contains UGX on the list as well, however this is a
+ // mistake because https://docs.stripe.com/currencies#special-cases explicitly states that UGX is a special case
+ // (see above) where it's effectively zero-decimal but uses the two-decimal format for backwards compatibility.
public static readonly IEnumerable ZeroDecimalCurrencies =
[
"BIF",
@@ -16,7 +20,6 @@ public static class CurrencyCollectionConstants
"MGA",
"PYG",
"RWF",
- "UGX",
"VND",
"VUV",
"XAF",
diff --git a/test/OrchardCore.Commerce.Tests.UI/Extension/FormUITestContextExtensions.cs b/test/OrchardCore.Commerce.Tests.UI/Extension/FormUITestContextExtensions.cs
index 25c2525d9..39e07432d 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Extension/FormUITestContextExtensions.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Extension/FormUITestContextExtensions.cs
@@ -27,18 +27,20 @@ Task FillAsync(string suffix, string value, bool isDropdown = false)
return context.ClickAndFillInWithRetriesAsync(by, value);
}
- return ReliabilityHelper.DoWithRetriesOrFailAsync(async () =>
- {
- try
- {
- await context.SetDropdownByValueAsync(by, value);
- return true;
- }
- catch (WebDriverException)
+ return ReliabilityHelper.DoWithRetriesOrFailAsync(
+ async () =>
{
- return false;
- }
- });
+ try
+ {
+ await context.SetDropdownByValueAsync(by, value);
+ return true;
+ }
+ catch (WebDriverException)
+ {
+ return false;
+ }
+ },
+ cancellationToken: context.Configuration.TestCancellationToken);
}
await FillAsync(nameof(address.Name), address.Name);
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/BasicTests/BasicOrchardFeaturesTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/BasicTests/BasicOrchardFeaturesTests.cs
index fbe5bf8f8..263308612 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/BasicTests/BasicOrchardFeaturesTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/BasicTests/BasicOrchardFeaturesTests.cs
@@ -3,7 +3,6 @@
using Lombiq.Tests.UI.Services;
using OrchardCore.Commerce.Tests.UI.Helpers;
using Xunit;
-using Xunit.Abstractions;
namespace OrchardCore.Commerce.Tests.UI.Tests.BasicTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/BasicTests/SecurityScanningTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/BasicTests/SecurityScanningTests.cs
index 32aff550e..8b39accb7 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/BasicTests/SecurityScanningTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/BasicTests/SecurityScanningTests.cs
@@ -1,6 +1,5 @@
using Lombiq.Tests.UI.SecurityScanning;
using Xunit;
-using Xunit.Abstractions;
namespace OrchardCore.Commerce.Tests.UI.Tests.BasicTests;
@@ -37,6 +36,9 @@ public Task FullSecurityScanShouldPass() =>
@"https://[^/]+/",
@".*/\?.*pagenum=.*",
@".*/\?.*products\..*");
+
+ // Not relevant for testing OCC.
+ configuration.DontScanErrorPage = true;
},
maxActiveScanDurationInMinutes: 5,
maxRuleDurationInMinutes: 1,
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/CheckoutTests/BehaviorCheckoutTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/CheckoutTests/BehaviorCheckoutTests.cs
index 6d7b66373..a2577a196 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/CheckoutTests/BehaviorCheckoutTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/CheckoutTests/BehaviorCheckoutTests.cs
@@ -8,7 +8,6 @@
using OrchardCore.ContentFields.Fields;
using Shouldly;
using Xunit;
-using Xunit.Abstractions;
using static OrchardCore.Commerce.ContentFields.Constants.FeatureIds;
using static OrchardCore.Commerce.Tests.UI.Constants.ContentItemIds;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/ExactlyTests/BehaviorExactlyTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/ExactlyTests/BehaviorExactlyTests.cs
index 722270b28..df35f196d 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/ExactlyTests/BehaviorExactlyTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/ExactlyTests/BehaviorExactlyTests.cs
@@ -6,7 +6,6 @@
using OrchardCore.Commerce.Payment.Exactly.Drivers;
using Shouldly;
using Xunit;
-using Xunit.Abstractions;
namespace OrchardCore.Commerce.Tests.UI.Tests.ExactlyTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/InventoryTests/InventoryBehaviorTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/InventoryTests/InventoryBehaviorTests.cs
index 347817690..6eaa46fca 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/InventoryTests/InventoryBehaviorTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/InventoryTests/InventoryBehaviorTests.cs
@@ -4,7 +4,6 @@
using OpenQA.Selenium;
using System.Globalization;
using Xunit;
-using Xunit.Abstractions;
using static OrchardCore.Commerce.Tests.UI.Constants.ContentItemIds;
namespace OrchardCore.Commerce.Tests.UI.Tests.PromotionTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/LocalizedProductTests/LocalizedProductBehaviorTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/LocalizedProductTests/LocalizedProductBehaviorTests.cs
index f3cd1909b..4c0c1decf 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/LocalizedProductTests/LocalizedProductBehaviorTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/LocalizedProductTests/LocalizedProductBehaviorTests.cs
@@ -5,7 +5,6 @@
using OrchardCore.Commerce.MoneyDataType;
using Shouldly;
using Xunit;
-using Xunit.Abstractions;
namespace OrchardCore.Commerce.Tests.UI.Tests.LocalizedProductTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/OrderTests/BehaviorOrderTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/OrderTests/BehaviorOrderTests.cs
index 3dc99bb20..b0de3b82d 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/OrderTests/BehaviorOrderTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/OrderTests/BehaviorOrderTests.cs
@@ -6,7 +6,6 @@
using Shouldly;
using System.Globalization;
using Xunit;
-using Xunit.Abstractions;
using static OrchardCore.Commerce.Tests.UI.Constants.ContentItemIds;
namespace OrchardCore.Commerce.Tests.UI.Tests.OrderTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/OrderTests/OrderSuccessTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/OrderTests/OrderSuccessTests.cs
index 6353e0928..fdd72696c 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/OrderTests/OrderSuccessTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/OrderTests/OrderSuccessTests.cs
@@ -7,7 +7,6 @@
using Shouldly;
using System.Globalization;
using Xunit;
-using Xunit.Abstractions;
using static OrchardCore.Commerce.Tests.UI.Constants.ContentItemIds;
namespace OrchardCore.Commerce.Tests.UI.Tests.OrderTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/PersistencePriceVariantsTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/PersistencePriceVariantsTests.cs
index 2015b0597..aa26bdcd1 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/PersistencePriceVariantsTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/PersistencePriceVariantsTests.cs
@@ -6,7 +6,6 @@
using OrchardCore.Commerce.MoneyDataType;
using Shouldly;
using Xunit;
-using Xunit.Abstractions;
namespace OrchardCore.Commerce.Tests.UI.Tests.PriceVariantsPartTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/ValidationPriceVariantsTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/ValidationPriceVariantsTests.cs
index 6a44885a0..389a2a18a 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/ValidationPriceVariantsTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/ValidationPriceVariantsTests.cs
@@ -3,7 +3,6 @@
using Lombiq.Tests.UI.Services;
using OpenQA.Selenium;
using Xunit;
-using Xunit.Abstractions;
namespace OrchardCore.Commerce.Tests.UI.Tests.PriceVariantsPartTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/ProductListTests/BehaviorProductListTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/ProductListTests/BehaviorProductListTests.cs
index 1a98ce73d..9965c5c0e 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/ProductListTests/BehaviorProductListTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/ProductListTests/BehaviorProductListTests.cs
@@ -4,7 +4,6 @@
using OpenQA.Selenium;
using Shouldly;
using Xunit;
-using Xunit.Abstractions;
namespace OrchardCore.Commerce.Tests.UI.Tests.ProductListTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/ProductTests/ProductBehaviorTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/ProductTests/ProductBehaviorTests.cs
index 999e6d0c4..c40c36fad 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/ProductTests/ProductBehaviorTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/ProductTests/ProductBehaviorTests.cs
@@ -5,7 +5,6 @@
using OpenQA.Selenium;
using Shouldly;
using Xunit;
-using Xunit.Abstractions;
using static OrchardCore.Commerce.Tests.UI.Constants.ContentItemIds;
namespace OrchardCore.Commerce.Tests.UI.Tests.ProductTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/ProductTests/RetrievalProductTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/ProductTests/RetrievalProductTests.cs
index f1658157f..cdd80830c 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/ProductTests/RetrievalProductTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/ProductTests/RetrievalProductTests.cs
@@ -4,7 +4,6 @@
using OpenQA.Selenium;
using Shouldly;
using Xunit;
-using Xunit.Abstractions;
using static OrchardCore.Commerce.Tests.UI.Constants.ContentItemIds;
namespace OrchardCore.Commerce.Tests.UI.Tests.ProductTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/PromotionTests/PromotionBehaviorTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/PromotionTests/PromotionBehaviorTests.cs
index d9af64398..31cae523e 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/PromotionTests/PromotionBehaviorTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/PromotionTests/PromotionBehaviorTests.cs
@@ -4,7 +4,6 @@
using OpenQA.Selenium;
using Shouldly;
using Xunit;
-using Xunit.Abstractions;
using static OrchardCore.Commerce.Tests.UI.Constants.ContentItemIds;
namespace OrchardCore.Commerce.Tests.UI.Tests.PromotionTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/RegionTests/PersistenceRegionSettingsTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/RegionTests/PersistenceRegionSettingsTests.cs
index a891880e3..39585201f 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/RegionTests/PersistenceRegionSettingsTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/RegionTests/PersistenceRegionSettingsTests.cs
@@ -4,7 +4,6 @@
using OpenQA.Selenium;
using Shouldly;
using Xunit;
-using Xunit.Abstractions;
using static OrchardCore.Commerce.Abstractions.Constants.ContentTypes;
namespace OrchardCore.Commerce.Tests.UI.Tests.PersistenceRegionSettingsTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/TaxTests/TaxBehaviorTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/TaxTests/TaxBehaviorTests.cs
index 712d3f0a7..0ab6626e9 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/TaxTests/TaxBehaviorTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/TaxTests/TaxBehaviorTests.cs
@@ -6,7 +6,6 @@
using Shouldly;
using System.Globalization;
using Xunit;
-using Xunit.Abstractions;
using static OrchardCore.Commerce.Tests.UI.Constants.ContentItemIds;
namespace OrchardCore.Commerce.Tests.UI.Tests.TaxTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/TieredPricePartTests/PersistenceTieredPriceTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/TieredPricePartTests/PersistenceTieredPriceTests.cs
index a986c5616..a90f4d036 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/TieredPricePartTests/PersistenceTieredPriceTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/TieredPricePartTests/PersistenceTieredPriceTests.cs
@@ -6,7 +6,6 @@
using OrchardCore.Commerce.MoneyDataType;
using Shouldly;
using Xunit;
-using Xunit.Abstractions;
namespace OrchardCore.Commerce.Tests.UI.Tests.TieredPricePartTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/UserTests/UserPersistenceTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/UserTests/UserPersistenceTests.cs
index 59d61ed47..33d95d7ed 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/UserTests/UserPersistenceTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/UserTests/UserPersistenceTests.cs
@@ -7,7 +7,6 @@
using Shouldly;
using System.Text.Json;
using Xunit;
-using Xunit.Abstractions;
namespace OrchardCore.Commerce.Tests.UI.Tests.UserTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/WorkflowTests/WorkflowBehaviorTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/WorkflowTests/WorkflowBehaviorTests.cs
index e9b69bdbf..e9c406ef8 100644
--- a/test/OrchardCore.Commerce.Tests.UI/Tests/WorkflowTests/WorkflowBehaviorTests.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/Tests/WorkflowTests/WorkflowBehaviorTests.cs
@@ -5,7 +5,6 @@
using OrchardCore.Commerce.Tests.UI.Constants;
using Shouldly;
using Xunit;
-using Xunit.Abstractions;
namespace OrchardCore.Commerce.Tests.UI.Tests.WorkflowTests;
diff --git a/test/OrchardCore.Commerce.Tests.UI/UITestBase.cs b/test/OrchardCore.Commerce.Tests.UI/UITestBase.cs
index 707e19272..9ecc901b0 100644
--- a/test/OrchardCore.Commerce.Tests.UI/UITestBase.cs
+++ b/test/OrchardCore.Commerce.Tests.UI/UITestBase.cs
@@ -1,7 +1,7 @@
using Lombiq.Tests.UI;
using Lombiq.Tests.UI.Services;
using OrchardCore.Commerce.Tests.UI.Helpers;
-using Xunit.Abstractions;
+using Xunit;
namespace OrchardCore.Commerce.Tests.UI;
@@ -27,7 +27,7 @@ protected async Task ExecuteTestAfterSetupAsync(
var timeoutValue = timeout ?? TimeSpan.FromMinutes(10);
var testTask = ExecuteTestAsync(testAsync, browser, SetupHelpers.RunSetupAsync, changeConfigurationAsync);
- var timeoutTask = Task.Delay(timeoutValue);
+ var timeoutTask = Task.Delay(timeoutValue, CancellationToken.None);
await Task.WhenAny(testTask, timeoutTask);