Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MFTF] add ReloadPageActionGroup #30223

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<!-- 2. Wait for session to expire. -->
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
<wait time="60" stepKey="waitForSessionLifetime"/>
<reloadPage stepKey="reloadPage"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/>

<!-- 3. Perform asserts. -->
<seeElement selector="{{AdminLoginFormSection.loginBlock}}" stepKey="assertAdminLoginPageIsAvailable"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<argument name="Customer" value="$$createCustomer$$" />
</actionGroup>
<wait time="60" stepKey="waitForCookieLifetime"/>
<reloadPage stepKey="reloadPage"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/>

<!-- 5. Perform asserts. -->
<seeElement selector="{{StorefrontPanelHeaderSection.customerLoginLink}}" stepKey="assertAuthorizationLinkIsVisibleOnStoreFront"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.captchaField}}" stepKey="seeCaptchaField"/>
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.captchaImg}}" stepKey="seeCaptchaImage"/>
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.captchaReload}}" stepKey="seeCaptchaReloadButton"/>
<reloadPage stepKey="refreshPage"/>
<waitForPageLoad stepKey="waitForPageLoad2"/>

<actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForPageLoad2" />

<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickCart2"/>
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout2"/>
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.email}}" stepKey="waitEmailFieldVisible2"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<magentoCLI command="cron:run" stepKey="runCron"/>

<!-- 5. Open category A on Storefront again -->
<reloadPage stepKey="reloadCategoryA"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadCategoryA"/>

<!-- Category A displays product A1 now -->
<see userInput="$$createCategoryA.name$$" selector="{{StorefrontCategoryMainSection.CategoryTitle}}" stepKey="seeTitleCategoryA1"/>
Expand Down Expand Up @@ -126,7 +126,7 @@
<magentoCLI command="cron:run" stepKey="runCron1"/>

<!-- 9. Open category A on Storefront again -->
<reloadPage stepKey="refreshCategoryAPage"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="refreshCategoryAPage"/>

<!-- Category A is empty now -->
<see userInput="$$createCategoryA.name$$" selector="{{StorefrontCategoryMainSection.CategoryTitle}}" stepKey="seeOnPageCategoryAName"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@

<!-- Assert single row - no hover state -->
<createData entity="ApiCategoryA" stepKey="createFirstCategoryBlank"/>
<reloadPage stepKey="refreshPage"/>
<waitForPageLoad stepKey="waitForBlankSingleRowAppear"/>

<actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForBlankSingleRowAppear"/>

<moveMouseOver selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createFirstCategoryBlank.name$$)}}" stepKey="hoverFirstCategoryBlank"/>
<dontSeeElement selector="{{StorefrontNavigationMenuSection.subItemLevelHover('level0')}}" stepKey="assertNoHoverState"/>

Expand Down Expand Up @@ -87,8 +89,9 @@
</createData>

<!-- Several rows. Hover on category without children -->
<reloadPage stepKey="reloadPage"/>
<waitForPageLoad stepKey="waitForBlankSeveralRowsAppear"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForBlankSeveralRowsAppear"/>

<moveMouseOver selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategoryWithoutChildrenBlank.name$$)}}" stepKey="hoverCategoryWithoutChildren"/>
<dontSeeElement selector="{{StorefrontNavigationMenuSection.itemByNameAndLevel($$createCategoryWithoutChildrenBlank.name$$, 'level0')}}" stepKey="dontSeeChildrenInCategory"/>

Expand Down Expand Up @@ -167,8 +170,9 @@
<createData entity="ApiCategory" stepKey="createFourthCategoryLuma"/>

<!-- Single row. No hover state -->
<reloadPage stepKey="reload"/>
<waitForPageLoad stepKey="waitForLumaSingleRowAppear"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reload"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForLumaSingleRowAppear"/>

<dontSeeElement selector="{{StorefrontNavigationMenuSection.itemByNameAndLevel($$createFirstCategoryLuma.name$$, 'level0')}}" stepKey="noHoverStateInFirstCategory"/>
<dontSeeElement selector="{{StorefrontNavigationMenuSection.itemByNameAndLevel($$createSecondCategoryLuma.name$$, 'level0')}}" stepKey="noHoverStateInSecondCategory"/>
<dontSeeElement selector="{{StorefrontNavigationMenuSection.itemByNameAndLevel($$createThirdCategoryLuma.name$$, 'level0')}}" stepKey="noHoverStateThirdCategory"/>
Expand Down Expand Up @@ -203,8 +207,9 @@
<createData entity="ApiCategory" stepKey="createEighthCategoryLuma"/>

<!-- Several rows. Hover on Category without children -->
<reloadPage stepKey="refresh"/>
<waitForPageLoad stepKey="waitForLumaSeveralRowsAppear"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="refresh"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForLumaSeveralRowsAppear"/>

<moveMouseOver selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createFifthCategoryLuma.name$$)}}" stepKey="hoverOnCategoryWithoutChildren"/>
<dontSeeElement selector="{{StorefrontNavigationMenuSection.itemByNameAndLevel($$createFifthCategoryLuma.name$$, 'level0')}}" stepKey="dontSeeSubcategoriesInCategory"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="guestGoToCheckoutFromMinicart" />
<selectOption stepKey="selectCounty" selector="{{CheckoutShippingSection.country}}" userInput="{{UK_Address.country_id}}"/>
<waitForPageLoad stepKey="waitFormToReload"/>
<reloadPage stepKey="refreshPage"/>
<waitForPageLoad stepKey="waitFormToReload1"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitFormToReload1" />
<fillField selector="{{CheckoutShippingSection.email}}" userInput="{{CustomerEntityOne.email}}" stepKey="enterEmail"/>
<fillField selector="{{CheckoutShippingSection.firstName}}" userInput="{{CustomerEntityOne.firstname}}" stepKey="enterFirstName"/>
<fillField selector="{{CheckoutShippingSection.lastName}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="enterLastName"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@

<!-- Back to the Checkout and refresh the page -->
<switchToPreviousTab stepKey="switchToPreviousTab"/>
<reloadPage stepKey="refreshPage"/>
<waitForPageLoad stepKey="waitPageReload"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitPageReload"/>

<!-- Payment step is opened after refreshing -->
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPaymentSection"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,9 @@
<actionGroup ref="CheckoutFillEstimateShippingAndTaxActionGroup" stepKey="fillEstimateShippingAndTaxFields">
<argument name="address" value="US_Address_NY_Default_Shipping"/>
</actionGroup>
<reloadPage stepKey="reloadThePage"/>
<waitForPageLoad stepKey="waitForPageToReload"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadThePage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForPageToReload"/>

<waitForText selector="{{CheckoutCartSummarySection.taxAmount}}" userInput="$9.60" time="90" stepKey="waitForTaxAmount"/>

<!--Select Free Shipping and proceed to checkout -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappearAfterFlatRateSelection"/>
<see selector="{{CheckoutCartSummarySection.total}}" userInput="15" stepKey="assertOrderTotalField"/>
<!-- 5. Refresh browser page (F5) -->
<reloadPage stepKey="reloadPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still may consider this change as BiC (there might be extensions with before/after references to this step key). The common (a little bit dirty but still common) practice, in this case, will be replacing the old action with a comment that has the same stepKey. Example is below

<comment userInput="Adding comment to replace reload action and preserve Backward Compatibility" stepKey="waitForPageLoad" />

Hope it makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rogyar
Done
Thank you for advice.

<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForPageLoad"/>
<actionGroup ref="StorefrontAssertCartEstimateShippingAndTaxActionGroup" stepKey="assertCartEstimateShippingAndTaxAfterPageReload"/>
<actionGroup ref="StorefrontAssertCartShippingMethodSelectedActionGroup" stepKey="assertFlatRateShippingMethodIsChecked">
<argument name="carrierCode" value="flatrate"/>
Expand All @@ -71,8 +71,9 @@
<!-- 9. Fill other fields -->
<actionGroup ref="StorefrontFillGuestShippingInfoActionGroup" stepKey="fillOtherFieldsInCheckoutShippingSection"/>
<!-- 10. Refresh browser page(F5) -->
<reloadPage stepKey="reloadCheckoutPage"/>
<waitForPageLoad stepKey="waitForCheckoutPageLoad"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadCheckoutPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForCheckoutPageLoad"/>

<actionGroup ref="StorefrontAssertGuestShippingInfoActionGroup" stepKey="assertGuestShippingPersistedInfoAfterReloadingCheckoutShippingPage"/>
<actionGroup ref="StorefrontAssertCheckoutShippingMethodSelectedActionGroup" stepKey="assertFreeShippingShippingMethodIsChecked">
<argument name="shippingMethod" value="Free Shipping"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@
<closeTab stepKey="closeTab"/>

<!--Check price-->
<reloadPage stepKey="reloadPage"/>
<waitForPageLoad stepKey="waitForCheckoutPageReload"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForCheckoutPageReload"/>
<conditionalClick selector="{{CheckoutPaymentSection.cartItemsArea}}" dependentSelector="{{CheckoutPaymentSection.cartItemsAreaActive}}" visible="false" stepKey="openItemProductBlock1"/>
<see userInput="$120.00" selector="{{CheckoutPaymentSection.orderSummarySubtotal}}" stepKey="checkSummarySubtotal1"/>
<see userInput="$120.00" selector="{{CheckoutPaymentSection.productItemPriceByName($$createSimpleProduct.name$$)}}" stepKey="checkItemPrice1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@
<argument name="attributeType" value="{{colorProductAttribute.input_type}}"/>
<argument name="scope" value="Global"/>
</actionGroup>
<reloadPage stepKey="reloadPage"/>
<waitForPageLoad stepKey="waitForProductPageReload"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForProductPageReload"/>

<click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickOnCreateConfigurations"/>
<waitForPageLoad stepKey="waitForFilters"/>
<actionGroup ref="CreateOptionsForAttributeActionGroup" stepKey="createOptions">
Expand Down Expand Up @@ -142,8 +143,9 @@
<argument name="attributeType" value="{{productAttributeColor.input_type}}"/>
<argument name="scope" value="Global"/>
</actionGroup>
<reloadPage stepKey="reloadDuplicatedProductPage"/>
<waitForPageLoad stepKey="waitForDuplicatedProductReload"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadDuplicatedProductPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForDuplicatedProductReload"/>

<click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="createConfigurationsDuplicatedProduct"/>
<waitForElementVisible selector="{{AdminGridSelectRows.multicheckDropdown}}" stepKey="waitForCreateConfigurationsPageLoad"/>
<click selector="{{AdminGridSelectRows.multicheckDropdown}}" stepKey="openMulticheckDropdown"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
<argument name="indices" value=""/>
</actionGroup>
<reloadPage stepKey="reloadPage"/>
<waitForPageLoad stepKey="waitForLoad2"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForLoad2"/>

<click selector="{{AdminCustomerFiltersSection.filtersButton}}" stepKey="openFilter"/>
<fillField userInput="{{CustomerEntityOne.email}}" selector="{{AdminCustomerFiltersSection.emailInput}}" stepKey="filterEmail"/>
<click selector="{{AdminCustomerFiltersSection.apply}}" stepKey="applyFilter"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@

<!-- 5. Open admin tab with page with products. Reload this page twice. -->
<switchToPreviousTab stepKey="switchToPreviousTab"/>
<reloadPage stepKey="reloadAdminCatalogPageFirst"/>
<waitForPageLoad stepKey="waitForReloadFirst"/>
<reloadPage stepKey="reloadAdminCatalogPageSecond"/>
<waitForPageLoad stepKey="waitForReloadSecond"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadAdminCatalogPageFirst"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForReloadFirst"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadAdminCatalogPageSecond"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForReloadSecond"/>

<seeInTitle userInput="Products / Inventory / Catalog / Magento Admin" stepKey="seeAdminProductsPageTitle"/>
<see userInput="Products" selector="{{AdminHeaderSection.pageTitle}}" stepKey="seeAdminProductsPageHeader"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
<actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="goToShoppingCartFromMinicart"/>
<!--Reset cookies and refresh the page-->
<resetCookie userInput="PHPSESSID" stepKey="resetCookieForCart"/>
<reloadPage stepKey="reloadPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForPageLoad"/>
<!--Check product exists in cart-->
<see userInput="$$createProduct.name$$" stepKey="ProductExistsInCart"/>
</test>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@
<closeTab stepKey="closeTab"/>
<!-- Check cart -->
<wait time="60" stepKey="waitForCartToBeUpdated"/>
<reloadPage stepKey="reloadPage"/>
<waitForPageLoad stepKey="waitForCheckoutPageReload"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForCheckoutPageReload"/>
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickMiniCart"/>
<dontSeeElement selector="{{StorefrontMinicartSection.quantity}}" stepKey="dontSeeCartItem"/>
<!-- Add simple product to shopping cart -->
Expand All @@ -151,8 +151,9 @@
<closeTab stepKey="closeTab2"/>
<!--Check cart-->
<wait time="60" stepKey="waitForCartToBeUpdated2"/>
<reloadPage stepKey="reloadPage2"/>
<waitForPageLoad stepKey="waitForCheckoutPageReload2"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="reloadPage2"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForCheckoutPageReload2"/>

<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickMiniCart2"/>
<dontSeeElement selector="{{StorefrontMinicartSection.quantity}}" stepKey="dontSeeCartItem2"/>
</test>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
<argument name="consumerName" value="{{AdminCodeGeneratorMessageConsumerData.consumerName}}"/>
<argument name="maxMessages" value="{{AdminCodeGeneratorMessageConsumerData.messageLimit}}"/>
</actionGroup>
<reloadPage stepKey="refreshPage"/>
<waitForPageLoad stepKey="waitFormToReload1"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitFormToReload1"/>
<click selector="{{AdminCartPriceRulesFormSection.manageCouponCodesHeader}}" stepKey="expandCouponSection2"/>

<!-- Assert coupon codes grid header is correct -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
<argument name="consumerName" value="{{AdminCodeGeneratorMessageConsumerData.consumerName}}"/>
<argument name="maxMessages" value="{{AdminCodeGeneratorMessageConsumerData.messageLimit}}"/>
</actionGroup>
<reloadPage stepKey="refreshPage"/>
<waitForPageLoad stepKey="waitFormToReload1"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitFormToReload1"/>
<conditionalClick selector="{{AdminCartPriceRulesFormSection.manageCouponCodesHeader}}"
dependentSelector="{{AdminCartPriceRulesFormSection.manageCouponCodesHeader}}" visible="true"
stepKey="clickManageCouponCodes2"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@
</actionGroup>

<!-- Verify swatch tooltips are not visible -->
<reloadPage stepKey="refreshPage"/>
<waitForPageLoad stepKey="waitForPageReload"/>
<actionGroup ref="ReloadPageActionGroup" stepKey="refreshPage"/>
<comment userInput="Replacing reload action and preserve Backward Compatibility" stepKey="waitForPageReload"/>
<moveMouseOver selector="{{StorefrontProductInfoMainSection.nthSwatchOption('1')}}" stepKey="hoverDisabledSwatch"/>
<wait time="1" stepKey="waitForTooltip2"/>
<dontSeeElement selector="{{StorefrontProductInfoMainSection.swatchOptionTooltip}}" stepKey="swatchTooltipNotVisible"/>
Expand Down
Loading