Skip to content

Commit

Permalink
add mftf
Browse files Browse the repository at this point in the history
  • Loading branch information
engcom-Charlie committed Jun 30, 2020
1 parent 7ad6cdf commit cff0e98
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminNotificationToolbarSection">
<element name="notification" type="block" selector=".notifications-wrapper.admin__action-dropdown-wrap"/>
<element name="notificationCounter" type="block" selector=".notifications-action.admin__action-dropdown .notifications-counter"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminSystemNotificationToolbarBlockAclTest">
<annotations>
<features value="AdminNotification"/>
<title value="Admin system notification toolbar block acl test"/>
<description value="Admin should not see system notification toolbar block if acl not restricted"/>
<severity value="MAJOR"/>
<group value="menu"/>
</annotations>
<before>
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>

<actionGroup ref="AdminFillUserRoleRequiredDataActionGroup" stepKey="fillUserRoleRequiredData">
<argument name="User" value="adminRole"/>
<argument name="restrictedRole" value="Stores"/>
</actionGroup>
<actionGroup ref="AdminUserClickRoleResourceTabActionGroup" stepKey="goToRoleResourcesTab" />
<actionGroup ref="AdminAddRestrictedRoleActionGroup" stepKey="addRestrictedRoleStores">
<argument name="User" value="adminRole"/>
<argument name="restrictedRole" value="Products"/>
</actionGroup>
<actionGroup ref="AdminUserSaveRoleActionGroup" stepKey="saveUserRole" />

<actionGroup ref="AdminCreateUserActionGroup" stepKey="createAdminUser">
<argument name="role" value="adminRole"/>
<argument name="User" value="admin2"/>
</actionGroup>

<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
</before>
<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAsSaleRoleUser"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<!--Delete created data-->
<actionGroup ref="AdminUserOpenAdminRolesPageActionGroup" stepKey="navigateToUserRoleGrid"/>
<actionGroup ref="AdminDeleteRoleActionGroup" stepKey="deleteUserRole">
<argument name="role" value="adminRole"/>
</actionGroup>
<actionGroup ref="AdminOpenAdminUsersPageActionGroup" stepKey="goToAllUsersPage"/>
<actionGroup ref="AdminDeleteNewUserActionGroup" stepKey="deleteUser">
<argument name="userName" value="{{admin2.username}}"/>
</actionGroup>
</after>

<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsNewUser">
<argument name="username" value="{{admin2.username}}"/>
<argument name="password" value="{{admin2.password}}"/>
</actionGroup>

<waitForPageLoad stepKey="waitBeforePageLoad"/>
<dontSeeElement selector="{{AdminNotificationToolbarSection.notification}}" stepKey="doNotSeeNotificationBellIcon"/>
</test>
</tests>

0 comments on commit cff0e98

Please sign in to comment.