-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ad6cdf
commit cff0e98
Showing
2 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
app/code/Magento/AdminNotification/Test/Mftf/Section/AdminNotificationToolbarSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
62 changes: 62 additions & 0 deletions
62
...e/Magento/AdminNotification/Test/Mftf/Test/AdminSystemNotificationToolbarBlockAclTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |