|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="AdminFrontendAreaSessionMustNotAffectAdminAreaTest"> |
| 12 | + <annotations> |
| 13 | + <stories value="Backend"/> |
| 14 | + <features value="Session cookies"/> |
| 15 | + <title value="Frontend area session must not affect admin area"/> |
| 16 | + <description value="Frontend area session must not affect admin area"/> |
| 17 | + <severity value="CRITICAL"/> |
| 18 | + <testCaseId value="MC-8838"/> |
| 19 | + <group value="backend"/> |
| 20 | + <group value="pagecache"/> |
| 21 | + <group value="cookie"/> |
| 22 | + </annotations> |
| 23 | + <before> |
| 24 | + <!-- Create Data --> |
| 25 | + <createData entity="_defaultCategory" stepKey="createCategoryA"/> |
| 26 | + <createData entity="SubCategoryWithParent" stepKey="createCategoryB"> |
| 27 | + <requiredEntity createDataKey="createCategoryA"/> |
| 28 | + </createData> |
| 29 | + <createData entity="SubCategoryWithParent" stepKey="createCategoryC"> |
| 30 | + <requiredEntity createDataKey="createCategoryB"/> |
| 31 | + </createData> |
| 32 | + <createData entity="ApiSimpleProduct" stepKey="createProduct1"> |
| 33 | + <requiredEntity createDataKey="createCategoryC"/> |
| 34 | + </createData> |
| 35 | + <createData entity="ApiSimpleProduct" stepKey="createProduct2"> |
| 36 | + <requiredEntity createDataKey="createCategoryC"/> |
| 37 | + </createData> |
| 38 | + <createData entity="ApiSimpleProduct" stepKey="createProduct3"> |
| 39 | + <requiredEntity createDataKey="createCategoryA"/> |
| 40 | + </createData> |
| 41 | + |
| 42 | + <magentoCLI command="cache:clean" arguments="full_page" stepKey="clearCache"/> |
| 43 | + <actionGroup ref="logout" stepKey="logout"/> |
| 44 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> |
| 45 | + <resetCookie userInput="PHPSESSID" stepKey="resetSessionCookie"/> |
| 46 | + </before> |
| 47 | + <after> |
| 48 | + <!-- Delete data --> |
| 49 | + <deleteData createDataKey="createProduct1" stepKey="deleteProduct1"/> |
| 50 | + <deleteData createDataKey="createProduct2" stepKey="deleteProduct2"/> |
| 51 | + <deleteData createDataKey="createProduct3" stepKey="deleteProduct3"/> |
| 52 | + |
| 53 | + <deleteData createDataKey="createCategoryC" stepKey="deleteCategoryC"/> |
| 54 | + <deleteData createDataKey="createCategoryB" stepKey="deleteCategoryB"/> |
| 55 | + <deleteData createDataKey="createCategoryA" stepKey="deleteCategoryA"/> |
| 56 | + |
| 57 | + <actionGroup ref="logout" stepKey="logoutAdmin"/> |
| 58 | + </after> |
| 59 | + |
| 60 | + <!-- 1. Login as admin --> |
| 61 | + <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> |
| 62 | + |
| 63 | + <!-- 2. Navigate Go to "Catalog"->"Products" --> |
| 64 | + <amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="openAdminCatalogPage"/> |
| 65 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 66 | + |
| 67 | + <!-- 3. Open separate tab with Storefront --> |
| 68 | + <openNewTab stepKey="openNewTab"/> |
| 69 | + |
| 70 | + <!-- 4. Navigate to Men -> "Tops" -> "Jackets" --> |
| 71 | + <amOnPage |
| 72 | + url="{{StorefrontCategoryPage.url($$createCategoryA.custom_attributes[url_key]$$/$$createCategoryB.custom_attributes[url_key]$$/$$createCategoryC.custom_attributes[url_key]$$)}}" |
| 73 | + stepKey="openCategoryPage"/> |
| 74 | + <waitForPageLoad time="60" stepKey="waitForCategoryPage"/> |
| 75 | + |
| 76 | + <!-- 5. Open admin tab with page with products. Reload this page twice. --> |
| 77 | + <switchToPreviousTab stepKey="switchToPreviousTab"/> |
| 78 | + <reloadPage stepKey="reloadAdminCatalogPageFirst"/> |
| 79 | + <waitForPageLoad stepKey="waitForReloadFirst"/> |
| 80 | + <reloadPage stepKey="reloadAdminCatalogPageSecond"/> |
| 81 | + <waitForPageLoad stepKey="waitForReloadSecond"/> |
| 82 | + |
| 83 | + <seeInTitle userInput="Products / Inventory / Catalog / Magento Admin" stepKey="seeAdminProductsPageTitle"/> |
| 84 | + <see userInput="Products" selector="{{AdminHeaderSection.pageTitle}}" stepKey="seeAdminProductsPageHeader"/> |
| 85 | + |
| 86 | + <switchToNextTab stepKey="switchToFrontendTab"/> |
| 87 | + <closeTab stepKey="closeFrontendTab"/> |
| 88 | + </test> |
| 89 | +</tests> |
0 commit comments