Skip to content

Commit

Permalink
Apply review notes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartlomiejsz committed Apr 30, 2020
1 parent 7630cb0 commit 0de77c8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AssertStorefrontCategoryCurrentPageIsFirstActionGroup">
<actionGroup name="AssertStorefrontCategoryCurrentPageIsNthActionGroup">
<arguments>
<argument name="expectedPage" type="string"/>
</arguments>

<grabTextFrom selector="{{StorefrontCategoryBottomToolbarSection.currentPage}}" stepKey="currentPageText"/>
<assertEquals stepKey="assertIsPageFirst">
<expectedResult type="string">1</expectedResult>
<assertEquals stepKey="assertIsPageNth">
<expectedResult type="string">{{expectedPage}}</expectedResult>
<actualResult type="variable">currentPageText</actualResult>
</assertEquals>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<!-- Navigates storefront category next page from toolbar -->
<actionGroup name="StorefrontNavigateCategoryNextPageActionGroup">
<annotations>
<description>Navigates storefront category next page from toolbar</description>
</annotations>
<scrollTo selector="{{StorefrontCategoryBottomToolbarSection.nextPage}}" stepKey="scrollToNextButton"/>
<click selector="{{StorefrontCategoryBottomToolbarSection.nextPage}}" stepKey="clickOnNextPage"/>
<waitForPageLoad stepKey="waitForNextCategoryPageLoad"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<actionGroup ref="AddTextSwatchToProductActionGroup" stepKey="addSwatchAttribute">
<argument name="usedInLayeredNavigation" value="1"/>
</actionGroup>
<magentoCLI command="cache:clean block_html collections config full_page" stepKey="cleanInvalidatedCaches"/>
</before>

<after>
Expand All @@ -48,7 +47,7 @@

<magentoCLI command="config:set catalog/frontend/grid_per_page 12" stepKey="setDefaultProductsPerPage"/>
<magentoCLI command="config:set catalog/frontend/grid_per_page_values 12,24,36" stepKey="setDefaultGridPerPage"/>
<magentoCLI command="cache:clean block_html collections config full_page" stepKey="cleanInvalidatedCaches"/>
<magentoCLI command="cache:clean config full_page" stepKey="cleanInvalidatedCaches"/>

<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
<deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct1"/>
Expand Down Expand Up @@ -97,6 +96,8 @@
<click selector="{{StorefrontCategorySidebarSection.attributeNthOption(textSwatchAttribute.attribute_code, '1')}}" stepKey="filterBySwatch1"/>
<waitForPageLoad stepKey="waitForPageToLoad2"/>

<actionGroup ref="AssertStorefrontCategoryCurrentPageIsFirstActionGroup" stepKey="assertCurrentPageIsFirst"/>
<actionGroup ref="AssertStorefrontCategoryCurrentPageIsNthActionGroup" stepKey="assertCurrentPageIsFirst">
<argument name="expectedPage" value="1"/>
</actionGroup>
</test>
</tests>

0 comments on commit 0de77c8

Please sign in to comment.