-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1039 from BearGroup/release/5.2.0
Release/5.2.0
- Loading branch information
Showing
84 changed files
with
870 additions
and
472 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
13 changes: 13 additions & 0 deletions
13
Test/Mftf-23/ActionGroup/AmazonBeginLoginOnlyActionGroup.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AmazonBeginLoginOnlyActionGroup"> | ||
<waitForElement selector="{{AmazonPageSection.emailField}}" stepKey="waitForEmailField"/> | ||
<wait time="1" stepKey="allowButtonToActivate1"/> | ||
<fillField selector="{{AmazonPageSection.emailField}}" userInput="{{AmazonAccount.email}}" stepKey="fillAmazonPageEmailField"/> | ||
<fillField selector="{{AmazonPageSection.passwordField}}" userInput="{{AmazonAccount.password}}" stepKey="fillAmazonPagePasswordField"/> | ||
<click selector="{{AmazonPageSection.signInButton}}" stepKey="clickAmazonPageSignInButton"/> | ||
<!--Verify successful login by the presence of the continue button--> | ||
<wait time="1" stepKey="allowButtonToActivate2"/> | ||
<waitForElement selector="{{AmazonLoginSection.consentButton}}" stepKey="seeAmazonConsentButton"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains 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
73 changes: 73 additions & 0 deletions
73
Test/Mftf-23/ActionGroup/AmazonLoginAndCheckoutActionGroup.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<!--Open login popup and complete form--> | ||
<actionGroup name="AmazonLoginAndCheckoutActionGroup"> | ||
<arguments> | ||
<argument name="buttonSelector" defaultValue="{{AmazonButtonSection.checkout}}" type="string"/> | ||
<argument name="cc" defaultValue="1111" type="string"/> | ||
</arguments> | ||
|
||
<!--Save opener window name since popup auto-closes--> | ||
<executeJS function="return window.name;" stepKey="openerName"/> | ||
|
||
<!--Go to Amazon Pay from the checkout and login--> | ||
<waitForElement selector="{{buttonSelector}}" time="30" stepKey="apWaitForButton"/> | ||
<wait time="1" stepKey="allowButtonToActivate"/> | ||
<click selector="{{buttonSelector}}" stepKey="clickAmazonButton"/> | ||
|
||
<wait time="1" stepKey="allowPopupToOpen"/> | ||
<switchToNextTab stepKey="switchToLoginPopupWindow"/> | ||
|
||
<!-- Fill in login form --> | ||
<waitForElement selector="{{AmazonPageSection.emailField}}" time="30" stepKey="apWaitForLogin"/> | ||
<fillField selector="{{AmazonPageSection.emailField}}" userInput="{{AmazonAccount.email}}" stepKey="apEnterEmail"/> | ||
<fillField selector="{{AmazonPageSection.passwordField}}" userInput="{{AmazonAccount.password}}" stepKey="apEnterPassword"/> | ||
<click selector="{{AmazonPageSection.signInButton}}" stepKey="clickSigninButton"/> | ||
|
||
<!--Verify successful login by the presence of the checkout button--> | ||
<wait time="1" stepKey="allowButtonToActivate2"/> | ||
<waitForElement selector="{{AmazonPageSection.checkoutButton}}" stepKey="seeAmazonCheckoutButton"/> | ||
|
||
|
||
<!--Get shipping address information--> | ||
<grabAttributeFrom selector="{{AmazonPageSection.addressId}}" userInput="data-address_id" stepKey="amazonAddressId"/> | ||
<grabAttributeFrom selector="{{AmazonPageSection.addressDetails({$amazonAddressId})}}" userInput="data-name_on_address" stepKey="amazonAddressName"/> | ||
<grabAttributeFrom selector="{{AmazonPageSection.addressDetails({$amazonAddressId})}}" userInput="data-address_line1" stepKey="amazonAddressLine1Raw"/> | ||
<grabAttributeFrom selector="{{AmazonPageSection.addressDetails({$amazonAddressId})}}" userInput="data-address_line2" stepKey="amazonAddressLine2Raw"/> | ||
<grabAttributeFrom selector="{{AmazonPageSection.addressDetails({$amazonAddressId})}}" userInput="data-address_line3" stepKey="amazonAddressLine3Raw"/> | ||
<grabAttributeFrom selector="{{AmazonPageSection.addressDetails({$amazonAddressId})}}" userInput="data-city" stepKey="amazonAddressCity"/> | ||
<grabAttributeFrom selector="{{AmazonPageSection.addressDetails({$amazonAddressId})}}" userInput="data-zip_code" stepKey="amazonAddressZipCode"/> | ||
<grabAttributeFrom selector="{{AmazonPageSection.addressDetails({$amazonAddressId})}}" userInput="data-country" stepKey="amazonAddressCountryCode"/> | ||
<grabAttributeFrom selector="{{AmazonPageSection.addressDetails({$amazonAddressId})}}" userInput="data-phone_number" stepKey="amazonAddressPhoneNumber"/> | ||
|
||
<!-- choose card --> | ||
<click selector="{{AmazonPageSection.changePaymentButton}}" stepKey="clickChangeAddress"/> | ||
<executeJS function="document.querySelectorAll('#maxo_payment_methods .a-radio-label').forEach(function(v,i,o) { if (v.querySelector('.trail_number').innerText.includes('{{cc}}')) { v.click() } });" stepKey="executeJsCc"/> | ||
<click selector="{{AmazonPageSection.usePaymentButton}}" stepKey="clickUsePaymentMethod"/> | ||
|
||
<!--Go back to checkout--> | ||
<waitForElement selector="{{AmazonPageSection.checkoutButton}}" stepKey="waitForAmazonCheckoutButton"/> | ||
<wait time="1" stepKey="allowContinueButtonToActivate"/> | ||
<click selector="{{AmazonPageSection.checkoutButton}}" stepKey="clickAmazonCheckoutButton"/> | ||
|
||
<!-- Switch back to main window --> | ||
<switchToWindow userInput="{$openerName}" stepKey="switchToWindowOpener" /> | ||
|
||
<waitForPageLoad stepKey="waitForCheckoutPageLoad"/> | ||
<wait time="1" stepKey="allowAddressToPopulate"/> | ||
<!--Filter out address data--> | ||
<executeJS function="return '{$amazonAddressLine1Raw}' !== 'null' ? '{$amazonAddressLine1Raw}' : ''" stepKey="amazonAddressLine1"/> | ||
<executeJS function="return '{$amazonAddressLine2Raw}' !== 'null' ? '{$amazonAddressLine2Raw}' : ''" stepKey="amazonAddressLine2"/> | ||
<executeJS function="return '{$amazonAddressLine3Raw}' !== 'null' ? '{$amazonAddressLine3Raw}' : ''" stepKey="amazonAddressLine3"/> | ||
<grabAttributeFrom selector="{{AmazonCheckoutSection.countryNameByCode({$amazonAddressCountryCode})}}" userInput="data-title" stepKey="amazonAddressCountryName"/> | ||
<!--Verify correct shipping address is displayed--> | ||
<see selector="{{AmazonCheckoutSection.shippingAddress}}" userInput="$amazonAddressName" stepKey="seeAmazonAddressName"/> | ||
<see selector="{{AmazonCheckoutSection.shippingAddress}}" userInput="$amazonAddressLine1" stepKey="seeAmazonAddressLine1"/> | ||
<see selector="{{AmazonCheckoutSection.shippingAddress}}" userInput="$amazonAddressLine2" stepKey="seeAmazonAddressLine2"/> | ||
<see selector="{{AmazonCheckoutSection.shippingAddress}}" userInput="$amazonAddressLine3" stepKey="seeAmazonAddressLine3"/> | ||
<see selector="{{AmazonCheckoutSection.shippingAddress}}" userInput="$amazonAddressCity" stepKey="seeAmazonAddressCity"/> | ||
<see selector="{{AmazonCheckoutSection.shippingAddress}}" userInput="$amazonAddressZipCode" stepKey="seeAmazonAddressZipCode"/> | ||
<see selector="{{AmazonCheckoutSection.shippingAddress}}" userInput="$amazonAddressCountryName" stepKey="seeAmazonAddressCountryName"/> | ||
<see selector="{{AmazonCheckoutSection.shippingAddress}}" userInput="$amazonAddressPhoneNumber" stepKey="seeAmazonAddressPhoneNumber"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains 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
13 changes: 13 additions & 0 deletions
13
Test/Mftf-23/ActionGroup/AmazonLoginOnlyRedirectActionGroup.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AmazonLoginOnlyRedirectActionGroup"> | ||
<waitForElement selector="{{AmazonPageSection.emailField}}" stepKey="waitForEmailField"/> | ||
<wait time="1" stepKey="allowButtonToActivate1"/> | ||
<fillField selector="{{AmazonPageSection.emailField}}" userInput="{{AmazonAccount.email}}" stepKey="fillAmazonPageEmailField"/> | ||
<fillField selector="{{AmazonPageSection.passwordField}}" userInput="{{AmazonAccount.password}}" stepKey="fillAmazonPagePasswordField"/> | ||
<click selector="{{AmazonPageSection.signInButton}}" stepKey="clickAmazonPageSignInButton"/> | ||
<!--Verify successful login by the presence of the continue button--> | ||
<wait time="1" stepKey="allowButtonToActivate2"/> | ||
<waitForElement selector="{{AmazonLoginSection.consentButton}}" stepKey="seeAmazonConsentButton"/> | ||
</actionGroup> | ||
</actionGroups> |
13 changes: 13 additions & 0 deletions
13
Test/Mftf-23/ActionGroup/AmazonLoginRedirectActionGroup.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AmazonLoginRedirectActionGroup"> | ||
<waitForElement selector="{{AmazonPageSection.emailField}}" stepKey="waitForEmailField"/> | ||
<wait time="1" stepKey="allowButtonToActivate1"/> | ||
<fillField selector="{{AmazonPageSection.emailField}}" userInput="{{AmazonAccount.email}}" stepKey="fillAmazonPageEmailField"/> | ||
<fillField selector="{{AmazonPageSection.passwordField}}" userInput="{{AmazonAccount.password}}" stepKey="fillAmazonPagePasswordField"/> | ||
<click selector="{{AmazonPageSection.signInButton}}" stepKey="clickAmazonPageSignInButton"/> | ||
<!--Verify successful login by the presence of the checkout button--> | ||
<wait time="1" stepKey="allowButtonToActivate"/> | ||
<waitForElement selector="{{AmazonPageSection.checkoutButton}}" stepKey="seeAmazonCheckoutButton"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.