Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCC-245: Upgrade to latest OC preview to test System.Text.Json #454

Merged
merged 128 commits into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
6175523
Fix "MD001: heading-increment" and "MD009: no-trailing-spaces".
sarahelsaig May 16, 2024
e019969
Update package versions and use single variable for OC versions.
sarahelsaig May 22, 2024
cd19878
Merge remote-tracking branch 'origin/issue/OFFI-33' into issue/OCC-252
sarahelsaig May 22, 2024
7eebeb6
Fix using.
sarahelsaig May 22, 2024
32b6d2e
Fix xUnit1045 warning.
sarahelsaig May 22, 2024
153a95c
Remove obsolete custom htmlvalidate config file.
sarahelsaig May 23, 2024
b1681db
Add orchardcore-preview to the nuget config.
sarahelsaig May 23, 2024
367ba07
Update references.
sarahelsaig May 23, 2024
86122d1
Remove Newtonsoft from cshtml files.
sarahelsaig May 23, 2024
922dd73
Migrate ProductAttributeValueConverter to STJ.
sarahelsaig May 23, 2024
abd80f1
Fix various OC 2.0 changes (excl. PopulateSettings related stuff).
sarahelsaig May 23, 2024
6545756
Use CopySettingsTo.
sarahelsaig May 23, 2024
7884080
Update to the latest OC preview version.
sarahelsaig May 30, 2024
2d5539f
Merge remote-tracking branch 'origin/main' into issue/OCC-245
sarahelsaig May 30, 2024
e829bab
Remove no longer needed compatibility suppression files.
sarahelsaig May 30, 2024
26b710c
Update Nuget.config.
sarahelsaig May 30, 2024
0887f75
Fix remaining build errors in NEST.
sarahelsaig Jun 3, 2024
0f396fd
Move Payment into abstractions because we can't do arbitrary polymorp…
sarahelsaig Jun 3, 2024
e388924
Remove Legacy*Converter.cs files.
sarahelsaig Jun 4, 2024
8409ebf
Fix errors.
sarahelsaig Jun 4, 2024
9c3d50f
Get rid of remaining `using Newtonsoft.Json`.
sarahelsaig Jun 4, 2024
4210f13
Replace obsolete method call.
sarahelsaig Jun 4, 2024
934808d
Update OC package version in OCC.
sarahelsaig Jun 13, 2024
1c2e2fa
Fix incorrect WhenWritingNull usage.
sarahelsaig Jun 16, 2024
9560f29
update OC version
sarahelsaig Jun 17, 2024
d0d60b1
Update OC version.
sarahelsaig Jun 19, 2024
5144dac
LocalizedHtmlStringConverter is not needed.
sarahelsaig Jun 19, 2024
7795943
Update OC preview version.
sarahelsaig Jun 20, 2024
775d66f
Fix price serialization.
sarahelsaig Jun 20, 2024
cf45fa5
Move NullCurrencySelector to the last injection order.
sarahelsaig Jun 20, 2024
64a526d
Fix strange behavior for ICurrencySelector.
sarahelsaig Jun 20, 2024
2cb9653
Update OC preview version
sarahelsaig Jun 21, 2024
4054dfa
Update package versions and Nuget.config.
sarahelsaig Jun 24, 2024
8558dd1
Merge remote-tracking branch 'origin/issue/OCC-245' into issue/OCC-245
sarahelsaig Jun 24, 2024
a4b4c5c
Autofix all usings.
sarahelsaig Jun 24, 2024
cd5ef56
Fix static various code analysis warnings.
sarahelsaig Jun 24, 2024
86f64f9
Fix versions in OrchardCore.Commerce.Web.csproj.
sarahelsaig Jun 24, 2024
409bc73
Remove lingering Newtonsoft references.
sarahelsaig Jun 24, 2024
01c259c
Update site setting selector.
sarahelsaig Jun 24, 2024
a3f044f
Prevent LocalizedHtmlString deserialization.
sarahelsaig Jun 24, 2024
dfa6bea
Temporarily increase timeout-minutes.
sarahelsaig Jun 24, 2024
ded7562
Merge branch 'task/system-text-json-migration' into issue/OCC-245
sarahelsaig Jun 24, 2024
6f369a0
Update OC preview version.
sarahelsaig Jun 28, 2024
6ccc73f
Merge branch 'issue/OCC-245' of github.com:OrchardCMS/OrchardCore.Com…
sarahelsaig Jun 28, 2024
e250237
Bug fix settings retrieval.
sarahelsaig Jun 28, 2024
230064b
dummy
sarahelsaig Jun 28, 2024
bf6f668
Update OC preview version.
sarahelsaig Jul 1, 2024
380814e
Update error handling to the new message.
sarahelsaig Jul 1, 2024
d014273
Use Trumbowyg.
sarahelsaig Jul 1, 2024
4c6b75e
Unusing.
sarahelsaig Jul 1, 2024
1aab941
Fix html string deserialization.
sarahelsaig Jul 1, 2024
ace70c7
Fix string price deserialization.
sarahelsaig Jul 1, 2024
cf0448e
Fix error CA1725.
sarahelsaig Jul 1, 2024
64c9d74
Fix formatting.
sarahelsaig Jul 1, 2024
c94656c
Bug fix TextProductAttributeDeserializer deserialization.
sarahelsaig Jul 1, 2024
daa36d4
Make sure ContentLocalizationStartup's Order is higher than OrchardCo…
sarahelsaig Jul 2, 2024
5d6c579
Add test-verbosity for ubuntu.
sarahelsaig Jul 2, 2024
ae1d000
Update to latest OC preview version.
sarahelsaig Jul 2, 2024
ecaae29
Try dotnet-test-process-timeout.
sarahelsaig Jul 9, 2024
f1ad548
Merge remote-tracking branch 'origin/issue/OCC-245' into issue/OCC-245
sarahelsaig Jul 9, 2024
5b83a89
Remove dotnet-test-process-timeout to confirm that it really did just…
sarahelsaig Jul 9, 2024
e0c7de4
Yep, dotnet-test-process-timeout is needed.
sarahelsaig Jul 10, 2024
01d7e42
Test if really only FullSecurityScanShouldPass fails.
sarahelsaig Jul 11, 2024
c8a988c
Merge branch 'task/system-text-json-migration' into issue/OCC-245
sarahelsaig Jul 11, 2024
6c4e953
Update OC preview version.
sarahelsaig Jul 12, 2024
986e670
Add decimal add/subtract operators to Amount.
sarahelsaig Jul 13, 2024
b019ea2
Clean up AmountConverterFilter.
sarahelsaig Jul 13, 2024
1e94ef8
Rename order_line_item_view_models_and_tax_rates to order_part_to_ord…
sarahelsaig Jul 13, 2024
c407dde
Add amount_to_string filter.
sarahelsaig Jul 13, 2024
c255f51
Update HL and UITT versions.
sarahelsaig Jul 13, 2024
d17faf8
Merge branch 'issue/OCC-245' of github.com:OrchardCMS/OrchardCore.Com…
sarahelsaig Jul 13, 2024
8a44ac4
Fix analyzer warnings.
sarahelsaig Jul 14, 2024
542cf64
Update src/Libraries/OrchardCore.Commerce.MoneyDataType/Serialization…
sarahelsaig Jul 14, 2024
1b7143d
Update src/Libraries/OrchardCore.Commerce.MoneyDataType/Serialization…
sarahelsaig Jul 14, 2024
b9bd11b
Apply suggestions from code review
sarahelsaig Jul 14, 2024
858b037
Fix errors after applying review suggestions.
sarahelsaig Jul 14, 2024
19cafa1
Add JConvert to the dictionary.
sarahelsaig Jul 14, 2024
6fb7f99
Always update the model even if validation failed
sarahelsaig Jul 14, 2024
bee9997
Shortcut GetOutput if it's already in the expected type.
sarahelsaig Jul 14, 2024
5b10bc5
Use constant for configure order.
sarahelsaig Jul 14, 2024
455a80a
Use GetSettingsAsync extension method.
sarahelsaig Jul 14, 2024
4320fff
See if we can force timeout using Task.WhenAny
sarahelsaig Jul 15, 2024
9ff0a75
Format line.
sarahelsaig Jul 15, 2024
78bfa00
Format line.
sarahelsaig Jul 15, 2024
b54e42a
Use fact timeout instead.
sarahelsaig Jul 15, 2024
28ab541
Try with 5 minutes for now.
sarahelsaig Jul 15, 2024
2ddaaeb
Fact timeout doesn't work, stick with dotnet-test-process-timeout.
sarahelsaig Jul 15, 2024
8c738dc
Revert `@JConvert.SerializeObject` back to `@Json.Serialize`.
sarahelsaig Jul 15, 2024
6ccffc6
Use `await app.RunAsync();`
sarahelsaig Jul 15, 2024
86fae3d
Use `await app.RunAsync();`
sarahelsaig Jul 15, 2024
c7c241a
Refactor to get rid of "This method is intentionally not awaited sinc…
sarahelsaig Jul 15, 2024
db096da
Check if it's already done.
sarahelsaig Jul 15, 2024
2e386c6
Add missing maxCount parameter.
sarahelsaig Jul 15, 2024
37cd4fb
Remove locks.
sarahelsaig Jul 15, 2024
cce49d5
Try preloading the shape cache.
sarahelsaig Jul 16, 2024
9208980
Revert previous experimental changes.
sarahelsaig Jul 16, 2024
8f342e6
Update HL version.
sarahelsaig Jul 16, 2024
694697d
Use PrepareShapeTable.
sarahelsaig Jul 16, 2024
42cbdec
Update UITT version to use the new shape table prepare controller.
sarahelsaig Jul 16, 2024
70dd9dd
Update UITT version again.
sarahelsaig Jul 16, 2024
0a57bfa
We don't need build-create-binary-log here any more.
sarahelsaig Jul 17, 2024
fce1111
Update OC preview version.
sarahelsaig Jul 24, 2024
764b8d4
Remove workaround that shouldn't be necessary any more.
sarahelsaig Jul 24, 2024
a51f09b
Fix error IDE0010: Populate switch.
sarahelsaig Jul 24, 2024
57c74b6
Better OC Layers docs link
Piedone Jul 24, 2024
526217d
Update NuGet.config
sarahelsaig Jul 24, 2024
f775cc4
Update src/Modules/OrchardCore.Commerce/Startup.cs
sarahelsaig Jul 24, 2024
9d93e7e
Fix nuget config.
sarahelsaig Jul 24, 2024
12e2685
Re-add dotnet-test-process-timeout.
sarahelsaig Jul 24, 2024
d3cb472
Fix solution item path in unix.
sarahelsaig Jul 24, 2024
c085400
Rename Behaviour to Behavior
sarahelsaig Jul 24, 2024
7b2431e
Remove incorrect comment.
sarahelsaig Jul 24, 2024
2483e96
Add 3.0.0 change notes.
sarahelsaig Jul 25, 2024
92f2609
Get rid of the last shreds of IPayment.
sarahelsaig Jul 25, 2024
2ea9013
Reduce security scan max duration.
sarahelsaig Jul 25, 2024
c62ebb8
Hopefully dotnet-test-process-timeout can be dropped now.
sarahelsaig Jul 25, 2024
d146996
Make active scan single threaded to prevent deadlocks.
sarahelsaig Jul 26, 2024
9afdb73
Converters don't need to be internal.
sarahelsaig Jul 26, 2024
d50e7e2
Revert threadPerHost, it's not effective.
sarahelsaig Jul 26, 2024
b5b8e76
Fix error CA1725
sarahelsaig Jul 26, 2024
e713c5f
Add docs on the Liquid filter changes.
sarahelsaig Jul 26, 2024
b43204e
Typos/grammar
Piedone Jul 26, 2024
55bf922
Apply suggestions from code review
sarahelsaig Jul 26, 2024
409c039
Fix warnings.
sarahelsaig Jul 26, 2024
2babc78
Clean up configuration order usage.
sarahelsaig Jul 26, 2024
5a21eaf
Update HL and UITT preview versions.
sarahelsaig Jul 26, 2024
9e397dd
Update HL and UITT preview versions.
sarahelsaig Jul 27, 2024
f06dd9f
Merge branch 'task/system-text-json-migration' into issue/OCC-245
sarahelsaig Jul 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<packageSources>
<!-- Ignore global configuration -->
<clear />
<!-- Here so the Visual Studio package manager won't default to the next feed below. -->
<add key="Lombiq" value="https://nuget.cloudsmith.io/lombiq/open-source-orchard-core-extensions/v3/index.json" />
<add key="LombiqPreview" value="https://nuget.cloudsmith.io/lombiq/open-source-orchard-core-extensions/v3/index.json" />
<add key="OrchardCorePreview" value="https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
Expand All @@ -24,7 +23,7 @@
<package pattern="TheTheme" />
<package pattern="TheAdmin" />
</packageSource>
<packageSource key="Lombiq">
<packageSource key="LombiqPreview">
<package pattern="Lombiq.HelpfulLibraries*" />
<package pattern="Lombiq.Tests.UI*" />
</packageSource>
Expand Down
8 changes: 7 additions & 1 deletion OrchardCore.Commerce.sln
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Directory.Build.props = Directory.Build.props
License.md = License.md
mkdocs.yml = mkdocs.yml
Nuget.config = Nuget.config
Readme.md = Readme.md
Reset-Local.ps1 = Reset-Local.ps1
Directory.Packages.props = Directory.Packages.props
NuGet.config = NuGet.config
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B2D057AA-E3F7-404D-A713-C3C59F9DE562}"
Expand Down Expand Up @@ -118,6 +118,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "guides", "guides", "{EF8008
docs\guides\create-webshop.md = docs\guides\create-webshop.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "releases", "releases", "{0A8AB166-9C4F-4161-BD69-362DBC73A11E}"
ProjectSection(SolutionItems) = preProject
docs\releases\3.0.0.md = docs\releases\3.0.0.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -214,6 +219,7 @@ Global
{28DB6CBB-1527-42A1-8EFE-3D95BF185884} = {90913510-3D7F-4BCC-B55E-56343128F049}
{73925C09-BF96-4727-91D8-57A88AD1601F} = {E6C02BDF-EEB0-4ABD-ADEC-9932F60923AE}
{EF8008F1-64F5-4053-A639-6285084AFA52} = {BEBA1764-178A-4722-A193-4DEF26DCE8D1}
{0A8AB166-9C4F-4161-BD69-362DBC73A11E} = {BEBA1764-178A-4722-A193-4DEF26DCE8D1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {456CBC78-579D-483F-A4C3-AF5C12AB3324}
Expand Down
30 changes: 30 additions & 0 deletions docs/releases/3.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Orchard Core Commerce 3.0.0

Release date: Not yet released

## Important Upgrade Instructions

Prior to making the leap to Orchard Core Commerce 3.0.0, please read and follow the instructions for the [Orchard Core 2.0.0 release](https://docs.orchardcore.net/en/latest/releases/2.0.0/), as it contains several major breaking changes.

## Breaking Changes

### Dropped `Newtonsoft.Json` Support

The most important breaking change in OC 2.0 is the end of support for [Newtonsoft Json.NET](https://www.newtonsoft.com/json) and the switch to the [System.Text.Json](https://www.nuget.org/packages/System.Text.Json) (STJ) library. For OCC, all Newtonsoft converters are removed, STJ converters were written or updated as necessary. Any models and interfaces that uses `JToken` or `JObject` (such as `OrderPart.AdditionalData` and `IUserService.AlterUserSettingAsync()`) now use `JsonNode` and `JsonObject` respectively.

### Replaced `IPayment` with `Payment` Everywhere

We've dropped the [`IPayment`](https://github.com/OrchardCMS/OrchardCore.Commerce/blob/34ae00470e954459f19f688c9bfc51d196c386ca/src/Libraries/OrchardCore.Commerce.Abstractions/Abstractions/IPayment.cs) interface, now services and models use `Payment` directly, which was also moved into the `OrchardCore.Commerce.Abstractions` library. Migrating to STJ meant that to retain the polymorphic deserialization support for models using `IPayment` would've taken on some additional complexity, while we already found the separate interface unnecessary.

Update using references to `OrchardCore.Commerce.Abstractions.Models`. If you have a custom payment processor integration, update it to use `Payment`.

### Liquid Filters

The `order_line_item_view_models_and_tax_rates` Liquid filter has been removed. A new `order_part_to_order_summary` filter has been added instead, which can be treated as a drop-in replacement. In has additional `Amount` type properties `UnitTax`, `SubTotal`, `TaxTotal` and `Total`. These contain the calculated and appropriately rounded values.

The new `amount_to_string` filter processes the input object as `Amount` (like the `amount` filter) and correctly formats it just like the `Amount.ToString()` override in C#. You can use `amount_to_string: dot: ","` to make it display comma as the decimal separator when it would use dot. Unlike `amount`, you can also use this filter on a number with the `currency: "three-letter-code""` argument (e.g. `{{ value | amount_to_string: currency: "EUR" }}`). This will display any numeric value as the given currency.
Piedone marked this conversation as resolved.
Show resolved Hide resolved

## Change Logs

Please check the GitHub release entry [here](https://github.com/OrchardCMS/OrchardCore.Commerce/releases/tag/v3.0.0).

4 changes: 3 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,6 @@ nav:
- NumericProductAttributeField: features/numeric-product-attribute-field.md
- Resources:
- Libraries: resources/libraries/README.md
- Releases: https://github.com/OrchardCMS/OrchardCore.Commerce/releases
- Releases and Notes:
- GitHub: https://github.com/OrchardCMS/OrchardCore.Commerce/releases
- 3.0.0: docs/releases/3.0.0.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ public class OrderPart : ContentPart
public IList<OrderAdditionalCost> AdditionalCosts { get; } = new List<OrderAdditionalCost>();

/// <summary>
/// Gets the amounts charged for this order. Typically a single credit card charge.
/// Gets the amounts charged for this order. Typically, a single credit card charge.
/// </summary>
// Due to the significant intentional limitations of polymorphic deserialization in System.Text.Json this type now
// only supports Payment instead of any arbitrary IPayment implementation.
public IList<Payment> Charges { get; } = new List<Payment>();

public TextField Email { get; set; } = new();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using OrchardCore.Commerce.Abstractions.Abstractions;
using OrchardCore.Commerce.MoneyDataType;
using System;

Expand All @@ -9,5 +8,4 @@ public record Payment(
string TransactionId,
string ChargeText,
Amount Amount,
DateTime CreatedUtc)
: IPayment;
DateTime CreatedUtc);
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace OrchardCore.Commerce.Abstractions.Serialization;

internal sealed class PrioritizedPriceConverter : JsonConverter<PrioritizedPrice>
public sealed class PrioritizedPriceConverter : JsonConverter<PrioritizedPrice>
{
public const string PriorityName = "priority";
public const string AmountName = "amount";
Expand Down Expand Up @@ -48,12 +48,12 @@ public override PrioritizedPrice Read(ref Utf8JsonReader reader, Type typeToConv
return null;
}

public override void Write(Utf8JsonWriter writer, PrioritizedPrice prioritizedPrice, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, PrioritizedPrice value, JsonSerializerOptions options)
{
writer.WriteStartObject();
writer.WriteNumber(PriorityName, prioritizedPrice.Priority);
writer.WriteNumber(PriorityName, value.Priority);
writer.WritePropertyName(AmountName);
JsonSerializer.Serialize(writer, prioritizedPrice.Price, options);
JsonSerializer.Serialize(writer, value.Price, options);
writer.WriteEndObject();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace OrchardCore.Commerce.Abstractions.Serialization;

internal sealed class ProductAttributeValueConverter : JsonConverter<IProductAttributeValue>
public sealed class ProductAttributeValueConverter : JsonConverter<IProductAttributeValue>
{
private const string TypePropertyName = "type";
private const string ValuePropertyName = "value";
Expand All @@ -31,19 +31,19 @@ public override IProductAttributeValue Read(ref Utf8JsonReader reader, Type type
return deserializer.Deserialize(attributeName, attribute);
}

public override void Write(Utf8JsonWriter writer, IProductAttributeValue productAttributeValue, JsonSerializerOptions options)
public override void Write(Utf8JsonWriter writer, IProductAttributeValue value, JsonSerializerOptions options)
{
if (productAttributeValue is null) return;
if (value is null) return;

writer.WriteStartObject();

writer.WriteString(TypePropertyName, productAttributeValue.GetType().Name);
writer.WriteString(AttributeNamePropertyName, productAttributeValue.AttributeName);
writer.WriteString(TypePropertyName, value.GetType().Name);
writer.WriteString(AttributeNamePropertyName, value.AttributeName);

writer.WritePropertyName(ValuePropertyName);
var valueNode = productAttributeValue.UntypedValue is IEnumerable<object> values
var valueNode = value.UntypedValue is IEnumerable<object> values
? JArray.FromObject(values, options)
: JNode.FromObject(productAttributeValue.UntypedValue, options);
: JNode.FromObject(value.UntypedValue, options);
valueNode?.WriteTo(writer, options);

writer.WriteEndObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace OrchardCore.Commerce.Abstractions.Serialization;

internal sealed class ShoppingCartItemConverter : JsonConverter<ShoppingCartItem>
public sealed class ShoppingCartItemConverter : JsonConverter<ShoppingCartItem>
{
public const string QuantityName = "quantity";
public const string SkuName = "sku";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace OrchardCore.Commerce.MoneyDataType.Serialization;

internal sealed class CurrencyConverter : JsonConverter<ICurrency>
public sealed class CurrencyConverter : JsonConverter<ICurrency>
{
public override ICurrency Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) =>
Currency.FromIsoCode(reader.GetString());
Expand Down
3 changes: 1 addition & 2 deletions src/Modules/OrchardCore.Commerce/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ public override void ConfigureServices(IServiceCollection services)
option.MemberAccessStrategy.Register<AddressFieldEditorViewModel>();
option.MemberAccessStrategy.Register<OrderPart>();
option.MemberAccessStrategy.Register<AddressField>();
option.MemberAccessStrategy.Register<IPayment>();
option.MemberAccessStrategy.Register<Abstractions.Models.Payment>();
option.MemberAccessStrategy.Register<Amount, string>((obj, _) => obj.ToString());
option.MemberAccessStrategy.Register<Amount, decimal>((obj, _) => obj.Value);
Expand Down Expand Up @@ -216,7 +215,7 @@ public override void ConfigureServices(IServiceCollection services)
}
}

public class FallBackPriceStartup : StartupBase
public class FallbackPriceStartup : StartupBase
sarahelsaig marked this conversation as resolved.
Show resolved Hide resolved
{
public override int Order => int.MaxValue;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ public Task FullSecurityScanShouldPass() =>
@"https://[^/]+/",
@".*/\?.*pagenum=.*",
@".*/\?.*products\..*");
}),
},
maxActiveScanDurationInMinutes: 5,
maxRuleDurationInMinutes: 1),
changeConfiguration: configuration => configuration.AssertAppLogsAsync = async webApplicationInstance =>
{
var logsWithoutUnwantedExceptionMessages = (await webApplicationInstance.GetLogOutputAsync())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

namespace OrchardCore.Commerce.Tests.UI.Tests.PromotionTests;

public class InventoryBehaviourTests : UITestBase
public class InventoryBehaviorTests : UITestBase
{
public InventoryBehaviourTests(ITestOutputHelper testOutputHelper)
public InventoryBehaviorTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

namespace OrchardCore.Commerce.Tests.UI.Tests.LocalizedProductTests;

public class LocalizedProductBehaviourTests : UITestBase
public class LocalizedProductBehaviorTests : UITestBase
{
private const string LocalizedTitle = "Honosított Termék"; // #spell-check-ignore-line

private static readonly By _localizationsButtonPath = By.XPath(
"//li[contains(@class, 'list-group-item') and .//a[contains(., 'Test Localized Product')]]//div[@title = 'Localizations']//button");
private static readonly string _localizedCurrency = Currency.HungarianForint.CurrencyIsoCode;

public LocalizedProductBehaviourTests(ITestOutputHelper testOutputHelper)
public LocalizedProductBehaviorTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

namespace OrchardCore.Commerce.Tests.UI.Tests.ProductTests;

public class ProductBehaviourTests : UITestBase
public class ProductBehaviorTests : UITestBase
{
public ProductBehaviourTests(ITestOutputHelper testOutputHelper)
public ProductBehaviorTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

namespace OrchardCore.Commerce.Tests.UI.Tests.PromotionTests;

public class PromotionBehaviourTests : UITestBase
public class PromotionBehaviorTests : UITestBase
{
public const string PriceFieldCssSelector = ".price-part-price-field-value";

public PromotionBehaviourTests(ITestOutputHelper testOutputHelper)
public PromotionBehaviorTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

namespace OrchardCore.Commerce.Tests.UI.Tests.TaxTests;

public class TaxBehaviourTests : UITestBase
public class TaxBehaviorTests : UITestBase
{
public const string NetPriceId = "PricePart_PriceField_Value";
public const string GrossPriceId = "TaxPart_GrossPrice_Value";
public const string TaxRateId = "TaxPart_TaxRate_Value";

public TaxBehaviourTests(ITestOutputHelper testOutputHelper)
public TaxBehaviorTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

namespace OrchardCore.Commerce.Tests.UI.Tests.WorkflowTests;

public class WorkflowBehaviourTests : UITestBase
public class WorkflowBehaviorTests : UITestBase
{
public WorkflowBehaviourTests(ITestOutputHelper testOutputHelper)
public WorkflowBehaviorTests(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}
Expand Down
Loading