|
16 | 16 | <severity value="CRITICAL"/>
|
17 | 17 | <testCaseId value="ACP2E-355"/>
|
18 | 18 | <useCaseId value="ACP2E-182"/>
|
19 |
| - <stories value="Error while validating Store VAT Number"/> |
| 19 | + <stories value="Store VAT Number Validation"/> |
20 | 20 | <group value="configuration"/>
|
21 | 21 | </annotations>
|
22 | 22 | <before>
|
|
30 | 30 | <actionGroup ref="AdminOpenStoreConfigPageActionGroup" stepKey="openStoreConfigPage"/>
|
31 | 31 |
|
32 | 32 | <!-- Expand the store information tab -->
|
33 |
| - <conditionalClick selector="{{StoreConfigSection.StoreInformation}}" dependentSelector="{{StoreConfigSection.CheckIfTabExpand}}" stepKey="checkIfTabOpen" visible="true"/> |
34 |
| - <waitForPageLoad time="60" stepKey="wait" /> |
| 33 | + <conditionalClick selector="{{StoreConfigSection.StoreInformation}}" dependentSelector="{{StoreConfigSection.CheckIfTabExpand}}" visible="true" stepKey="checkIfTabOpen"/> |
35 | 34 |
|
36 |
| - <!-- Verify that the page source contains the raw source code `<button class="action-validate-vat disabled">`. --> |
37 |
| - <seeInSource html="<button class="action-validate-vat disabled"" stepKey="seeInSource"/> |
38 |
| - |
39 |
| - <!--Open country options section and select an EU Country (`Denmark`) --> |
40 |
| - <selectOption userInput="{{DE_Address_Berlin_Not_Default_Address.country}}" selector="{{StoreConfigSection.Country}}" stepKey="selectEUStoreCountry"/> |
41 |
| - <waitForAjaxLoad stepKey="waitForAjaxLoad"/> |
| 35 | + <!-- Verify that `Validate VAT Number` button is available and visible on the current page. --> |
| 36 | + <seeElement selector="{{StoreConfigSection.validateVATNumber}}" stepKey="seeVATNumberButton"/> |
42 | 37 |
|
43 |
| - <!-- Wait up to 30 seconds for `Validate VAT Number` button to become enabled on the page before continuing. --> |
44 |
| - <waitForElementVisible selector="{{StoreConfigSection.validateVATNumber}}" stepKey="waitForElementVisible"/> |
| 38 | + <!-- Verify that the `Validate VAT Number` button contains class `disabled` for non-EU Country or none--> |
| 39 | + <seeElement selector="{{StoreConfigSection.validateVATNumber}}" selectorArray="['class' => 'disabled']" stepKey="validateVatNumberButtonShouldBeDisabledInitially"/> |
45 | 40 |
|
46 |
| - <!-- Verify that `Validate VAT Number` is available and visible on the current page. --> |
47 |
| - <seeElement selector="{{StoreConfigSection.validateVATNumber}}" stepKey="seeVATNumberButton"/> |
48 |
| - <waitForPageLoad time="30" stepKey="waitForPageLoad1" /> |
| 41 | + <!--Open country options section and select an EU Country (`Germany`) --> |
| 42 | + <selectOption userInput="{{DE_Address_Berlin_Not_Default_Address.country}}" selector="{{StoreConfigSection.Country}}" stepKey="selectEUStoreCountry"/> |
| 43 | + <waitForAjaxLoad stepKey="waitForAjaxToLoadRegionForEuCountry"/> |
49 | 44 |
|
50 |
| - <!--Fill valid VAT Number for the selected EU Country (Denmark)--> |
51 |
| - <fillField selector="{{StoreConfigSection.fillVATNumber}}" userInput="{{DE_Address_Berlin_Not_Default_Address.vatNumber}}" stepKey="fillVATNumberForEU"/> |
| 45 | + <!--Fill valid VAT Number for the selected EU Country (Germany)--> |
| 46 | + <fillField selector="{{StoreConfigSection.fillVATNumber}}" userInput="{{DE_Address_Berlin_Not_Default_Address.vatNumber}}" stepKey="fillValidVatNumberForEuCountry"/> |
52 | 47 |
|
53 |
| - <waitForPageLoad time="30" stepKey="waitForPageLoad2" /> |
54 |
| - <!-- Verify that the page source contains the raw source code `<button class="action-validate-vat">`. --> |
55 |
| - <seeInSource html="<button class="action-validate-vat"" stepKey="seeInSource2"/> |
| 48 | + <!-- Verify that the `Validate VAT Number` button should not contain class `disabled` for EU Country--> |
| 49 | + <dontSeeElement selector="{{StoreConfigSection.validateVATNumber}}" parameterArray="['class' => 'disabled']" stepKey="validateVatNumberButtonEnabledForEuCountry"/> |
56 | 50 |
|
57 | 51 | <!-- Click the `Validate VAT Number` button. -->
|
58 |
| - <click selector="{{StoreConfigSection.validateVATNumber}}" stepKey="clickButton"/> |
59 |
| - <waitForAjaxLoad stepKey="waitForAjaxLoad2"/> |
60 |
| - <waitForElementVisible selector="#validation_result" time="20" stepKey="waitForAssertValidVATNumber"/> |
61 |
| - <see selector="#validation_result" userInput="VAT Number is valid." stepKey="validVATNumberResult"/> |
62 |
| - <waitForPageLoad time="60" stepKey="wait2" /> |
| 52 | + <click selector="{{StoreConfigSection.validateVATNumber}}" stepKey="clickValidateVatNumberButton"/> |
| 53 | + <waitForAjaxLoad stepKey="waitForAjaxToLoadVatValidationResult"/> |
| 54 | + <waitForElementVisible selector="#validation_result" time="20" stepKey="waitForRenderingVatValidationResult"/> |
| 55 | + <see selector="#validation_result" userInput="VAT Number is valid." stepKey="seeValidVatNumberResult"/> |
63 | 56 |
|
64 |
| - <!-- Disable `Validate VAT Number` button for non-EU Country (GB)--> |
| 57 | + <!-- Disable `Validate VAT Number` button for non-EU Country (United Kingdom)--> |
65 | 58 | <selectOption userInput="{{UK_With_State_Default_Billing.country}}" selector="{{StoreConfigSection.Country}}" stepKey="selectNonEUStoreCountry"/>
|
66 |
| - <waitForAjaxLoad stepKey="waitForAjaxLoad3"/> |
| 59 | + <waitForAjaxLoad stepKey="waitForAjaxToLoadRegionForNonEuCountry"/> |
67 | 60 | <fillField selector="{{StoreConfigSection.fillVATNumber}}" userInput="{{UK_With_State_Default_Billing.vatNumber}}" stepKey="fillVATNumberForNonEU"/>
|
68 |
| - <waitForPageLoad time="60" stepKey="wait3" /> |
69 | 61 |
|
70 |
| - <!-- Verify that the page source contains the raw source code `<button class="action-validate-vat disabled">`. --> |
71 |
| - <seeInSource html="<button class="action-validate-vat disabled"" stepKey="seeInSource3"/> |
| 62 | + <!-- Verify that the `Validate VAT Number` button contains class `disabled` for non-EU Country--> |
| 63 | + <seeElement selector="{{StoreConfigSection.validateVATNumber}}" selectorArray="['class' => 'disabled']" stepKey="validateVatNumberButtonDisabledAgain"/> |
72 | 64 | </test>
|
73 | 65 | </tests>
|
0 commit comments