From 35d6cf83ebbcafb027bca8a6b6ec8e784ebf4576 Mon Sep 17 00:00:00 2001 From: imeron2433 <imeron@magento.com> Date: Thu, 7 Dec 2017 21:22:08 +0200 Subject: [PATCH] MQE-592: Audit Test Cases on Firefox/Chrome on Windows/OSX - strip @env tags from Cest.xml files - change test flows to be more robust --- .../FunctionalTest/Backend/Cest/AdminLoginCest.xml | 3 --- .../Catalog/Cest/AdminCreateCategoryCest.xml | 2 -- .../Catalog/Cest/AdminCreateSimpleProductCest.xml | 2 -- .../Checkout/Cest/StorefrontCustomerCheckoutCest.xml | 2 -- .../Checkout/Cest/StorefrontGuestCheckoutCest.xml | 7 +++---- .../Checkout/Section/GuestCheckoutPaymentSection.xml | 2 ++ .../Cms/Cest/AdminCreateCmsPageCest.xml | 4 +--- .../Cest/AdminCreateConfigurableProductCest.xml | 3 ++- .../Customer/Cest/AdminCreateCustomerCest.xml | 5 +---- .../Customer/Cest/StorefrontCreateCustomerCest.xml | 3 --- .../Cest/StorefrontPersistedCustomerLoginCest.xml | 3 --- .../Customer/Section/AdminCustomerFiltersSection.xml | 1 + .../Sales/Cest/AdminCreateInvoiceCest.xml | 11 +++++------ .../SampleTemplates/Cest/TemplateCestFile.xml | 1 - .../SampleTests/Cest/MinimumTestCest.xml | 4 +--- 15 files changed, 16 insertions(+), 37 deletions(-) diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Cest/AdminLoginCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Cest/AdminLoginCest.xml index f503dd0844b..fbce6aa6388 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Cest/AdminLoginCest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Cest/AdminLoginCest.xml @@ -21,9 +21,6 @@ <testCaseId value="MAGETWO-71572"/> <group value="example"/> <group value="login"/> - <env value="chrome"/> - <env value="firefox"/> - <env value="headless"/> </annotations> <amOnPage url="{{AdminLoginPage.url}}" stepKey="amOnAdminLoginPage"/> <fillField selector="{{AdminLoginFormSection.username}}" userInput="{{_ENV.MAGENTO_ADMIN_USERNAME}}" stepKey="fillUsername"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateCategoryCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateCategoryCest.xml index c8ccd3dc261..1d127927851 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateCategoryCest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateCategoryCest.xml @@ -23,8 +23,6 @@ <severity value="CRITICAL"/> <testCaseId value="MAGETWO-72102"/> <group value="category"/> - <env value="chrome"/> - <env value="headless"/> </annotations> <loginAsAdmin stepKey="loginAsAdmin"/> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateSimpleProductCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateSimpleProductCest.xml index c2756445f62..cbf0cdb4d90 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateSimpleProductCest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateSimpleProductCest.xml @@ -23,8 +23,6 @@ <severity value="CRITICAL"/> <testCaseId value="MAGETWO-23414"/> <group value="product"/> - <env value="chrome"/> - <env value="headless"/> </annotations> <amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/> <fillField userInput="{{_ENV.MAGENTO_ADMIN_USERNAME}}" selector="{{AdminLoginFormSection.username}}" stepKey="fillUsername"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Cest/StorefrontCustomerCheckoutCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Cest/StorefrontCustomerCheckoutCest.xml index 1da632eaae1..4531bfb84dc 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Cest/StorefrontCustomerCheckoutCest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Cest/StorefrontCustomerCheckoutCest.xml @@ -32,8 +32,6 @@ <severity value="CRITICAL"/> <testCaseId value="#"/> <group value="checkout"/> - <env value="chrome"/> - <env value="headless"/> </annotations> <amOnPage stepKey="s1" url="customer/account/login/"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Cest/StorefrontGuestCheckoutCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Cest/StorefrontGuestCheckoutCest.xml index 2aa0a77b0a0..69c614cd362 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Cest/StorefrontGuestCheckoutCest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Cest/StorefrontGuestCheckoutCest.xml @@ -30,8 +30,6 @@ <severity value="CRITICAL"/> <testCaseId value="MAGETWO-72094"/> <group value="checkout"/> - <env value="chrome"/> - <env value="headless"/> </annotations> <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onCategoryPage"/> <waitForPageLoad stepKey="waitForPageLoad1"/> @@ -56,6 +54,7 @@ <waitForElement selector="{{GuestCheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton"/> <click selector="{{GuestCheckoutShippingSection.next}}" stepKey="clickNext"/> <waitForElement selector="{{GuestCheckoutPaymentSection.placeOrder}}" time="30" stepKey="waitForPlaceOrderButton"/> + <conditionalClick selector="{{GuestCheckoutPaymentSection.cartItemsArea}}" dependentSelector="{{GuestCheckoutPaymentSection.cartItemsAreaActive}}" visible="false" stepKey="exposeMiniCart"/> <see selector="{{GuestCheckoutPaymentSection.cartItems}}" userInput="{{_defaultProduct.name}}" stepKey="seeProductInCart"/> <see selector="{{GuestCheckoutPaymentSection.billingAddress}}" userInput="{{CustomerAddressSimple.street[0]}}" stepKey="seeAddress"/> <click selector="{{GuestCheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/> @@ -67,10 +66,10 @@ <fillField selector="{{AdminLoginFormSection.password}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}" stepKey="fillPassword"/> <click selector="{{AdminLoginFormSection.signIn}}" stepKey="clickLogin"/> <amOnPage url="{{OrdersPage.url}}" stepKey="onOrdersPage"/> - <waitForElementNotVisible selector="{{OrdersGridSection.spinner}}" time="30" stepKey="waitForOrdersPage"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappearOnOrdersPage"/> <fillField selector="{{OrdersGridSection.search}}" variable="orderNumber" stepKey="fillOrderNum"/> <click selector="{{OrdersGridSection.submitSearch}}" stepKey="submitSearchOrderNum"/> - <waitForElementNotVisible selector="{{OrdersGridSection.spinner}}" time="30" stepKey="waitForOrdersPage2"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappearOnSearch"/> <click selector="{{OrdersGridSection.firstRow}}" stepKey="clickOrderRow"/> <see selector="{{OrderDetailsInformationSection.orderStatus}}" userInput="Pending" stepKey="seeAdminOrderStatus"/> <see selector="{{OrderDetailsInformationSection.accountInformation}}" userInput="Guest" stepKey="seeAdminOrderGuest"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/GuestCheckoutPaymentSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/GuestCheckoutPaymentSection.xml index 200a699d2bb..cc7c019cc4e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/GuestCheckoutPaymentSection.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/GuestCheckoutPaymentSection.xml @@ -9,6 +9,8 @@ <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> <section name="GuestCheckoutPaymentSection"> + <element name="cartItemsArea" type="textarea" selector=".items-in-cart"/> + <element name="cartItemsAreaActive" type="textarea" selector="div.block.items-in-cart.active"/> <element name="cartItems" type="text" selector=".minicart-items"/> <element name="billingAddress" type="text" selector="div.billing-address-details"/> <element name="placeOrder" type="button" selector="button.action.primary.checkout" timeout="30"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminCreateCmsPageCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminCreateCmsPageCest.xml index 112c57fbb86..8ac19e41e4b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminCreateCmsPageCest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminCreateCmsPageCest.xml @@ -23,9 +23,7 @@ <severity value="CRITICAL"/> <testCaseId value="MAGETWO-25580"/> <group value="cms"/> - <env value="chrome"/> - <env value="firefox"/> - <env value="headless"/> + <group value="skip"/> </annotations> <amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/> <fillField selector="{{AdminLoginFormSection.username}}" userInput="{{_ENV.MAGENTO_ADMIN_USERNAME}}" stepKey="fillUsername"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Cest/AdminCreateConfigurableProductCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Cest/AdminCreateConfigurableProductCest.xml index c68f6ed83bc..a540feba1f5 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Cest/AdminCreateConfigurableProductCest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Cest/AdminCreateConfigurableProductCest.xml @@ -25,7 +25,8 @@ <description value="You should be able to create a Configurable Product via the Admin."/> <severity value="CRITICAL"/> <testCaseId value="MAGETWO-26041"/> - <group value="skip"/> + <group value="configurable"/> + <group value="product"/> </annotations> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="amOnCategoryGridPage"/> <waitForPageLoad time="30" stepKey="waitForPageLoad1"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Cest/AdminCreateCustomerCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Cest/AdminCreateCustomerCest.xml index da72ffd45ea..b0a4cb06c08 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Cest/AdminCreateCustomerCest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Cest/AdminCreateCustomerCest.xml @@ -21,8 +21,6 @@ <testCaseId value="MAGETWO-72095"/> <group value="customer"/> <group value="create"/> - <env value="chrome"/> - <env value="headless"/> </annotations> <amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/> <fillField userInput="{{_ENV.MAGENTO_ADMIN_USERNAME}}" selector="{{AdminLoginFormSection.username}}" stepKey="fillUsername"/> @@ -36,9 +34,8 @@ <click selector="{{AdminNewCustomerMainActionsSection.saveButton}}" stepKey="saveCustomer"/> <waitForElementNotVisible selector="div [data-role='spinner']" time="10" stepKey="waitForSpinner1"/> <seeElement selector="{{AdminCustomerMessagesSection.successMessage}}" stepKey="assertSuccessMessage"/> - <click selector="{{AdminCustomerFiltersSection.filtersButton}}" stepKey="openFilter"/> - <fillField userInput="{{CustomerEntityOne.firstname}}" selector="{{AdminCustomerFiltersSection.nameInput}}" stepKey="filterFirstName"/> + <fillField userInput="{{CustomerEntityOne.email}}" selector="{{AdminCustomerFiltersSection.emailInput}}" stepKey="filterEmail"/> <click selector="{{AdminCustomerFiltersSection.apply}}" stepKey="applyFilter"/> <waitForElementNotVisible selector="div [data-role='spinner']" time="10" stepKey="waitForSpinner2"/> <see userInput="{{CustomerEntityOne.firstname}}" selector="{{AdminCustomerGridSection.customerGrid}}" stepKey="assertFirstName"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Cest/StorefrontCreateCustomerCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Cest/StorefrontCreateCustomerCest.xml index 36c97c56d0f..80ab4ea6d9c 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Cest/StorefrontCreateCustomerCest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Cest/StorefrontCreateCustomerCest.xml @@ -21,9 +21,6 @@ <testCaseId value="MAGETWO-23546"/> <group value="customer"/> <group value="create"/> - <env value="chrome"/> - <env value="firefox"/> - <env value="headless"/> </annotations> <amOnPage stepKey="amOnStorefrontPage" url="/"/> <click stepKey="clickOnCreateAccountLink" selector="{{StorefrontPanelHeaderSection.createAnAccountLink}}"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Cest/StorefrontPersistedCustomerLoginCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Cest/StorefrontPersistedCustomerLoginCest.xml index 2ed55e691a0..2045fd3a97a 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Cest/StorefrontPersistedCustomerLoginCest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Cest/StorefrontPersistedCustomerLoginCest.xml @@ -26,9 +26,6 @@ <severity value="CRITICAL"/> <testCaseId value="MAGETWO-72103"/> <group value="customer"/> - <env value="chrome"/> - <env value="firefox"/> - <env value="headless"/> </annotations> <amOnPage stepKey="amOnSignInPage" url="{{StorefrontCustomerSignInPage.url}}"/> <fillField stepKey="fillEmail" userInput="$$customer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerFiltersSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerFiltersSection.xml index 57449d2b22b..8e21effe98d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerFiltersSection.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Section/AdminCustomerFiltersSection.xml @@ -11,6 +11,7 @@ <section name="AdminCustomerFiltersSection"> <element name="filtersButton" type="button" selector="#container > div > div.admin__data-grid-header > div:nth-child(1) > div.data-grid-filters-actions-wrap > div > button" timeout="30"/> <element name="nameInput" type="input" selector="input[name=name]"/> + <element name="emailInput" type="input" selector="input[name=email]"/> <element name="apply" type="button" selector="button[data-action=grid-filter-apply]" timeout="30"/> </section> </config> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Cest/AdminCreateInvoiceCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Cest/AdminCreateInvoiceCest.xml index f27ac7d37af..e0279c22d96 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Cest/AdminCreateInvoiceCest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/Cest/AdminCreateInvoiceCest.xml @@ -27,8 +27,6 @@ <severity value="NORMAL"/> <testCaseId value="MAGETWO-72096"/> <group value="sales"/> - <env value="chrome"/> - <env value="headless"/> </annotations> <!-- todo: Create an order via the api instead of driving the browser --> @@ -50,6 +48,7 @@ <fillField selector="{{CheckoutShippingGuestInfoSection.telephone}}" userInput="{{CustomerAddressSimple.telephone}}" stepKey="enterTelephone"/> <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/> <click selector="{{CheckoutShippingMethodsSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask2"/> <waitForElement selector="{{CheckoutShippingMethodsSection.next}}" time="30" stepKey="waitForNextButton"/> <click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext"/> <waitForElement selector="{{CheckoutPaymentSection.placeOrder}}" time="30" stepKey="waitForPlaceOrderButton"/> @@ -64,23 +63,23 @@ <click selector="{{AdminLoginFormSection.signIn}}" stepKey="clickLogin"/> <amOnPage url="{{OrdersPage.url}}" stepKey="onOrdersPage"/> - <waitForElementNotVisible selector="{{OrdersGridSection.spinner}}" time="10" stepKey="waitSpinner1"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask3"/> <fillField selector="{{OrdersGridSection.search}}" variable="orderNumber" stepKey="searchOrderNum"/> <click selector="{{OrdersGridSection.submitSearch}}" stepKey="submitSearch"/> - <waitForElementNotVisible selector="{{OrdersGridSection.spinner}}" time="10" stepKey="waitSpinner2"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask4"/> <click selector="{{OrdersGridSection.firstRow}}" stepKey="clickOrderRow"/> <click selector="{{OrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoice"/> <click selector="{{InvoiceNewSection.submitInvoice}}" stepKey="clickSubmitInvoice"/> <see selector="{{OrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeSuccessMessage"/> <click selector="{{OrderDetailsOrderViewSection.invoices}}" stepKey="clickInvoices"/> - <waitForElementNotVisible selector="{{OrderDetailsInvoicesSection.spinner}}" time="10" stepKey="waitSpinner3"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask5" /> <see selector="{{OrderDetailsInvoicesSection.content}}" variable="orderNumber" stepKey="seeInvoice1"/> <see selector="{{OrderDetailsInvoicesSection.content}}" userInput="John Doe" stepKey="seeInvoice2"/> <click selector="{{OrderDetailsOrderViewSection.information}}" stepKey="clickInformation"/> <see selector="{{OrderDetailsInformationSection.orderStatus}}" userInput="Processing" stepKey="seeOrderStatus"/> <amOnPage url="{{InvoicesPage.url}}" stepKey="goToInvoices"/> - <waitForElementNotVisible selector="{{InvoicesGridSection.spinner}}" time="10" stepKey="waitSpinner4"/> + <waitForLoadingMaskToDisappear stepKey="waitForLoadingMask6" /> <click selector="{{InvoicesGridSection.filter}}" stepKey="clickFilters"/> <fillField selector="{{InvoicesFiltersSection.orderNum}}" variable="orderNumber" stepKey="searchOrderNum2"/> <click selector="{{InvoicesGridSection.firstRow}}" stepKey="clickInvoice2"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleTemplates/Cest/TemplateCestFile.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleTemplates/Cest/TemplateCestFile.xml index bc29e788f90..18b8a30d441 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleTemplates/Cest/TemplateCestFile.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleTemplates/Cest/TemplateCestFile.xml @@ -26,7 +26,6 @@ <severity value=""/> <testCaseId value=""/> <group value=""/> - <env value=""/> </annotations> <!-- ADD TEST STEPS HERE --> </test> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleTests/Cest/MinimumTestCest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleTests/Cest/MinimumTestCest.xml index 350c228bc50..440a14c9603 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleTests/Cest/MinimumTestCest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/SampleTests/Cest/MinimumTestCest.xml @@ -1,3 +1,4 @@ +<<<<<<< Updated upstream <?xml version="1.0" encoding="UTF-8"?> <!-- /** @@ -21,9 +22,6 @@ <title value="Minimum Test"/> <description value="Minimum Test"/> <group value="example"/> - <env value="chrome"/> - <env value="firefox"/> - <env value="headless"/> </annotations> <amOnPage url="{{AdminLoginPage.url}}" stepKey="navigateToAdmin"/> <fillField selector="{{AdminLoginFormSection.username}}" userInput="{{_ENV.MAGENTO_ADMIN_USERNAME}}" stepKey="fillUsername"/> -- GitLab