|
| 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" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="AdminCategoryWithRestrictedUrlKeyNotCreatedTest"> |
| 11 | + <annotations> |
| 12 | + <features value="CatalogUrlRewrite"/> |
| 13 | + <title value="Category with restricted Url Key cannot be created"/> |
| 14 | + <description value="Category with restricted Url Key cannot be created"/> |
| 15 | + <severity value="MAJOR"/> |
| 16 | + <testCaseId value="MAGETWO-71221"/> |
| 17 | + <useCaseId value="MAGETWO-69825"/> |
| 18 | + <group value="CatalogUrlRewrite"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> |
| 22 | + </before> |
| 23 | + <after> |
| 24 | + <!--Delete created categories--> |
| 25 | + <comment userInput="Delete created categories" stepKey="commentDeleteCreatedCategories"/> |
| 26 | + <actionGroup ref="deleteCategoryByName" stepKey="deleteAdminCategory"> |
| 27 | + <argument name="categoryName" value="admin"/> |
| 28 | + </actionGroup> |
| 29 | + <actionGroup ref="deleteCategoryByName" stepKey="deleteSoapCategory"> |
| 30 | + <argument name="categoryName" value="soap"/> |
| 31 | + </actionGroup> |
| 32 | + <actionGroup ref="deleteCategoryByName" stepKey="deleteRestCategory"> |
| 33 | + <argument name="categoryName" value="rest"/> |
| 34 | + </actionGroup> |
| 35 | + <actionGroup ref="deleteCategoryByName" stepKey="deleteGraphQlCategory"> |
| 36 | + <argument name="categoryName" value="graphql"/> |
| 37 | + </actionGroup> |
| 38 | + <actionGroup ref="logout" stepKey="logout"/> |
| 39 | + </after> |
| 40 | + <!--Check category creation with restricted url key 'admin'--> |
| 41 | + <comment userInput="Check category creation with restricted url key 'admin'" stepKey="commentCheckAdminCategoryCreation"/> |
| 42 | + <actionGroup ref="goToCreateCategoryPage" stepKey="goToCreateAdminCategoryPage"/> |
| 43 | + <actionGroup ref="FillCategoryNameAndUrlKeyAndSave" stepKey="fillAdminFirstCategoryForm"> |
| 44 | + <argument name="categoryName" value="admin"/> |
| 45 | + <argument name="categoryUrlKey" value=""/> |
| 46 | + </actionGroup> |
| 47 | + <see userInput='URL key "admin" conflicts with reserved endpoint names: admin, soap, rest, graphql. Try another url key.' stepKey="seeAdminFirstErrorMessage"/> |
| 48 | + <actionGroup ref="FillCategoryNameAndUrlKeyAndSave" stepKey="fillAdminSecondCategoryForm"> |
| 49 | + <argument name="categoryName" value="{{SimpleSubCategory.name}}"/> |
| 50 | + <argument name="categoryUrlKey" value="admin"/> |
| 51 | + </actionGroup> |
| 52 | + <see userInput='URL key "admin" conflicts with reserved endpoint names: admin, soap, rest, graphql. Try another url key.' stepKey="seeAdminSecondErrorMessage"/> |
| 53 | + <!--Create category with 'admin' name--> |
| 54 | + <comment userInput="Create category with 'admin' name" stepKey="commentAdminCategoryCreation"/> |
| 55 | + <actionGroup ref="FillCategoryNameAndUrlKeyAndSave" stepKey="fillAdminThirdCategoryForm"> |
| 56 | + <argument name="categoryName" value="admin"/> |
| 57 | + <argument name="categoryUrlKey" value="{{SimpleSubCategory.name}}"/> |
| 58 | + </actionGroup> |
| 59 | + <see userInput="You saved the category." stepKey="seeAdminSuccessMessage"/> |
| 60 | + <seeElement selector="{{AdminCategorySidebarTreeSection.categoryByName('admin')}}" stepKey="seeAdminCategoryInTree"/> |
| 61 | + <!--Check category creation with restricted url key 'soap'--> |
| 62 | + <comment userInput="Check category creation with restricted url key 'soap'" stepKey="commentCheckSoapCategoryCreation"/> |
| 63 | + <actionGroup ref="goToCreateCategoryPage" stepKey="goToCreateSoapCategoryPage"/> |
| 64 | + <actionGroup ref="FillCategoryNameAndUrlKeyAndSave" stepKey="fillSoapFirstCategoryForm"> |
| 65 | + <argument name="categoryName" value="soap"/> |
| 66 | + <argument name="categoryUrlKey" value=""/> |
| 67 | + </actionGroup> |
| 68 | + <see userInput='URL key "soap" conflicts with reserved endpoint names: admin, soap, rest, graphql. Try another url key.' stepKey="seeSoapFirstErrorMessage"/> |
| 69 | + <actionGroup ref="FillCategoryNameAndUrlKeyAndSave" stepKey="fillSoapSecondCategoryForm"> |
| 70 | + <argument name="categoryName" value="{{ApiCategory.name}}"/> |
| 71 | + <argument name="categoryUrlKey" value="soap"/> |
| 72 | + </actionGroup> |
| 73 | + <see userInput='URL key "soap" conflicts with reserved endpoint names: admin, soap, rest, graphql. Try another url key.' stepKey="seeSoapSecondErrorMessage"/> |
| 74 | + <!--Create category with 'soap' name--> |
| 75 | + <comment userInput="Create category with 'soap' name" stepKey="commentSoapCategoryCreation"/> |
| 76 | + <actionGroup ref="FillCategoryNameAndUrlKeyAndSave" stepKey="fillSoapThirdCategoryForm"> |
| 77 | + <argument name="categoryName" value="soap"/> |
| 78 | + <argument name="categoryUrlKey" value="{{ApiCategory.name}}"/> |
| 79 | + </actionGroup> |
| 80 | + <see userInput="You saved the category." stepKey="seeSoapSuccessMessage"/> |
| 81 | + <seeElement selector="{{AdminCategorySidebarTreeSection.categoryByName('soap')}}" stepKey="seeSoapCategoryInTree"/> |
| 82 | + <!--Check category creation with restricted url key 'rest'--> |
| 83 | + <comment userInput="Check category creation with restricted url key 'rest'" stepKey="commentCheckRestCategoryCreation"/> |
| 84 | + <actionGroup ref="goToCreateCategoryPage" stepKey="goToCreateRestCategoryPage"/> |
| 85 | + <actionGroup ref="FillCategoryNameAndUrlKeyAndSave" stepKey="fillRestFirstCategoryForm"> |
| 86 | + <argument name="categoryName" value="rest"/> |
| 87 | + <argument name="categoryUrlKey" value=""/> |
| 88 | + </actionGroup> |
| 89 | + <see userInput='URL key "rest" conflicts with reserved endpoint names: admin, soap, rest, graphql. Try another url key.' stepKey="seeRestFirstErrorMessage"/> |
| 90 | + <actionGroup ref="FillCategoryNameAndUrlKeyAndSave" stepKey="fillRestSecondCategoryForm"> |
| 91 | + <argument name="categoryName" value="{{SubCategoryWithParent.name}}"/> |
| 92 | + <argument name="categoryUrlKey" value="rest"/> |
| 93 | + </actionGroup> |
| 94 | + <see userInput='URL key "rest" conflicts with reserved endpoint names: admin, soap, rest, graphql. Try another url key.' stepKey="seeRestSecondErrorMessage"/> |
| 95 | + <!--Create category with 'rest' name--> |
| 96 | + <comment userInput="Create category with 'rest' name" stepKey="commentRestCategoryCreation"/> |
| 97 | + <actionGroup ref="FillCategoryNameAndUrlKeyAndSave" stepKey="fillRestThirdCategoryForm"> |
| 98 | + <argument name="categoryName" value="rest"/> |
| 99 | + <argument name="categoryUrlKey" value="{{SubCategoryWithParent.name}}"/> |
| 100 | + </actionGroup> |
| 101 | + <see userInput="You saved the category." stepKey="seeRestSuccessMesdgssage"/> |
| 102 | + <seeElement selector="{{AdminCategorySidebarTreeSection.categoryByName('rest')}}" stepKey="seeRestCategoryInTree"/> |
| 103 | + <!--Check category creation with restricted url key 'graphql'--> |
| 104 | + <comment userInput="Check category creation with restricted url key 'graphql'" stepKey="commentCheckGraphQlCategoryCreation"/> |
| 105 | + <actionGroup ref="goToCreateCategoryPage" stepKey="goToCreateCategoryPage"/> |
| 106 | + <actionGroup ref="FillCategoryNameAndUrlKeyAndSave" stepKey="fillGraphQlFirstCategoryForm"> |
| 107 | + <argument name="categoryName" value="graphql"/> |
| 108 | + <argument name="categoryUrlKey" value=""/> |
| 109 | + </actionGroup> |
| 110 | + <see userInput='URL key "graphql" conflicts with reserved endpoint names: admin, soap, rest, graphql. Try another url key.' stepKey="seeGraphQlFirstErrorMessage"/> |
| 111 | + <actionGroup ref="FillCategoryNameAndUrlKeyAndSave" stepKey="fillGraphQlSecondCategoryForm"> |
| 112 | + <argument name="categoryName" value="{{NewSubCategoryWithParent.name}}"/> |
| 113 | + <argument name="categoryUrlKey" value="graphql"/> |
| 114 | + </actionGroup> |
| 115 | + <see userInput='URL key "graphql" conflicts with reserved endpoint names: admin, soap, rest, graphql. Try another url key.' stepKey="seeGraphQlSecondErrorMessage"/> |
| 116 | + <!--Create category with 'graphql' name--> |
| 117 | + <comment userInput="Create category with 'graphql' name" stepKey="commentGraphQlCategoryCreation"/> |
| 118 | + <actionGroup ref="FillCategoryNameAndUrlKeyAndSave" stepKey="fillGraphQlThirdCategoryForm"> |
| 119 | + <argument name="categoryName" value="graphql"/> |
| 120 | + <argument name="categoryUrlKey" value="{{NewSubCategoryWithParent.name}}"/> |
| 121 | + </actionGroup> |
| 122 | + <see userInput="You saved the category." stepKey="seeGraphQlSuccessMessage"/> |
| 123 | + <seeElement selector="{{AdminCategorySidebarTreeSection.categoryByName('graphql')}}" stepKey="seeGraphQlCategoryInTree"/> |
| 124 | + </test> |
| 125 | +</tests> |
0 commit comments