Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 80abb23

Browse files
authored
Merge pull request #53 from magento-epam/MAGETWO-66666
MAGETWO-66666: Adding a product to cart from category page with an ex…
2 parents 830007d + 4ec730c commit 80abb23

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontAddProductToCardActionGroup.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,13 @@
4141
<see userInput="Shipping Address" stepKey="seeShippingAddress"/>
4242
</actionGroup>
4343

44-
<actionGroup name="DeleteCreatedProduct">
45-
<fillField stepKey="searchToKeyword" selector="{{DeleteCreatedProduct.searchToKeyword}}" userInput="{{SimpleProductOne.name}}"/>
46-
<click stepKey="clickSearchButton" selector="{{DeleteCreatedProduct.searchButton}}"/>
47-
<wait stepKey="waitForFiltering" time="2"/>
44+
<actionGroup name="DeleteCreatedProductActionGroup">
45+
<conditionalClick selector="{{DeleteCreatedProduct.clearAll}}" dependentSelector="{{DeleteCreatedProduct.clearAll}}" visible="1" stepKey="clickClearAllIfThereIsAnyValue"/>
46+
<click stepKey="clickFilterButton" selector="{{DeleteCreatedProduct.filterButton}}"/>
47+
<waitForElementVisible selector="{{DeleteCreatedProduct.filterSKUField}}" stepKey="waitForFilterDataLoaded"/>
48+
<fillField stepKey="searchProductUsingSKUField" selector="{{DeleteCreatedProduct.filterSKUField}}" userInput="{{SimpleProductOne.sku}}"/>
49+
<click stepKey="clickFiltersApplyButton" selector="{{DeleteCreatedProduct.filtersApplyButton}}"/>
50+
<waitForElementNotVisible selector="{{DeleteCreatedProduct.filterSKUField}}" stepKey="waitForFilterBecomeNotVisible"/>
4851
<click selector="{{DeleteCreatedProduct.createdProductID}}" stepKey="selectCreatedProduct"/>
4952
<wait stepKey="waitSelectCreatedProduct" time="2"/>
5053
<waitForElementVisible selector="{{DeleteCreatedProduct.actionSelectBox}}" stepKey="waitToSelectActionVisible" time="50"/>

app/code/Magento/Customer/Test/Mftf/Section/StorefrontAddProductToCardSection.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@
6868
<element name="deleteButton" type="button" selector="//div[@class='col-xs-2']//*[text()='Delete']"/>
6969
<element name="okButton" type="button" selector=".action-primary.action-accept"/>
7070
<element name="clearAll" type="button" selector="//*[@class='admin__data-grid-outer-wrap']/*[@class='admin__data-grid-header']//*[contains(text(), 'Clear all')]"/>
71+
<element name="filterButton" type="button" selector="//*[@class='admin__data-grid-outer-wrap']/*[@class='admin__data-grid-header']//*[@class='data-grid-filters-action-wrap']/button"/>
72+
<element name="filterSKUField" type="input" selector="//*[@name='sku']"/>
73+
<element name="filtersApplyButton" type="button" selector="//*[contains(text(),'Apply Filters')]"/>
7174
</section>
7275

7376
</sections>

app/code/Magento/Customer/Test/Mftf/Test/AddingProductWithExpiredSessionTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<!--Delete created product-->
4343
<amOnPage url="/admin" stepKey="GoToDashboard"/>
4444
<actionGroup ref="GoToProductPage" stepKey="againGoToProductPage"/>
45-
<actionGroup ref="DeleteCreatedProduct" stepKey="deleteCreatedProduct"/>
45+
<actionGroup ref="DeleteCreatedProductActionGroup" stepKey="deleteCreatedProduct"/>
4646
</after>
4747

4848
</test>

0 commit comments

Comments
 (0)