Repository navigation
Let checkout tests check the address step before validating it - #1135
Open
oleksandrmaslov wants to merge 1 commit into
Open
oleksandrmaslov wants to merge 1 commit into
oleksandrmaslov wants to merge 1 commit into
Conversation
setAddress() fills the addresses and validates the step in one call, so a test cannot look at the invoice form in between. fillAddresses() does the filling, and setAddress() now calls it, so its behaviour is unchanged. isUseSameAddressCheckboxVisible() waits for the address form to be reloaded after a country change before it checks the checkbox. Without the wait a check for a missing checkbox passes before the reloaded markup is in.
|
Hello @oleksandrmaslov! This is your first pull request on ui-testing-library repository of the PrestaShop project. Thank you, and welcome to this Open Source community! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
setAddress()fills the delivery and invoice addresses and validates the step in one call, so a test cannot check the invoice form in between.fillAddresses()does the filling andsetAddress()now calls it, its behaviour is unchanged.isUseSameAddressCheckboxVisible()waits forjQuery.activeto drop to 0 before it looks, because selecting a country reloads the address form by ajax and a check for a missing checkbox would otherwise pass before the reloaded markup is in. Needed by the UI test for PrestaShop/PrestaShop#42887.How to test
MAKECMDGOALS=/path/to/shop make test.02_useDifferentInvoiceAddresscampaigns (Classic and Hummingbird) with the change for Keep the address type when refreshing the address form over AJAX PrestaShop#42887, which callsfillAddresses(),isUseSameAddressCheckboxVisible()andclickOnContinueButtonFromAddressStep()instead ofsetAddress(): oleksandrmaslov/PrestaShop@fix/39545-keep-address-type-on-refresh...fix/39545-ui-testChecked on a 9.2.0-rc.1 shop with Classic and Hummingbird. With the stock code the checkbox check fails with
expected true to equal falseand every other step passes. With #42887's code both campaigns pass.Local checks passed (ESLint and library build).