Skip to content

Commit

Permalink
Merge pull request magento#4248 from magento-tsg/2.3-develop-pr50
Browse files Browse the repository at this point in the history
[TSG] Fixes for 2.3 (pr50) (2.3-develop)
  • Loading branch information
zakdma authored May 24, 2019
2 parents 4543354 + 32ce962 commit c2e834d
Show file tree
Hide file tree
Showing 22 changed files with 174 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,34 @@
<arguments>
<argument name="rowIndex" type="string"/>
</arguments>
<reloadPage stepKey="refreshPage"/>
<waitForPageLoad stepKey="waitFormReload"/>
<amOnPage url="{{AdminExportIndexPage.url}}" stepKey="goToExportIndexPage"/>
<click stepKey="clickSelectBtn" selector="{{AdminExportAttributeSection.selectByIndex(rowIndex)}}"/>
<click stepKey="clickOnDelete" selector="{{AdminExportAttributeSection.delete(rowIndex)}}" after="clickSelectBtn"/>
<waitForElementVisible selector="{{AdminProductGridConfirmActionSection.title}}" stepKey="waitForConfirmModal"/>
<click selector="{{AdminProductGridConfirmActionSection.ok}}" stepKey="confirmDelete"/>
<waitForPageLoad stepKey="waitForExportDataDeleted" />
<waitForElementVisible selector="{{AdminDataGridTableSection.dataGridEmpty}}" stepKey="waitDataGridEmptyMessageAppears"/>
<see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="assertDataGridEmptyMessage"/>
</actionGroup>

<actionGroup name="deleteAllExportedFiles">
<amOnPage url="{{AdminExportIndexPage.url}}" stepKey="goToExportIndexPage"/>
<executeInSelenium
function="
function ($webdriver) use ($I) {
$buttons = $webdriver->findElements(\Facebook\WebDriver\WebDriverBy::xpath('//tr[@data-repeat-index=\'0\']//button'));
while(!empty($buttons)) {
$buttons[0]->click();
$I->waitForElementVisible('//tr[@data-repeat-index=\'0\']//a[text()=\'Delete\']', 10);
$deleteButton = $webdriver->findElement(\Facebook\WebDriver\WebDriverBy::xpath('//tr[@data-repeat-index=\'0\']//a[text()=\'Delete\']'));
$deleteButton->click();
$I->waitForElementVisible('.modal-popup.confirm button.action-accept', 10);
$I->click('.modal-popup.confirm button.action-accept');
$I->waitForPageLoad(60);
$buttons = $webdriver->findElements(\Facebook\WebDriver\WebDriverBy::xpath('//tr[@data-repeat-index=\'0\']//button'));
}
}"
stepKey="deleteAllExportedFilesOneByOne"/>
<waitForElementVisible selector="{{AdminDataGridTableSection.dataGridEmpty}}" stepKey="waitDataGridEmptyMessageAppears"/>
<see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="assertDataGridEmptyMessage"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,15 @@
<requiredEntity createDataKey="secondSimpleProductForFixedWithAttribute"/>
</createData>

<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

<!-- Run cron twice -->
<magentoCLI command="cron:run" stepKey="runCron1"/>
<magentoCLI command="cron:run" stepKey="runCron2"/>

<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
<actionGroup ref="deleteAllExportedFiles" stepKey="clearExportedFilesList"/>
</before>
<after>
<!-- Delete exported file -->
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
<argument name="rowIndex" value="0"/>
</actionGroup>

<!-- Delete products creations -->
<deleteData createDataKey="createDynamicBundleProduct" stepKey="deleteDynamicBundleProduct"/>
<deleteData createDataKey="firstSimpleProductForDynamic" stepKey="deleteFirstSimpleProductForDynamic"/>
Expand All @@ -105,6 +101,10 @@
<deleteData createDataKey="secondSimpleProductForFixedWithAttribute" stepKey="deleteSecondSimpleProductForFixedWithAttribute"/>
<deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/>

<!-- Delete exported file -->
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
<argument name="rowIndex" value="0"/>
</actionGroup>
<!-- Log out -->
<actionGroup ref="logout" stepKey="logout"/>
</after>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,15 @@
<requiredEntity createDataKey="createSecondSimpleProduct"/>
</updateData>

<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

<!-- Run cron twice -->
<magentoCLI command="cron:run" stepKey="runCron1"/>
<magentoCLI command="cron:run" stepKey="runCron2"/>

<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
<actionGroup ref="deleteAllExportedFiles" stepKey="clearExportedFilesList"/>
</before>
<after>
<!-- Delete exported file -->
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
<argument name="rowIndex" value="0"/>
</actionGroup>

<!-- Deleted created products -->
<deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteFirstSimpleProduct"/>
<deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/>
Expand All @@ -69,6 +65,10 @@
<!-- Delete category -->
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>

<!-- Delete exported file -->
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
<argument name="rowIndex" value="0"/>
</actionGroup>
<!-- Log out -->
<actionGroup ref="logout" stepKey="logout"/>
</after>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,26 +73,26 @@
<requiredEntity createDataKey="createConfigSecondChildProduct"/>
</createData>

<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

<!-- Run cron twice -->
<magentoCLI command="cron:run" stepKey="runCron1"/>
<magentoCLI command="cron:run" stepKey="runCron2"/>

<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
<actionGroup ref="deleteAllExportedFiles" stepKey="clearExportedFilesList"/>
</before>
<after>
<!-- Delete exported file -->
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
<argument name="rowIndex" value="0"/>
</actionGroup>

<!-- Delete configurable product creation -->
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
<deleteData createDataKey="createConfigFirstChildProduct" stepKey="deleteConfigFirstChildProduct"/>
<deleteData createDataKey="createConfigSecondChildProduct" stepKey="deleteConfigSecondChildProduct"/>
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>

<!-- Delete exported file -->
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
<argument name="rowIndex" value="0"/>
</actionGroup>
<!-- Log out -->
<actionGroup ref="logout" stepKey="logout"/>
</after>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,26 @@
<requiredEntity createDataKey="createConfigProduct"/>
</createData>

<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

<!-- Run cron twice -->
<magentoCLI command="cron:run" stepKey="runCron1"/>
<magentoCLI command="cron:run" stepKey="runCron2"/>

<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
<actionGroup ref="deleteAllExportedFiles" stepKey="clearExportedFilesList"/>
</before>
<after>
<!-- Delete exported file -->
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
<argument name="rowIndex" value="0"/>
</actionGroup>

<!-- Delete configurable product creation -->
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
<deleteData createDataKey="createConfigFirstChildProduct" stepKey="deleteConfigFirstChildProduct"/>
<deleteData createDataKey="createConfigSecondChildProduct" stepKey="deleteConfigSecondChildProduct"/>
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>

<!-- Delete exported file -->
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
<argument name="rowIndex" value="0"/>
</actionGroup>
<!-- Log out -->
<actionGroup ref="logout" stepKey="logout"/>
</after>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,15 @@
<requiredEntity createDataKey="createConfigSecondChildProduct"/>
</createData>

<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

<!-- Run cron twice -->
<magentoCLI command="cron:run" stepKey="runCron1"/>
<magentoCLI command="cron:run" stepKey="runCron2"/>

<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
<actionGroup ref="deleteAllExportedFiles" stepKey="clearExportedFilesList"/>
</before>
<after>
<!-- Delete exported file -->
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
<argument name="rowIndex" value="0"/>
</actionGroup>

<!-- Delete simple product -->
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>

Expand All @@ -94,6 +90,10 @@
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>

<!-- Delete exported file -->
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
<argument name="rowIndex" value="0"/>
</actionGroup>
<!-- Log out -->
<actionGroup ref="logout" stepKey="logout"/>
</after>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,24 @@
<requiredEntity createDataKey="createAttributeSet"/>
</createData>

<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

<!-- Run cron twice -->
<magentoCLI command="cron:run" stepKey="runCron1"/>
<magentoCLI command="cron:run" stepKey="runCron2"/>

<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
<actionGroup ref="deleteAllExportedFiles" stepKey="clearExportedFilesList"/>
</before>
<after>
<!-- Delete exported file -->
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
<argument name="rowIndex" value="0"/>
</actionGroup>

<!-- Delete product creations -->
<deleteData createDataKey="createSimpleProductWithCustomAttributeSet" stepKey="deleteSimpleProductWithCustomAttributeSet"/>
<deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>

<!-- Delete exported file -->
<actionGroup ref="deleteExportedFile" stepKey="deleteExportedFile">
<argument name="rowIndex" value="0"/>
</actionGroup>
<!-- Log out -->
<actionGroup ref="logout" stepKey="logout"/>
</after>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
<argument name="total" type="string"/>
</arguments>
<seeInCurrentUrl url="{{CheckoutCartPage.url}}" stepKey="assertUrl"/>
<waitForPageLoad stepKey="waitForCartPage"/>
<see userInput="{{subtotal}}" selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="assertSubtotal"/>
<waitForPageLoad stepKey="waitForPageToLoad"/>
<see userInput="{{total}}" selector="{{CheckoutCartSummarySection.total}}" stepKey="assertTotal"/>
<waitForElementVisible selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="waitForSubtotalVisible"/>
<see selector="{{CheckoutCartSummarySection.subtotal}}" userInput="{{subtotal}}" stepKey="assertSubtotal"/>
<waitForElementVisible selector="{{CheckoutCartSummarySection.total}}" stepKey="waitForTotalVisible"/>
<waitForElementVisible selector="{{CheckoutCartSummarySection.totalAmount(total)}}" stepKey="waitForTotalAmountVisible"/>
<see selector="{{CheckoutCartSummarySection.total}}" userInput="{{total}}" stepKey="assertTotal"/>
<seeElement selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="seeProceedToCheckoutButton"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
<arguments>
<argument name="shipping" type="string"/>
</arguments>
<waitForLoadingMaskToDisappear stepKey="waitForMaskToDisappear" after="assertSubtotal"/>
<waitForElementVisible selector="{{CheckoutCartSummarySection.shipping}}" time="60" stepKey="waitForElementToBeVisible" after="waitForMaskToDisappear"/>
<wait time="5" stepKey="waitForShippingDetailsToLoad" after="waitForElementToBeVisible"/>
<waitForText userInput="{{shipping}}" selector="{{CheckoutCartSummarySection.shipping}}" time="120" stepKey="assertShipping" after="waitForShippingDetailsToLoad"/>
<waitForElementVisible selector="{{CheckoutCartSummarySection.shipping}}" time="30" after="assertSubtotal" stepKey="waitForShippingPriceToBeVisible"/>
<waitForElementVisible selector="{{CheckoutCartSummarySection.shippingAmount(shipping)}}" time="30" after="waitForShippingPriceToBeVisible" stepKey="waitForShippingPriceAmountVisible"/>
<see userInput="{{shipping}}" selector="{{CheckoutCartSummarySection.shipping}}" after="waitForShippingPriceAmountVisible" stepKey="assertShipping"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
<element name="shippingMethodForm" type="text" selector="#co-shipping-method-form"/>
<element name="shippingMethod" type="text" selector="//*[@id='cart-totals']//tr[@class='totals shipping excl']//th//span[@class='value']"/>
<element name="shipping" type="text" selector="//*[@id='cart-totals']//tr[@class='totals shipping excl']//td//span[@class='price']"/>
<element name="total" type="text" selector="//*[@id='cart-totals']//tr[@class='grand totals']//td//span[@class='price']" timeout="10"/>
<element name="shippingAmount" type="text" selector="//*[@id='cart-totals']//tr[@class='totals shipping excl']//td//span[@class='price' and contains(text(), '{{amount}}')]" parameterized="true"/>
<element name="total" type="text" selector="//*[@id='cart-totals']//tr[@class='grand totals']//td//span[@class='price']"/>
<element name="totalAmount" type="text" selector="//*[@id='cart-totals']//tr[@class='grand totals']//td//span[@class='price' and contains(text(), '{{amount}}')]" parameterized="true"/>
<element name="proceedToCheckout" type="button" selector=".action.primary.checkout span" timeout="30"/>
<element name="discountAmount" type="text" selector="td[data-th='Discount']"/>
<element name="shippingHeading" type="button" selector="#block-shipping-heading"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@
<!--Assert Shopping Cart Summary-->
<actionGroup ref="AssertStorefrontShoppingCartSummaryWithShippingActionGroup" stepKey="AssertCartSummary" >
<argument name="subtotal" value="$100.00"/>
<argument name="shipping" value="$10.00"/>
<argument name="total" value="$110.00"/>
<argument name="shipping" value="10.00"/>
<argument name="total" value="110.00"/>
</actionGroup>

<!--Assert Product items in cart -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
<!--Assert Shopping Cart Summary-->
<actionGroup ref="AssertStorefrontShoppingCartSummaryWithShippingActionGroup" stepKey="AssertCartSummary" >
<argument name="subtotal" value="$100.00"/>
<argument name="shipping" value="$10.00"/>
<argument name="total" value="$110.00"/>
<argument name="shipping" value="10.00"/>
<argument name="total" value="110.00"/>
</actionGroup>

<!--Enabled Shopping Cart Sidebar -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@
<!--Assert Shopping Cart Summary -->
<actionGroup ref="AssertStorefrontShoppingCartSummaryWithShippingActionGroup" stepKey="AssertCartSummary" >
<argument name="subtotal" value="$40.00"/>
<argument name="shipping" value="$10.00"/>
<argument name="total" value="$50.00"/>
<argument name="shipping" value="10.00"/>
<argument name="total" value="50.00"/>
</actionGroup>

<!--Assert Product Details In Checkout cart -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<!--Assert Shopping Cart Summary-->
<actionGroup ref="AssertStorefrontShoppingCartSummaryItemsActionGroup" stepKey="AssertCartSummary" >
<argument name="subtotal" value="$123.00"/>
<argument name="total" value="$123.00"/>
<argument name="total" value="123.00"/>
</actionGroup>

<!--Assert Product Details In Checkout cart -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@
<!--Assert Shopping Cart Summary-->
<actionGroup ref="AssertStorefrontShoppingCartSummaryWithShippingActionGroup" stepKey="AssertCartSummary" >
<argument name="subtotal" value="$1,400.00"/>
<argument name="shipping" value="$30.00"/>
<argument name="total" value="$1,430.00"/>
<argument name="shipping" value="30.00"/>
<argument name="total" value="1,430.00"/>
</actionGroup>

<!-- Assert product1 details in Mini Cart -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
<!--Assert Shopping Cart Summary-->
<actionGroup ref="AssertStorefrontShoppingCartSummaryWithShippingActionGroup" stepKey="AssertCartSummary" >
<argument name="subtotal" value="$50.00"/>
<argument name="shipping" value="$5.00"/>
<argument name="total" value="$55.00"/>
<argument name="shipping" value="5.00"/>
<argument name="total" value="55.00"/>
</actionGroup>

<!--Assert Product items in cart -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
<!--Assert Shopping Cart Summary-->
<actionGroup ref="AssertStorefrontShoppingCartSummaryWithShippingActionGroup" stepKey="AssertCartSummary" >
<argument name="subtotal" value="$60.00"/>
<argument name="shipping" value="$5.00"/>
<argument name="total" value="$65.00"/>
<argument name="shipping" value="5.00"/>
<argument name="total" value="65.00"/>
</actionGroup>

<!--Assert Product items in cart -->
Expand Down
Loading

0 comments on commit c2e834d

Please sign in to comment.