Skip to content

Commit

Permalink
ENGCOM-6825: HOTFIX: #26607 Fix failing CI due to Functional Tests #2…
Browse files Browse the repository at this point in the history
  • Loading branch information
lenaorobei authored Feb 14, 2020
2 parents 3425311 + f48110d commit e4dd671
Show file tree
Hide file tree
Showing 24 changed files with 142 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
<conditionalClick selector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDropdown}}" dependentSelector="{{AdminProductFormRelatedUpSellCrossSellSection.relatedDependent}}" visible="false" stepKey="openDropDownIfClosedRelatedSee"/>
<see selector="{{AdminProductFormRelatedUpSellCrossSellSection.selectedRelatedProduct}}" userInput="$$simpleProduct1.sku$$" stepKey="seeRelatedProduct"/>

<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>

<!--See related product in storefront-->
<amOnPage url="{{BundleProduct.sku}}.html" stepKey="goToStorefront"/>
<waitForPageLoad stepKey="waitForStorefront"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
</actionGroup>
<actionGroup ref="logout" stepKey="logoutAsAdmin"/>

<!-- Run reindex -->
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
</before>
<after>
<deleteData createDataKey="createBundleProductCreateBundleProduct" stepKey="deleteDynamicBundleProduct"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<actionGroup ref="LoginAsAdmin" stepKey="login"/>
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>

<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
</before>
<after>
<!-- Delete the bundled product -->
Expand Down Expand Up @@ -89,6 +91,10 @@

<!-- Save product and go to storefront -->
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>

<wait stepKey="waitBeforeIndexerAfterBundle" time="60"/>
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexerAfterBundle"/>

<amOnPage url="{{BundleProduct.sku}}.html" stepKey="goToStorefront"/>
<waitForPageLoad stepKey="waitForStorefront"/>
<click selector="{{StorefrontBundledSection.addToCart}}" stepKey="clickCustomize"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@
<click stepKey="saveProductBundle" selector="{{AdminProductFormActionSection.saveButton}}"/>
<see stepKey="assertSuccess" selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product."/>

<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>

<!-- Go to the storefront bundled product page -->
<amOnPage url="/{{BundleProduct.urlKey}}.html" stepKey="visitStoreFrontBundle"/>
<waitForPageLoad stepKey="waitForStorefront"/>
Expand Down
131 changes: 66 additions & 65 deletions app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
<createData entity="SimpleProduct2" stepKey="simpleProduct4"/>
<createData entity="SimpleProduct2" stepKey="simpleProduct5"/>
<createData entity="SimpleProduct2" stepKey="simpleProduct6"/>

<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
</before>
<after>
<!-- Delete simple product -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<argument name="ruleName" type="string" defaultValue="CustomCatalogRule.name"/>
</arguments>
<amOnPage url="{{AdminCatalogPriceRuleGridPage.url}}" stepKey="goToAdminCatalogPriceRuleGridPage"/>
<waitForPageLoad stepKey="waitForAdminCatalogPriceRuleGridPageLoad"/>
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingFilters"/>
<fillField selector="{{AdminCatalogPriceRuleGridSection.filterByRuleName}}" userInput="{{ruleName}}" stepKey="filterByRuleName"/>
<click selector="{{AdminDataGridHeaderSection.applyFilters}}" stepKey="clickSearch"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<before>
<!--Create a product-->
<createData entity="SimpleProduct2" stepKey="createProduct"/>

<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
</before>
<after>
<!--Delete created data-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
</entity>
<entity name="ApiConfigurableProduct" type="product">
<data key="name" unique="suffix">API Configurable Product</data>
<data key="sku" unique="suffix">api-configurable-product</data>
<data key="urlKey" unique="suffix">api-configurable-product</data>
<data key="type_id">configurable</data>
<data key="attribute_set_id">4</data>
<data key="visibility">4</data>
<data key="name" unique="suffix">API Configurable Product</data>
<data key="urlKey" unique="suffix">api-configurable-product</data>
<data key="price">123.00</data>
<data key="weight">2</data>
<data key="status">1</data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
</annotations>
<before>
<createData entity="ApiCategory" stepKey="createCategory"/>

<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
</before>
<after>
<!-- Delete configurable product -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
</arguments>

<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStorefrontPage"/>
<waitForElementVisible selector="{{StorefrontPanelHeaderSection.createAnAccountLink}}" stepKey="waitForCreateAccountLink"/>
<click stepKey="clickOnCreateAccountLink" selector="{{StorefrontPanelHeaderSection.createAnAccountLink}}"/>
<fillField stepKey="fillFirstName" userInput="{{Customer.firstname}}" selector="{{StorefrontCustomerCreateFormSection.firstnameField}}"/>
<fillField stepKey="fillLastName" userInput="{{Customer.lastname}}" selector="{{StorefrontCustomerCreateFormSection.lastnameField}}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
<!-- Save product -->
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>

<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>

<!-- Go to storefront category page -->
<amOnPage url="$$createCategory.name$$.html" stepKey="amOnCategoryPage"/>
<waitForPageLoad stepKey="waitForCategoryPageLoad"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
<argument name="product" value="DownloadableProduct"/>
</actionGroup>

<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>

<!--See related product in storefront-->
<amOnPage url="{{DownloadableProduct.sku}}.html" stepKey="goToStorefront"/>
</test>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
<argument name="product" value="GroupedProduct"/>
</actionGroup>

<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>

<!--See related product in storefront-->
<amOnPage url="{{GroupedProduct.sku}}.html" stepKey="goToStorefront"/>
</test>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<waitForPageLoad stepKey="waitForLoadingCreditMemoPage" after="pushButtonCreditMemo"/>
<scrollTo selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="scrollToBottom" after="waitForLoadingCreditMemoPage"/>
<click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="clickSubmitRefund" after="scrollToBottom"/>
<waitForPageLoad stepKey="waitForMainOrderPageLoad" after="clickSubmitRefund"/>
<waitForPageLoad stepKey="waitForMainOrderPageLoad" after="clickSubmitRefund" time="60"/>
<see userInput="You created the credit memo." stepKey="seeCreditMemoMessage" after="waitForMainOrderPageLoad"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<section name="AdminOrderDetailsMainActionsSection">
<element name="back" type="button" selector="#back" timeout="30"/>
<element name="cancel" type="button" selector="#order-view-cancel-button" timeout="30"/>
<element name="orderEntityId" type="input" selector="#sales_order_view input[name='order_id']" timeout="30"/>
<element name="sendEmail" type="button" selector="#send_notification" timeout="30"/>
<element name="creditMemo" type="button" selector="#order_creditmemo" timeout="30"/>
<element name="hold" type="button" selector="#order-view-hold-button" timeout="30"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@
<group value="catalogRule"/>
</annotations>
<before>
<!--Create the catalog price rule -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

<createData entity="CatalogRuleToPercent" stepKey="createCatalogRule"/>
<!--Create product-->
<createData entity="SimpleProduct2" stepKey="createSimpleProductApi"/>

<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>

<!--Create order via API-->
<createData entity="GuestCart" stepKey="createGuestCart"/>
<createData entity="SimpleCartItem" stepKey="addCartItem">
Expand All @@ -36,8 +39,6 @@
<updateData createDataKey="createGuestCart" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformation">
<requiredEntity createDataKey="createGuestCart"/>
</updateData>
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
<magentoCLI command="cache:flush" stepKey="flushCache"/>
<!--END Create order via API-->
</before>
<after>
Expand All @@ -52,8 +53,6 @@
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearGridFilter"/>
<actionGroup ref="logout" stepKey="logout"/>
</after>
<!-- Login as admin -->
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
<!--Open order page by Id-->
<amOnPage url="{{AdminOrderPage.url($createGuestCart.return$)}}" stepKey="navigateToOrderPage"/>
<waitForPageLoad stepKey="waitForCreatedOrderPage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
<requiredEntity createDataKey="createConfigProduct"/>
<requiredEntity createDataKey="createConfigChildProduct2"/>
</createData>

<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>

<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
</before>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
<page name="AdminShipmentNewPage" url="order_shipment/new/order_id/" area="admin" module="Shipping">
<page name="AdminShipmentNewPage" url="admin/order_shipment/new/order_id/" area="admin" module="Shipping">
<section name="AdminShipmentMainActionsSection"/>
<section name="AdminShipmentOrderInformationSection"/>
<section name="AdminShipmentAddressInformationSection"/>
<section name="AdminShipmentPaymentShippingSection"/>
<section name="AdminShipmentItemsSection"/>
<section name="AdminShipmentTotalSection"/>
</page>
</pages>
</pages>
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
</actionGroup>

<click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/>
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>

<!-- Fill out form for a new user with address -->
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser">
Expand Down Expand Up @@ -275,6 +276,8 @@
</actionGroup>

<click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/>

<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
</before>
<after>
<!-- Go to the tax rule page and delete the row we created-->
Expand Down Expand Up @@ -385,6 +388,8 @@
</actionGroup>

<click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/>

<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
</before>
<after>
<!-- Go to the tax rule page and delete the row we created-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
</actionGroup>

<click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/>

<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
</before>
<after>
<!-- Go to the tax rule page and delete the row we created-->
Expand Down Expand Up @@ -146,14 +148,7 @@

<click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/>

<!-- Fill out form for a new user with address -->
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser">
<argument name="Customer" value="Simple_US_Customer_NY"/>
</actionGroup>

<actionGroup ref="EnterCustomerAddressInfo" stepKey="enterAddressInfo">
<argument name="Address" value="US_Address_NY"/>
</actionGroup>
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
</before>
<after>
<!-- Go to the tax rule page and delete the row we created-->
Expand Down Expand Up @@ -186,6 +181,15 @@
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
</after>

<!-- Fill out form for a new user with address -->
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser">
<argument name="Customer" value="Simple_US_Customer_NY"/>
</actionGroup>

<actionGroup ref="EnterCustomerAddressInfo" stepKey="enterAddressInfo">
<argument name="Address" value="US_Address_NY"/>
</actionGroup>

<!-- Go to the created product page and add it to the cart -->
<amOnPage url="$$simpleProduct1.sku$$.html" stepKey="goToSimpleProductPage"/>
<waitForPageLoad stepKey="waitForSimpleProductPage"/>
Expand Down Expand Up @@ -265,6 +269,8 @@
</actionGroup>

<click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/>

<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
</before>
<after>
<!-- Go to the tax rule page and delete the row we created-->
Expand Down Expand Up @@ -381,14 +387,7 @@

<click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/>

<!-- Fill out form for a new user with address -->
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser">
<argument name="Customer" value="Simple_US_Customer_NY"/>
</actionGroup>

<actionGroup ref="EnterCustomerAddressInfo" stepKey="enterAddressInfo">
<argument name="Address" value="US_Address_NY"/>
</actionGroup>
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
</before>
<after>
<!-- Go to the tax rule page and delete the row we created-->
Expand Down Expand Up @@ -421,6 +420,15 @@
<deleteData createDataKey="virtualProduct1" stepKey="deleteVirtualProduct1"/>
</after>

<!-- Fill out form for a new user with address -->
<actionGroup ref="SignUpNewUserFromStorefrontActionGroup" stepKey="SignUpNewUser">
<argument name="Customer" value="Simple_US_Customer_NY"/>
</actionGroup>

<actionGroup ref="EnterCustomerAddressInfo" stepKey="enterAddressInfo">
<argument name="Address" value="US_Address_NY"/>
</actionGroup>

<!-- Go to the created product page and add it to the cart -->
<amOnPage url="$$virtualProduct1.sku$$.html" stepKey="goToVirtualProductPage"/>
<waitForPageLoad stepKey="waitForVirtualProductPage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
<scrollTo selector="{{AdminProductFormBundleSection.contentDropDown}}" stepKey="scrollToBundleSection"/>
<selectOption userInput="Separately" selector="{{AdminProductFormBundleSection.shipmentType}}" stepKey="selectSeparately"/>
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
<magentoCLI stepKey="reindex" command="indexer:reindex"/>
<magentoCLI stepKey="flushCache" command="cache:flush"/>

<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
</before>
<after>
<!-- Delete data -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<requiredEntity createDataKey="createBundleOption1_1"/>
<requiredEntity createDataKey="simpleProduct2"/>
</createData>
<magentoCLI stepKey="reindex" command="indexer:reindex"/>
<magentoCLI stepKey="flushCache" command="cache:flush"/>

<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
</before>
<after>
<!-- Delete data -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,31 @@
<field name="payment_code" xsi:type="string">braintree</field>
<field name="cc_number" xsi:type="string">4000000000000002</field>
<field name="cc_exp_month" xsi:type="string">01</field>
<field name="cc_exp_year" xsi:type="string">20</field>
<field name="cc_exp_year" xsi:type="string">24</field>
<field name="cc_cid" xsi:type="string">123</field>
</dataset>

<dataset name="visa_braintree_3dsecure_failed">
<field name="payment_code" xsi:type="string">braintree</field>
<field name="cc_number" xsi:type="string">4000000000000028</field>
<field name="cc_exp_month" xsi:type="string">01</field>
<field name="cc_exp_year" xsi:type="string">2020</field>
<field name="cc_exp_year" xsi:type="string">2024</field>
<field name="cc_cid" xsi:type="string">123</field>
</dataset>

<dataset name="visa_braintree_fraud_rejected">
<field name="payment_code" xsi:type="string">braintree</field>
<field name="cc_number" xsi:type="string">4000111111111511</field>
<field name="cc_exp_month" xsi:type="string">01</field>
<field name="cc_exp_year" xsi:type="string">2020</field>
<field name="cc_exp_year" xsi:type="string">2024</field>
<field name="cc_cid" xsi:type="string">123</field>
</dataset>

<dataset name="visa_braintree_no_cvv">
<field name="payment_code" xsi:type="string">braintree</field>
<field name="cc_number" xsi:type="string">4111111111111111</field>
<field name="cc_exp_month" xsi:type="string">01 - January</field>
<field name="cc_exp_year" xsi:type="string">2020</field>
<field name="cc_exp_year" xsi:type="string">2024</field>
</dataset>
</repository>
</config>

0 comments on commit e4dd671

Please sign in to comment.