Skip to content

Commit 05f0d9b

Browse files
authored
Merge pull request #81 from magento-epam/MAGETWO-62891
MAGETWO-62891: New address is not marked as "Default Billing"
2 parents 47514cc + 591c13d commit 05f0d9b

File tree

4 files changed

+28
-259
lines changed

4 files changed

+28
-259
lines changed

app/code/Magento/Checkout/Test/Mftf/ActionGroup/IdentityOfDefaultBillingAndShippingAddressActionGroup.xml

Lines changed: 0 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -8,88 +8,6 @@
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
1010

11-
<!-- Go To Product Page -->
12-
<actionGroup name="GoToProductPage">
13-
<click selector="{{GoToProductPageSection.catalog}}" stepKey="clickOnCatalog" />
14-
<waitForPageLoad stepKey="waitForPage"/>
15-
<click selector="{{GoToProductPageSection.product}}" stepKey="clickToSelectProductsItem" />
16-
<waitForPageLoad stepKey="waitForPageProducts"/>
17-
</actionGroup>
18-
19-
<!-- Create Simple Product -->
20-
<actionGroup name="CreateSimpleProduct">
21-
<arguments>
22-
<argument name="product" defaultValue="SimpleProduct"/>
23-
</arguments>
24-
<click selector="{{GoToProductPageSection.add}}" stepKey="clickToAddProduct"/>
25-
<waitForPageLoad stepKey="WaitForProductPageIsLoaded"/>
26-
<fillField selector="{{AdminAddSimpleProductSection.productName}}" userInput="{{product.name}}" stepKey="setNameForProduct"/>
27-
<fillField selector="{{AdminAddSimpleProductSection.productSku}}" userInput="{{product.sku}}" stepKey="setSKUForProduct"/>
28-
<fillField selector="{{AdminAddSimpleProductSection.productPrice}}" userInput="{{product.price}}" stepKey="setPriceForProduct"/>
29-
<fillField selector="{{AdminAddSimpleProductSection.productQuantity}}" userInput="{{product.quantity}}" stepKey="setQuantityForProduct"/>
30-
<click selector="{{AdminAddSimpleProductSection.searchOptimization}}" stepKey="clickOnSearchEngineOptimization"/>
31-
<fillField selector="{{AdminAddSimpleProductSection.urlKey}}" userInput="{{product.urlKey}}" stepKey="setSearchUrlForProduct"/>
32-
<click selector="{{AdminAddSimpleProductSection.saveButton}}" stepKey="clickSaveProduct"/>
33-
<waitForPageLoad stepKey="WaitForProductSave"/>
34-
<see userInput="You saved the product." stepKey="seeSaveConfirmation"/>
35-
</actionGroup>
36-
37-
<!--Create Account -->
38-
<actionGroup name="StorefrontCreateAccountActionGroup">
39-
<click selector="{{StorefrontCreateAccountSection.createAccount}}" stepKey="ClickToCreateAccount"/>
40-
<waitForPageLoad stepKey="waitForAccountFormIsOpened"/>
41-
<fillField selector="{{StorefrontCreateAccountSection.firstName}}" userInput="{{CreateNewUserData.firstName}}" stepKey="TypeFirstName"/>
42-
<fillField selector="{{StorefrontCreateAccountSection.lastName}}" userInput="{{CreateNewUserData.lastName}}" stepKey="TypeLastName"/>
43-
<fillField selector="{{StorefrontCreateAccountSection.email}}" userInput="{{CreateNewUserData.firstName}}@magento.com" stepKey="TypeEmail"/>
44-
<fillField selector="{{StorefrontCreateAccountSection.password}}" userInput="{{CreateNewUserData.password}}" stepKey="TypePassword"/>
45-
<waitForPageLoad stepKey="waitToConfirmPassword"/>
46-
<fillField selector="{{StorefrontCreateAccountSection.confirmPass}}" userInput="{{CreateNewUserData.password}}" stepKey="confirmPassword"/>
47-
<click selector="{{StorefrontCreateAccountSection.create}}" stepKey="ClickToSaveAccount"/>
48-
<waitForPageLoad stepKey="waitForAccountPageLoaded"/>
49-
</actionGroup>
50-
51-
<!--Find and add product to cart-->
52-
<actionGroup name="FindAndAddProductToCardActionGroup">
53-
<!--Navigate to a category page -->
54-
<amOnPage url="/{{SimpleProduct.name}}.html" stepKey="goToCreatedProductPage"/>
55-
<waitForPageLoad stepKey="waitForProductPageLoaded"/>
56-
<click selector="{{StorefrontAddCreatedProductToCartSection.addToCartBtn}}" stepKey="addToCart"/>
57-
<waitForElementVisible selector="{{StorefrontAddCreatedProductToCartSection.successMessage}}" time="30" stepKey="waitForProductAdded"/>
58-
<click selector="{{StorefrontAddCreatedProductToCartSection.showCard}}" stepKey="clickToOpenCard"/>
59-
<waitForPageLoad stepKey="WaitForFormOpened"/>
60-
<click selector="{{StorefrontAddCreatedProductToCartSection.proceed}}" stepKey="clickToProceedToCheckout"/>
61-
<waitForPageLoad stepKey="waitForTheFormIsOpened"/>
62-
<see userInput="Shipping Address" stepKey="seeShippingAddress"/>
63-
</actionGroup>
64-
65-
<!--Fill shipment form-->
66-
<actionGroup name="FillShipmentFormActionGroup">
67-
<fillField selector="{{ShipmentFormSection.street}}" userInput="{{Account.street}}" stepKey="SetCustomerStreetAddress"/>
68-
<fillField selector="{{ShipmentFormSection.city}}" userInput="{{Account.city}}" stepKey="SetCustomerCity"/>
69-
<fillField selector="{{ShipmentFormSection.postcode}}" userInput="{{Account.postcode}}" stepKey="SetCustomerZipCode"/>
70-
<fillField selector="{{ShipmentFormSection.telephone}}" userInput="{{Account.telephone}}" stepKey="SetCustomerPhoneNumber"/>
71-
<click selector="{{ShipmentFormSection.region}}" stepKey="clickToSetState"/>
72-
<click selector="{{ShipmentFormSection.state}}" stepKey="clickToChooseState"/>
73-
<click selector="{{ShipmentFormSection.stateAlabama}}" stepKey="chooseStateAlabama"/>
74-
<click selector="{{ShipmentFormSection.next}}" stepKey="clickToSaveShippingInfo"/>
75-
<waitForPageLoad stepKey="waitForReviewAndPaymentsPageIsLoaded"/>
76-
</actionGroup>
77-
78-
<!--Mark "My billing and shipping address are the same"-->
79-
<actionGroup name="MarkMyBillingAndShippingAddressAreTheSame">
80-
<conditionalClick selector="{{ShipmentFormSection.billingShippingAddressTheSameCheckbox}}" dependentSelector="{{ShipmentFormSection.placeOrderButton}}" visible="0" stepKey="selectkMyBillingAndShippingAddressAreTheSameCheckbox"/>
81-
<click stepKey="clickPlaceOrderButton" selector="{{ShipmentFormSection.placeOrderButton}}"/>
82-
<waitForPageLoad stepKey="waitForCheckoutPageLoaded"/>
83-
<see stepKey="seeSuccessfulMessage" userInput="Thank you for your purchase!"/>
84-
</actionGroup>
85-
86-
<!--Go To My Account Page-->
87-
<actionGroup name="GoToMyAccountPage">
88-
<click stepKey="clickCustomerNameItem" selector="{{GoToMyAccountSection.customerName}}"/>
89-
<click stepKey="clickMyAccountItem" selector="{{GoToMyAccountSection.myAccountItem}}"/>
90-
<waitForPageLoad stepKey="waitForMyAccountPageLoaded"/>
91-
</actionGroup>
92-
9311
<!--Assert That Shipping And Billing Address are the same-->
9412
<actionGroup name="AssertThatShippingAndBillingAddressTheSame">
9513
<!--Get shipping and billing addresses-->
@@ -101,49 +19,4 @@
10119
<assertEquals stepKey="assert" actual="$billingAddr" expected="$shippingAddr"/>
10220
</actionGroup>
10321

104-
<!-- Delete Created Product -->
105-
<actionGroup name="DeleteCreatedProduct">
106-
<conditionalClick selector="{{DeleteCreatedProductSection.clearAll}}" dependentSelector="{{DeleteCreatedProductSection.clearAll}}" visible="1" stepKey="clickClearAllIfThereIsAnyValue"/>
107-
<click stepKey="clickFilterButton" selector="{{DeleteCreatedProductSection.filterButton}}"/>
108-
<waitForElementVisible selector="{{DeleteCreatedProductSection.filterSKUField}}" stepKey="waitForFilterDataLoaded"/>
109-
<fillField stepKey="searchProductUsingSKUField" selector="{{DeleteCreatedProductSection.filterSKUField}}" userInput="{{SimpleProduct.sku}}"/>
110-
<click stepKey="clickFiltersApplyButton" selector="{{DeleteCreatedProductSection.filtersApplyButton}}"/>
111-
<waitForElementNotVisible selector="{{DeleteCreatedProductSection.filterSKUField}}" stepKey="waitForFilterBecomeNotVisible"/>
112-
<click selector="{{DeleteCreatedProductSection.createdProductID}}" stepKey="selectCreatedProduct"/>
113-
<wait stepKey="waitSelectCreatedProduct" time="2"/>
114-
<waitForElementVisible selector="{{DeleteCreatedProductSection.actionSelectBox}}" stepKey="waitToSelectActionVisible"/>
115-
<click stepKey="clickToSelectAction" selector="{{DeleteCreatedProductSection.actionSelectBox}}"/>
116-
<waitForElementVisible selector="{{DeleteCreatedProductSection.deleteButton}}" stepKey="waitForDeleteButtonAppeared"/>
117-
<click selector="{{DeleteCreatedProductSection.deleteButton}}" stepKey="clickToDeleteProduct"/>
118-
<waitForElementVisible selector="{{DeleteCreatedProductSection.okButton}}" stepKey="waitForOkButtonAppeared"/>
119-
<click selector="{{DeleteCreatedProductSection.okButton}}" stepKey="clickToConfirm"/>
120-
<wait stepKey="waitForRecordIsDeleted" time="2"/>
121-
<see userInput="A total of 1 record(s) have been deleted." stepKey="productDeletedSuccessfully"/>
122-
<click stepKey="clickClearAllFilterButton" selector="{{DeleteCreatedProductSection.clearAll}}"/>
123-
<wait stepKey="waitToClearAllFilters" time="2"/>
124-
</actionGroup>
125-
126-
<!--Delete created Customer -->
127-
<actionGroup name="DeleteCreatedCustomerActionGroup">
128-
<click stepKey="clickCustomerItem" selector="{{DashboardSection.customer}}"/>
129-
<wait stepKey="WaitForCustomerViewOpened" time="2"/>
130-
<click stepKey="clickCustomerAllCustomerItem" selector="{{DashboardSection.customerAllCustomer}}"/>
131-
<waitForPageLoad stepKey="WaitForCustomerPageIsLoaded"/>
132-
<conditionalClick selector="{{AdminCustomerAccInformationSection.clearAll}}" dependentSelector="{{AdminCustomerAccInformationSection.clearAll}}" visible="1" stepKey="clickClearAllIfThereIsAnyValue"/>
133-
<click stepKey="clickFilterButton" selector="{{AdminCustomerAccInformationSection.filterButton}}"/>
134-
<waitForElementVisible selector="{{AdminCustomerAccInformationSection.filterNameField}}" stepKey="waitForFilterDataLoaded"/>
135-
<fillField stepKey="searchProductUsingNameField" selector="{{AdminCustomerAccInformationSection.filterNameField}}" userInput="{{CreateNewUserData.firstName}}"/>
136-
<click stepKey="clickFiltersApplyButton" selector="{{AdminCustomerAccInformationSection.filtersApplyButton}}"/>
137-
<waitForElementNotVisible selector="{{AdminCustomerAccInformationSection.filterNameField}}" stepKey="waitForFilterBecomeNotVisible"/>
138-
<click selector="{{AdminCustomerAccInformationSection.selectCustomer}}" stepKey="ClickOnCustomer"/>
139-
<click selector="{{AdminCustomerAccInformationSection.actions}}" stepKey="ClickOnActions"/>
140-
<waitForElementVisible selector="{{AdminCustomerAccInformationSection.delete}}" stepKey="waitForDeleteButtonAppeared"/>
141-
<click selector="{{AdminCustomerAccInformationSection.delete}}" stepKey="ClickOnDelete"/>
142-
<waitForElementVisible selector="{{AdminCustomerAccInformationSection.confirm}}" stepKey="waitForConfirmButtonAppeared"/>
143-
<click selector="{{AdminCustomerAccInformationSection.confirm}}" stepKey="ClickToConfirm"/>
144-
<waitForPageLoad stepKey="waitClickToConfirmButton"/>
145-
<click stepKey="clickClearAllFilterButton" selector="{{DeleteCreatedProductSection.clearAll}}"/>
146-
<wait stepKey="waitToClearAllFilters" time="2"/>
147-
</actionGroup>
148-
14922
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/Data/IdentityOfDefaultBillingAndShippingAddressData.xml

Lines changed: 0 additions & 32 deletions
This file was deleted.

app/code/Magento/Checkout/Test/Mftf/Section/IdentityOfDefaultBillingAndShippingAddressSection.xml

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -8,91 +8,9 @@
88

99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11-
<section name="GoToProductPageSection">
12-
<!--Go to Catalog/Products-->
13-
<element name="catalog" type="button" selector="#menu-magento-catalog-catalog"/>
14-
<element name="product" type="button" selector="//span[contains(text(), 'Products')]"/>
15-
<element name="add" type="button" selector="#add_new_product-button"/>
16-
</section>
17-
18-
<section name="AdminAddSimpleProductSection">
19-
<element name="productName" type="input" selector=".admin__field[data-index=name] input"/>
20-
<element name="productSku" type="input" selector=".admin__field[data-index=sku] input"/>
21-
<element name="productPrice" type="input" selector=".admin__field[data-index=price] input"/>
22-
<element name="productQuantity" type="input" selector=".admin__field[data-index=qty] input"/>
23-
<element name="searchOptimization" type="button" selector="//*[contains(text(),'Search Engine Optimization')]"/>
24-
<element name="urlKey" type="input" selector="//input[contains(@name,'url_key')]"/>
25-
<element name="saveButton" type="button" selector="#save-button"/>
26-
</section>
27-
28-
<section name="StorefrontCreateAccountSection">
29-
<element name="createAccount" type="button" selector="//div[contains(@class, 'panel wrapper')]//a[text()='Create an Account']"/>
30-
<element name="firstName" type="input" selector="#firstname"/>
31-
<element name="lastName" type="input" selector="#lastname"/>
32-
<element name="email" type="input" selector="#email_address"/>
33-
<element name="password" type="input" selector="#password"/>
34-
<element name="confirmPass" type="input" selector="#password-confirmation"/>
35-
<element name="create" type="button" selector="//button[@type='submit' and @title='Create an Account']"/>
36-
</section>
37-
38-
<section name="StorefrontAddCreatedProductToCartSection">
39-
<element name="addToCartBtn" type="button" selector="button.action.tocart.primary"/>
40-
<element name="successMsg" type="button" selector="div.message-success"/>
41-
<element name="showCard" type="button" selector=".action.showcart"/>
42-
<element name="proceed" type="button" selector="#top-cart-btn-checkout"/>
43-
<element name="successMessage" type="button" selector="div.message-success"/>
44-
</section>
4511

4612
<section name="ShipmentFormSection">
47-
<element name="street" type="input" selector="//*[@name='street[0]']"/>
48-
<element name="city" type="input" selector="//*[@name='city']"/>
49-
<element name="postcode" type="input" selector="//*[@name='postcode']"/>
50-
<element name="telephone" type="input" selector="//*[@name='telephone']"/>
51-
<element name="region" type="input" selector="//*[@name='region_id']"/>
52-
<element name="state" type="input" selector="//*[@name='country_id']"/>
53-
<element name="stateAlabama" type="select" selector="//*[@name='region_id']/option[contains(text(),'Alabama')]"/>
54-
<element name="next" type="input" selector="//span[contains(text(), 'Next')]"/>
55-
56-
<element name="billingShippingAddressTheSameCheckbox" type="select" selector="#billing-address-same-as-shipping-checkmo"/>
57-
<element name="placeOrderButton" type="button" selector="//span[contains(text(),'Place Order')]"/>
5813
<element name="shippingAddress" type="textarea" selector="//*[@class='box box-billing-address']//address"/>
5914
<element name="billingAddress" type="textarea" selector="//*[@class='box box-shipping-address']//address"/>
6015
</section>
61-
62-
<section name="GoToMyAccountSection">
63-
<element name="customerName" type="input" selector="//*[@class='page-header']//*[@data-bind='text: customer().fullname']"/>
64-
<element name="myAccountItem" type="input" selector="//*[@class='page-header']//*[contains(text(),'My Account')]"/>
65-
</section>
66-
67-
<section name="DeleteCreatedProductSection">
68-
<element name="searchToKeyword" type="input" selector="//*[@class='admin__data-grid-outer-wrap']/*[@class='admin__data-grid-header']//*[@class='data-grid-search-control-wrap']/input"/>
69-
<element name="searchButton" type="button" selector="//*[@class='admin__data-grid-outer-wrap']/*[@class='admin__data-grid-header']//*[@class='data-grid-search-control-wrap']/button"/>
70-
<element name="createdProductID" type="select" selector="//*[@class='data-grid-checkbox-cell-inner']/input"/>
71-
<element name="actionSelectBox" type="button" selector="//*[@class='col-xs-2']//span[text()='Actions']"/>
72-
<element name="deleteButton" type="button" selector="//div[@class='col-xs-2']//*[text()='Delete']"/>
73-
<element name="okButton" type="button" selector=".action-primary.action-accept"/>
74-
<element name="clearAll" type="button" selector="//*[@class='admin__data-grid-outer-wrap']/*[@class='admin__data-grid-header']//*[contains(text(), 'Clear all')]"/>
75-
<element name="filterButton" type="button" selector="//*[@class='admin__data-grid-outer-wrap']/*[@class='admin__data-grid-header']//*[@class='data-grid-filters-action-wrap']/button"/>
76-
<element name="filterSKUField" type="input" selector="//*[@name='sku']"/>
77-
<element name="filtersApplyButton" type="button" selector="//*[contains(text(),'Apply Filters')]"/>
78-
</section>
79-
80-
<section name="DashboardSection">
81-
<element name="customerAllCustomer" type="button" selector="//*[@data-ui-id='menu-magento-customer-customer-manage']"/>
82-
<element name="customer" type="button" selector="#menu-magento-customer-customer"/>
83-
</section>
84-
85-
<section name="AdminCustomerAccInformationSection">
86-
<element name="searchToKeyword" type="input" selector="//*[@class='admin__data-grid-outer-wrap']/*[@class='admin__data-grid-header']//*[@class='data-grid-search-control-wrap']/input"/>
87-
<element name="searchButton" type="button" selector="//*[@class='admin__data-grid-outer-wrap']/*[@class='admin__data-grid-header']//*[@class='data-grid-search-control-wrap']/button"/>
88-
<element name="selectCustomer" type="checkbox" selector="//*[@class='admin__data-grid-wrap' and @data-role='grid-wrapper']//*[@class='data-grid-multicheck-cell']/div/label"/>
89-
<element name="actions" type="button" selector="//div[@class='admin__data-grid-header']//div[@class='col-xs-2']//span[text()='Actions']"/>
90-
<element name="delete" type="button" selector="//div[@class='col-xs-2']//span[text()='Delete']"/>
91-
<element name="confirm" type="button" selector=".action-primary.action-accept"/>
92-
<element name="filterButton" type="button" selector="//*[@class='admin__data-grid-outer-wrap']/*[@class='admin__data-grid-header']//*[@class='data-grid-filters-action-wrap']/button"/>
93-
<element name="filterNameField" type="input" selector="//*[@name='name']"/>
94-
<element name="filtersApplyButton" type="button" selector="//*[contains(text(),'Apply Filters')]"/>
95-
<element name="clearAll" type="button" selector="//*[@class='admin__data-grid-outer-wrap']/*[@class='admin__data-grid-header']//*[contains(text(), 'Clear all')]"/>
96-
</section>
97-
9816
</sections>

0 commit comments

Comments
 (0)