diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000..c3d1e8343 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,2 @@ +[codespell] +ignore-words-list += , ND, ZAR diff --git a/.github/actions/spelling/allow/occ.txt b/.github/actions/spelling/allow/occ.txt deleted file mode 100644 index a13600e92..000000000 --- a/.github/actions/spelling/allow/occ.txt +++ /dev/null @@ -1,43 +0,0 @@ -addressfield -barbool -bartext -baz -Bitcoin -blogs -BTC -CLA -contentpart -CVC -datetimefield -deserializers -disqus -emoji -EUR -foobool -footext -GST -htmlfield -JConvert -LCID -markdownlint -Mastercard -mkdocs -numericfield -Nunavut -Nwazet -osoe -pagenum -paymentrequest -pricefield -roadmap -shoppingcart -skus -sso -testfreeproduct -testdiscountedproduct -testproduct -testproductvariant -unpublish -vnd -webhooks -webshop diff --git a/.github/actions/spelling/allow/people.txt b/.github/actions/spelling/allow/people.txt deleted file mode 100644 index b9a9586c3..000000000 --- a/.github/actions/spelling/allow/people.txt +++ /dev/null @@ -1,13 +0,0 @@ -czky -Griffard -Grigorik -Icaza -jhgbrt -Leh -Pettersson -Ponomarenko -rkus -Saig -Savard -Szabolcs -Zolt diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt deleted file mode 100644 index 36bcb1088..000000000 --- a/.github/actions/spelling/excludes.txt +++ /dev/null @@ -1,12 +0,0 @@ -\.all-contributorsrc$ -Contributors.md$ -docs/releases -docs/requirements\.txt$ -mkdocs\.yml$ -Directory.Packages.props$ -src/Libraries/OrchardCore\.Commerce\.MoneyDataType/Currency\.extra\.cs$ -src/Modules/OrchardCore\.Commerce\.Payment/Constants/CurrencyCollectionConstants\.cs$ -src/Modules/OrchardCore\.Commerce\.Payment\.Stripe/Extensions/PaymentExtensions\.cs$ -test/OrchardCore\.Commerce\.Tests/Fakes/AnkhMorporkCurrencyProvider\.cs$ -test/OrchardCore\.Commerce\.Tests/ProductAttributeTests\.cs$ -CompatibilitySuppressions\.xml$ diff --git a/.github/actions/spelling/patterns.txt b/.github/actions/spelling/patterns.txt deleted file mode 100644 index e64ffe0e2..000000000 --- a/.github/actions/spelling/patterns.txt +++ /dev/null @@ -1,2 +0,0 @@ -# Stripe API key patterns. -((pk_test)|(sk_test)|(whsec))_\w* diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 80cd8b0ad..b51bbc60b 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -25,19 +25,12 @@ jobs: # supported by GHA. test-filter: "FullyQualifiedName!~SecurityScanningTests" - spelling: - name: Spelling - uses: Lombiq/GitHub-Actions/.github/workflows/spelling.yml@dev - with: - additional-dictionaries: | - cspell:csharp/csharp.txt - cspell:html/dict/html.txt - lombiq-lgha:dictionaries/Liquid.txt - lombiq-lgha:dictionaries/Lombiq.people.txt - lombiq-lgha:dictionaries/Security.txt + codespell: + name: Codespell + uses: Lombiq/GitHub-Actions/.github/workflows/codespell.yml@dev post-pull-request-checks-automation: - needs: [build-and-test-linux, build-and-test-windows, spelling] + needs: [build-and-test-linux, build-and-test-windows, codespell] if: github.event.pull_request != '' uses: Lombiq/GitHub-Actions/.github/workflows/post-pull-request-checks-automation.yml@dev secrets: diff --git a/OrchardCore.Commerce.sln b/OrchardCore.Commerce.sln index 82a6f2921..48b8c96f5 100644 --- a/OrchardCore.Commerce.sln +++ b/OrchardCore.Commerce.sln @@ -5,16 +5,17 @@ VisualStudioVersion = 17.2.32630.192 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D15D472D-A6EF-441F-8278-6350D89E90D2}" ProjectSection(SolutionItems) = preProject + .codespellrc = .codespellrc .gitattributes = .gitattributes .gitignore = .gitignore .github\workflows\build-and-test.yml = .github\workflows\build-and-test.yml Directory.Build.props = Directory.Build.props + Directory.Packages.props = Directory.Packages.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}" @@ -42,10 +43,10 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{A4CAB4D8-DD0C-4689-868E-DF45106E2DD1}" ProjectSection(SolutionItems) = preProject .github\workflows\build-and-test.yml = .github\workflows\build-and-test.yml + .github\workflows\publish-cloudsmith-tag.yml = .github\workflows\publish-cloudsmith-tag.yml .github\workflows\publish-cloudsmith.yml = .github\workflows\publish-cloudsmith.yml .github\workflows\publish-nuget.yml = .github\workflows\publish-nuget.yml .github\workflows\validate-pull-request.yml = .github\workflows\validate-pull-request.yml - .github\workflows\publish-cloudsmith-tag.yml = .github\workflows\publish-cloudsmith-tag.yml EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Commerce.ContentFields", "src\Modules\OrchardCore.Commerce.ContentFields\OrchardCore.Commerce.ContentFields.csproj", "{8027FB33-B110-48A2-9B71-89F1EA96EB67}" @@ -65,9 +66,11 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "features", "features", "{9B2DB1CD-2B4A-4823-9762-CF4E90661404}" ProjectSection(SolutionItems) = preProject docs\features\boolean-product-attribute-field.md = docs\features\boolean-product-attribute-field.md + docs\features\exactly-payment.md = docs\features\exactly-payment.md docs\features\inventory-part.md = docs\features\inventory-part.md docs\features\inventory.md = docs\features\inventory.md docs\features\numeric-product-attribute-field.md = docs\features\numeric-product-attribute-field.md + docs\features\payment-providers.md = docs\features\payment-providers.md docs\features\price-part.md = docs\features\price-part.md docs\features\price-variants-part.md = docs\features\price-variants-part.md docs\features\product-part.md = docs\features\product-part.md @@ -79,22 +82,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "features", "features", "{9B docs\features\tiered-price-part.md = docs\features\tiered-price-part.md docs\features\user-features.md = docs\features\user-features.md docs\features\workflows.md = docs\features\workflows.md - docs\features\payment-providers.md = docs\features\payment-providers.md - docs\features\exactly-payment.md = docs\features\exactly-payment.md - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "actions", "actions", "{83C01924-6F58-4777-A9EC-07943F7A2E31}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "spelling", "spelling", "{E32B62B8-D737-4713-87C5-8220C9746643}" - ProjectSection(SolutionItems) = preProject - .github\actions\spelling\excludes.txt = .github\actions\spelling\excludes.txt - .github\actions\spelling\patterns.txt = .github\actions\spelling\patterns.txt - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "allow", "allow", "{7FB7940D-EEF4-4355-BCBF-C160080F257A}" - ProjectSection(SolutionItems) = preProject - .github\actions\spelling\allow\occ.txt = .github\actions\spelling\allow\occ.txt - .github\actions\spelling\allow\people.txt = .github\actions\spelling\allow\people.txt EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Commerce.Tests.UI.Shortcuts", "test\OrchardCore.Commerce.Tests.UI.Shortcuts\OrchardCore.Commerce.Tests.UI.Shortcuts.csproj", "{3DB5D0DD-1509-40B8-AD1A-47D5672BF484}" @@ -209,9 +196,6 @@ Global {87C422CA-C6F2-408F-987B-C8418995A331} = {E6C02BDF-EEB0-4ABD-ADEC-9932F60923AE} {93871E12-0083-4323-BB7B-3CDA6E332D87} = {E6C02BDF-EEB0-4ABD-ADEC-9932F60923AE} {9B2DB1CD-2B4A-4823-9762-CF4E90661404} = {BEBA1764-178A-4722-A193-4DEF26DCE8D1} - {83C01924-6F58-4777-A9EC-07943F7A2E31} = {4561F321-6E57-484B-950C-AC46798B1F40} - {E32B62B8-D737-4713-87C5-8220C9746643} = {83C01924-6F58-4777-A9EC-07943F7A2E31} - {7FB7940D-EEF4-4355-BCBF-C160080F257A} = {E32B62B8-D737-4713-87C5-8220C9746643} {3DB5D0DD-1509-40B8-AD1A-47D5672BF484} = {772AFE42-DF1F-49B1-9F64-7C901E588C00} {62DF9FF9-D2B3-4333-948D-2E405699B47B} = {BEBA1764-178A-4722-A193-4DEF26DCE8D1} {C788AFFF-F440-4259-9102-5B4C1B91FAFA} = {62DF9FF9-D2B3-4333-948D-2E405699B47B} diff --git a/Readme.md b/Readme.md index 4dcee5c97..54f846c0d 100644 --- a/Readme.md +++ b/Readme.md @@ -1,6 +1,6 @@ # Orchard Core Commerce -[![Discord](https://img.shields.io/discord/551136772243980291?color=%237289DA&label=Discord&logo=discord&logoColor=white&style=flat)](https://discord.gg/rYHxgqU5) [![Read the Docs](https://img.shields.io/readthedocs/orchardcorecommerce?label=Documentation)](https://commerce.orchardcore.net/) [![Latest version of 'OrchardCore.Commerce' on NuGet](https://img.shields.io/nuget/v/OrchardCore.Commerce?style=flat&label=NuGet)](https://www.nuget.org/packages/OrchardCore.Commerce/) [![Latest version of 'OrchardCore.Commerce' on Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/orchardcore/commerce/nuget/OrchardCore.Commerce/latest/xsp=True/?render=true&show_latest=true&style=flat&labelColor=grey&label=Cloudsmith)](https://cloudsmith.io/~orchardcore/repos/commerce/packages/detail/nuget/OrchardCore.Commerce/latest/xsp=True/) +[![Discord](https://img.shields.io/discord/551136772243980291?color=%237289DA&label=Discord&logo=discord&logoColor=white&style=flat)](https://discord.gg/rYHxgqU5) [![Read the Docs](https://img.shields.io/readthedocs/orchardcorecommerce?label=Documentation)](https://commerce.orchardcore.net/) [![Latest version of 'OrchardCore.Commerce' on NuGet](https://img.shields.io/nuget/v/OrchardCore.Commerce?style=flat&label=NuGet)](https://www.nuget.org/packages/OrchardCore.Commerce/) [![Latest version of 'OrchardCore.Commerce' on Cloudsmith](https://api-prd.cloudsmith.io/v1/badges/version/orchardcore/commerce/nuget/OrchardCore.Commerce/latest/xsp=True/?render=true&show_latest=true&style=flat&labelColor=gray&label=Cloudsmith)](https://cloudsmith.io/~orchardcore/repos/commerce/packages/detail/nuget/OrchardCore.Commerce/latest/xsp=True/) The commerce module for [Orchard Core](https://github.com/OrchardCMS/OrchardCore). diff --git a/docs/features/workflows.md b/docs/features/workflows.md index 40641f6fd..1ae876536 100644 --- a/docs/features/workflows.md +++ b/docs/features/workflows.md @@ -31,7 +31,7 @@ Executes after the shopping cart content is loaded from the store and before it' - Input: `ShoppingCart` object. - Outputs: - - ShoppingCart: `ShoppingCart` object. An altered version of the input. If no changes are necessary, the output can be skipped. Here it's the most important to only use `input('JSON')` as mentioned above, because `ShoppingCart` has custom JSON converters inside that will ony correctly serialize in .NET code. + - ShoppingCart: `ShoppingCart` object. An altered version of the input. If no changes are necessary, the output can be skipped. Here it's the most important to only use `input('JSON')` as mentioned above, because `ShoppingCart` has custom JSON converters inside that will only correctly serialize in .NET code. ## Other Workflow Events diff --git a/src/Libraries/OrchardCore.Commerce.Abstractions/Serialization/ShoppingCartItemConverter.cs b/src/Libraries/OrchardCore.Commerce.Abstractions/Serialization/ShoppingCartItemConverter.cs index f63f69ea7..2fd2e3d9d 100644 --- a/src/Libraries/OrchardCore.Commerce.Abstractions/Serialization/ShoppingCartItemConverter.cs +++ b/src/Libraries/OrchardCore.Commerce.Abstractions/Serialization/ShoppingCartItemConverter.cs @@ -66,7 +66,7 @@ public override void Write(Utf8JsonWriter writer, ShoppingCartItem value, JsonSe foreach (var attribute in value.Attributes) { writer.WritePropertyName(attribute.AttributeName); - // Re-using the raw attribute serialization logic + // Reusing the raw attribute serialization logic JsonSerializer.Serialize(writer, new RawProductAttributeValue(attribute.UntypedValue), options); } diff --git a/src/Libraries/OrchardCore.Commerce.AddressDataType/Constants/CommonNameParts.cs b/src/Libraries/OrchardCore.Commerce.AddressDataType/Constants/CommonNameParts.cs index d33878525..cc42fd477 100644 --- a/src/Libraries/OrchardCore.Commerce.AddressDataType/Constants/CommonNameParts.cs +++ b/src/Libraries/OrchardCore.Commerce.AddressDataType/Constants/CommonNameParts.cs @@ -1,8 +1,8 @@ -namespace OrchardCore.Commerce.AddressDataType.Constants; +namespace OrchardCore.Commerce.AddressDataType.Constants; /// /// Some name parts common across many cultures. None of these are guaranteed to be in every name, their order and -/// applicability can be dependant on culture or local laws. +/// applicability can depend on culture or local laws. /// /// /// Prefer using "given name" instead of "first name" or "forename", and prefer "family name" instead of "last diff --git a/src/Libraries/OrchardCore.Commerce.MoneyDataType/Serialization/AmountConverter.cs b/src/Libraries/OrchardCore.Commerce.MoneyDataType/Serialization/AmountConverter.cs index c018db964..312e70e3d 100644 --- a/src/Libraries/OrchardCore.Commerce.MoneyDataType/Serialization/AmountConverter.cs +++ b/src/Libraries/OrchardCore.Commerce.MoneyDataType/Serialization/AmountConverter.cs @@ -13,8 +13,8 @@ public sealed class AmountConverter : JsonConverter public const string ValueName = "value"; public const string CurrencyName = "currency"; public const string Name = "name"; - public const string NativeName = "nativename"; // #spell-check-ignore-line - public const string EnglishName = "englishname"; // #spell-check-ignore-line + public const string NativeName = "nativename"; + public const string EnglishName = "englishname"; public const string Symbol = "symbol"; public const string Iso = "iso"; public const string DecimalDigits = "dec"; diff --git a/src/Modules/OrchardCore.Commerce.Payment.Exactly/Models/ChargeResponse.cs b/src/Modules/OrchardCore.Commerce.Payment.Exactly/Models/ChargeResponse.cs index 50e1abdbf..b58bbd991 100644 --- a/src/Modules/OrchardCore.Commerce.Payment.Exactly/Models/ChargeResponse.cs +++ b/src/Modules/OrchardCore.Commerce.Payment.Exactly/Models/ChargeResponse.cs @@ -1,4 +1,4 @@ -using Microsoft.Extensions.Localization; +using Microsoft.Extensions.Localization; using OrchardCore.Commerce.MoneyDataType.Abstractions; using System; using System.Collections.Generic; @@ -37,14 +37,13 @@ public static IDictionary GetResultCodes(IStringLocaliz ["reversals_restricted_for_transaction"] = T["reversals not allowed for the original payment"], ["reversible_amount_exceeded"] = T["amount to reverse exceeds the amount of the original payment"], ["not_allowed_for_failed_transaction"] = T["the operation is not allowed for the failed transaction"], - ["sub_recurrings_restricted_for_transaction"] = // #spell-check-ignore-line - T["subsequent recurring payments are not allowed for the initial payment"], + ["sub_recurrings_restricted_for_transaction"] = T["subsequent recurring payments are not allowed for the initial payment"], ["already_captured"] = T["payment was already captured"], ["capture_amount_exceeded"] = T["capture amount exceeds the amount of the original authorize"], ["authentication_failed"] = T["customer failed 3DS or any other authentication"], ["authentication_expired"] = T["customer didn't complete 3DS or any other authentication in expected time"], ["invalid_card_data"] = T["invalid card details were provided"], - ["cancelled_by_customer"] = T["customer cancelled the transaction"], + ["cancelled_by_customer"] = T["customer canceled the transaction"], ["blocked_by_issuer"] = T["the transaction was blocked by the issuer"], ["declined_by_issuer"] = T["the transaction was declined by the issuer"], ["insufficient_funds"] = T["customer's account doesn't have enough funds for the payment"], diff --git a/src/Modules/OrchardCore.Commerce.Payment.Stripe/Handlers/SubscriptionStripeWebhookEventHandler.cs b/src/Modules/OrchardCore.Commerce.Payment.Stripe/Handlers/SubscriptionStripeWebhookEventHandler.cs index 6553b0efd..738db0e50 100644 --- a/src/Modules/OrchardCore.Commerce.Payment.Stripe/Handlers/SubscriptionStripeWebhookEventHandler.cs +++ b/src/Modules/OrchardCore.Commerce.Payment.Stripe/Handlers/SubscriptionStripeWebhookEventHandler.cs @@ -1,4 +1,4 @@ -using Lombiq.HelpfulLibraries.OrchardCore.Users; +using Lombiq.HelpfulLibraries.OrchardCore.Users; using Microsoft.Extensions.Logging; using OrchardCore.Commerce.Models; using OrchardCore.Commerce.Payment.Stripe.Abstractions; @@ -45,7 +45,7 @@ public async Task ReceivedStripeEventAsync(Event stripeEvent) if (user == null) { _logger.LogError( - "User not found for email {Email}, while invoice was payed. Invoice data: {InvoiceData}", + "User not found for email {Email}, while invoice was paid. Invoice data: {InvoiceData}", invoice.CustomerEmail, JsonSerializer.Serialize(invoice)); return; diff --git a/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummyCustomerService.cs b/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummyCustomerService.cs index 73f4f2b2c..4dd718f85 100644 --- a/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummyCustomerService.cs +++ b/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummyCustomerService.cs @@ -1,4 +1,4 @@ -using Stripe; +using Stripe; using System.Threading; using System.Threading.Tasks; @@ -6,7 +6,7 @@ namespace OrchardCore.Commerce.Payment.Stripe.Services; public class DummyCustomerService : CustomerService { - public const string TestCustomerId = "cus_TESTID00000000"; // #spell-check-ignore-line + public const string TestCustomerId = "cus_TESTID00000000"; public override Customer Create(CustomerCreateOptions options, RequestOptions requestOptions = null) => new(); diff --git a/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummySessionService.cs b/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummySessionService.cs index fe7324851..b0fe4e2a6 100644 --- a/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummySessionService.cs +++ b/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummySessionService.cs @@ -1,4 +1,4 @@ -using Stripe; +using Stripe; using Stripe.Checkout; using System.Threading; using System.Threading.Tasks; @@ -7,7 +7,7 @@ namespace OrchardCore.Commerce.Payment.Stripe.Services; public class DummySessionService : SessionService { - public const string TestSessionId = "cs_test_testsessionid000000000000000000000000000000000000000000000"; // #spell-check-ignore-line + public const string TestSessionId = "cs_test_testsessionid000000000000000000000000000000000000000000000"; public const string TestSessionUrl = "https://localhost"; public override Session Create(SessionCreateOptions options, RequestOptions requestOptions = null) => new(); diff --git a/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummyStripeHelperService.cs b/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummyStripeHelperService.cs index 3829c5fa0..7fdaa778b 100644 --- a/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummyStripeHelperService.cs +++ b/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummyStripeHelperService.cs @@ -1,4 +1,4 @@ -using OrchardCore.Commerce.Payment.Stripe.Abstractions; +using OrchardCore.Commerce.Payment.Stripe.Abstractions; using Stripe; namespace OrchardCore.Commerce.Payment.Stripe.Services; @@ -14,5 +14,5 @@ public Event PrepareStripeEvent( string stripeSignatureHeader, string secret, bool throwOnApiVersionMismatch) => - new() { Id = "evt_exampleEventId0000000000", Type = Type, Data = new EventData { Object = EventDataObject } }; // #spell-check-ignore-line + new() { Id = "evt_exampleEventId0000000000", Type = Type, Data = new EventData { Object = EventDataObject } }; } diff --git a/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummySubscriptionService.cs b/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummySubscriptionService.cs index fb9f3e45a..ff8bac133 100644 --- a/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummySubscriptionService.cs +++ b/src/Modules/OrchardCore.Commerce.Payment.Stripe/Services/DummySubscriptionService.cs @@ -1,4 +1,4 @@ -using Stripe; +using Stripe; using System.Threading; using System.Threading.Tasks; @@ -6,7 +6,7 @@ namespace OrchardCore.Commerce.Payment.Stripe.Services; public class DummySubscriptionService : SubscriptionService { - public const string TestSubscriptionId = "sub_exampleid000000000000000"; // #spell-check-ignore-line + public const string TestSubscriptionId = "sub_exampleid000000000000000"; public static Subscription Subscription { get; set; } = new() { Id = TestSubscriptionId }; public override Subscription Create(SubscriptionCreateOptions options, RequestOptions requestOptions = null) => new(); diff --git a/src/Modules/OrchardCore.Commerce.Payment/Abstractions/IPaymentService.cs b/src/Modules/OrchardCore.Commerce.Payment/Abstractions/IPaymentService.cs index 993cd97ae..e78b68a36 100644 --- a/src/Modules/OrchardCore.Commerce.Payment/Abstractions/IPaymentService.cs +++ b/src/Modules/OrchardCore.Commerce.Payment/Abstractions/IPaymentService.cs @@ -31,7 +31,7 @@ public interface IPaymentService public Task GetTotalAsync(string? shoppingCartId); /// - /// When the order is payed this logic should be run to set properties that represents its state. + /// When the order is paid this logic should be run to set properties that represents its state. /// Task FinalModificationOfOrderAsync(ContentItem order, string? shoppingCartId, string? paymentProviderName); diff --git a/test/OrchardCore.Commerce.Tests.UI/Constants/ContentItemIds.cs b/test/OrchardCore.Commerce.Tests.UI/Constants/ContentItemIds.cs index 25ea5961f..d43c7de1b 100644 --- a/test/OrchardCore.Commerce.Tests.UI/Constants/ContentItemIds.cs +++ b/test/OrchardCore.Commerce.Tests.UI/Constants/ContentItemIds.cs @@ -4,6 +4,6 @@ public static class ContentItemIds { public const string TestProduct = "testproduct000"; public const string TestPriceVariantProduct = "testpricevariantproduct000"; - public const string TestFreeProduct = "testfreeproduct000"; // #spell-check-ignore-line + public const string TestFreeProduct = "testfreeproduct000"; public const string TestOrder = "testpendingorder0000000000"; } diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/CheckoutTests/BehaviorCheckoutTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/CheckoutTests/BehaviorCheckoutTests.cs index 0001397f0..6d7b66373 100644 --- a/test/OrchardCore.Commerce.Tests.UI/Tests/CheckoutTests/BehaviorCheckoutTests.cs +++ b/test/OrchardCore.Commerce.Tests.UI/Tests/CheckoutTests/BehaviorCheckoutTests.cs @@ -69,7 +69,7 @@ public Task AddressPartsFeatureShouldOverrideRegularCheckout(Browser browser) => await context.ClickCheckoutAsync(); var noteBy = By.Name("OrderPart.ShippingAddress.Address.AdditionalFields.NoteForCourier"); - var noteText = "Don't take the old passage to Ravenholm. We don't go there anymore."; // #spell-check-ignore-line + var noteText = "Don't take the old passage to Ravenholm. We don't go there anymore."; await context.ClickAndFillInWithRetriesAsync(noteBy, noteText); await context.ClickAndFillInWithRetriesAsync(AddressName("GivenName"), "Gordon"); await context.ClickAndFillInWithRetriesAsync(AddressName("FamilyName"), "Freeman"); diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/LocalizedProductTests/LocalizedProductBehaviorTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/LocalizedProductTests/LocalizedProductBehaviorTests.cs index 6b1d76ee8..f3cd1909b 100644 --- a/test/OrchardCore.Commerce.Tests.UI/Tests/LocalizedProductTests/LocalizedProductBehaviorTests.cs +++ b/test/OrchardCore.Commerce.Tests.UI/Tests/LocalizedProductTests/LocalizedProductBehaviorTests.cs @@ -11,7 +11,7 @@ namespace OrchardCore.Commerce.Tests.UI.Tests.LocalizedProductTests; public class LocalizedProductBehaviorTests : UITestBase { - private const string LocalizedTitle = "Honosított Termék"; // #spell-check-ignore-line + private const string LocalizedTitle = "Honosított Termék"; private static readonly By _localizationsButtonPath = By.XPath( "//li[contains(@class, 'list-group-item') and .//a[contains(., 'Test Localized Product')]]//div[@title = 'Localizations']//button"); @@ -64,5 +64,5 @@ await context.SelectFromBootstrapDropdownReliablyAsync( browser); private static Task GoToLocalizedProductAsync(UITestContext context) => - context.GoToAdminRelativeUrlAsync("/Contents/ContentItems?q=Test%20Localized%20Product type%3ALocalizedProduct"); // #spell-check-ignore-line + context.GoToAdminRelativeUrlAsync("/Contents/ContentItems?q=Test%20Localized%20Product type%3ALocalizedProduct"); } diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/OrderTests/BehaviorOrderTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/OrderTests/BehaviorOrderTests.cs index 7537a642d..3dc99bb20 100644 --- a/test/OrchardCore.Commerce.Tests.UI/Tests/OrderTests/BehaviorOrderTests.cs +++ b/test/OrchardCore.Commerce.Tests.UI/Tests/OrderTests/BehaviorOrderTests.cs @@ -80,12 +80,12 @@ void SetUnitPriceCurrency(int index, string isoCode) => context.ExecuteScript($@ await ClickAddItemAsync(context); await context.ClickAndFillInWithRetriesAsync(ByQuantity(0), "5"); - await context.ClickAndFillInWithRetriesAsync(ByProductSku(0), "nonexistentproduct"); // #spell-check-ignore-line + await context.ClickAndFillInWithRetriesAsync(ByProductSku(0), "nonexistentproduct"); await context.ClickAndFillInWithRetriesAsync(ByUnitPriceValue(0), "10"); await context.ClickPublishAsync(); // Non-existent SKU should result in validation errors being shown and no Product being added. - context.ErrorMessageExists("SKU \"NONEXISTENTPRODUCT\" does not belong to an existing Product."); // #spell-check-ignore-line + context.ErrorMessageExists("SKU \"NONEXISTENTPRODUCT\" does not belong to an existing Product."); context.Missing(ByQuantity(0)); await ClickAddItemAsync(context); diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/PersistencePriceVariantsTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/PersistencePriceVariantsTests.cs index 7d52ef2dc..2015b0597 100644 --- a/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/PersistencePriceVariantsTests.cs +++ b/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/PersistencePriceVariantsTests.cs @@ -25,7 +25,7 @@ public Task CreatingNewPriceVariantShouldPersist(Browser browser) => await context.SignInDirectlyAsync(); await context.CreateNewContentItemAsync("TestPriceVariantsProduct"); - const string sku = "UITESTSKU"; // #spell-check-ignore-line + const string sku = "UITESTSKU"; const string price = "9999"; var currency = Currency.HungarianForint.CurrencyIsoCode; diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/ValidationPriceVariantsTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/ValidationPriceVariantsTests.cs index 9acef73f8..6a44885a0 100644 --- a/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/ValidationPriceVariantsTests.cs +++ b/test/OrchardCore.Commerce.Tests.UI/Tests/PriceVariantsPartTests/ValidationPriceVariantsTests.cs @@ -1,4 +1,4 @@ -using Lombiq.Tests.UI.Attributes; +using Lombiq.Tests.UI.Attributes; using Lombiq.Tests.UI.Extensions; using Lombiq.Tests.UI.Services; using OpenQA.Selenium; @@ -22,7 +22,7 @@ public Task ProvidingExistingSkuShouldTripTheHandler(Browser browser) => await context.SignInDirectlyAsync(); await context.CreateNewContentItemAsync("PriceVariantsProduct"); - const string skuAlreadyExists = "TESTPRODUCTVARIANT"; // #spell-check-ignore-line + const string skuAlreadyExists = "TESTPRODUCTVARIANT"; await context.ClickAndFillInWithRetriesAsync(By.Id("ProductPart_Sku"), skuAlreadyExists); diff --git a/test/OrchardCore.Commerce.Tests.UI/Tests/TieredPricePartTests/PersistenceTieredPriceTests.cs b/test/OrchardCore.Commerce.Tests.UI/Tests/TieredPricePartTests/PersistenceTieredPriceTests.cs index deb2b85eb..a986c5616 100644 --- a/test/OrchardCore.Commerce.Tests.UI/Tests/TieredPricePartTests/PersistenceTieredPriceTests.cs +++ b/test/OrchardCore.Commerce.Tests.UI/Tests/TieredPricePartTests/PersistenceTieredPriceTests.cs @@ -25,7 +25,7 @@ public Task CreatingNewTieredPriceShouldPersist(Browser browser) => await context.SignInDirectlyAsync(); await context.CreateNewContentItemAsync("TestTieredPriceProduct"); - const string sku = "UITESTSKU"; // #spell-check-ignore-line + const string sku = "UITESTSKU"; const string price = "9999"; const string quantity1 = "2"; const string unitPrice1 = "8999"; diff --git a/test/OrchardCore.Commerce.Tests/AmountTests.cs b/test/OrchardCore.Commerce.Tests/AmountTests.cs index 4761859fc..d86400d2d 100644 --- a/test/OrchardCore.Commerce.Tests/AmountTests.cs +++ b/test/OrchardCore.Commerce.Tests/AmountTests.cs @@ -37,7 +37,7 @@ public void AmountsCanBeNegated() } [Fact] - public void OneCanMultiplyAnAmountByANumber() // #spell-check-ignore-line + public void OneCanMultiplyAnAmountByANumber() { Assert.Equal(new Amount(42.34M, Euro), 2 * new Amount(21.17M, Euro)); Assert.Equal(new Amount(42.34M, Euro), new Amount(21.17M, Euro) * 2); diff --git a/test/OrchardCore.Commerce.Tests/CurrencyTests.cs b/test/OrchardCore.Commerce.Tests/CurrencyTests.cs index bd73364f6..f0262c931 100644 --- a/test/OrchardCore.Commerce.Tests/CurrencyTests.cs +++ b/test/OrchardCore.Commerce.Tests/CurrencyTests.cs @@ -19,7 +19,7 @@ public class CurrencyTests { BritishPound.CurrencyIsoCode, 1234.56m, "£1,234.56" }, { AustralianDollar.CurrencyIsoCode, 1234.56m, "$1,234.56" }, { CanadianDollar.CurrencyIsoCode, 1234.56m, "$1,234.56" }, - { SwissFranc.CurrencyIsoCode, 1234.56m, "CHF 1’234.56" }, // #spell-check-ignore-line + { SwissFranc.CurrencyIsoCode, 1234.56m, "CHF 1’234.56" }, { ChineseYuan.CurrencyIsoCode, 1234.56m, "¥1,234.56" }, }; diff --git a/test/OrchardCore.Commerce.Tests/Fakes/TestMoneyService.cs b/test/OrchardCore.Commerce.Tests/Fakes/TestMoneyService.cs index 3d6866efa..3418a75b5 100644 --- a/test/OrchardCore.Commerce.Tests/Fakes/TestMoneyService.cs +++ b/test/OrchardCore.Commerce.Tests/Fakes/TestMoneyService.cs @@ -10,7 +10,7 @@ public TestMoneyService() : base( [ new CurrencyProvider(), - new AnkhMorporkCurrencyProvider(), // #spell-check-ignore-line + new AnkhMorporkCurrencyProvider(), ], new TestOptions(new() { DefaultCurrency = "EUR" }), [new NullCurrencySelector()])