github.com/minio/console@v1.4.1/web-app/tests/permissions-3/admin.ts (about) 1 // This file is part of MinIO Console Server 2 // Copyright (c) 2022 MinIO, Inc. 3 // 4 // This program is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU Affero General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // This program is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU Affero General Public License for more details. 13 // 14 // You should have received a copy of the GNU Affero General Public License 15 // along with this program. If not, see <http://www.gnu.org/licenses/>. 16 17 import * as roles from "../utils/roles"; 18 import * as elements from "../utils/elements-menu"; 19 import { 20 bucketsElement, 21 dashboardElement, 22 groupsElement, 23 iamPoliciesElement, 24 identityElement, 25 monitoringElement, 26 notificationEndpointsElement, 27 serviceAcctsElement, 28 tiersElement, 29 usersElement, 30 } from "../utils/elements-menu"; 31 32 fixture("For user with Admin permissions") 33 .page("http://localhost:9090") 34 .beforeEach(async (t) => { 35 await t.useRole(roles.admin); 36 }); 37 38 test("All sidebar items exist", async (t) => { 39 const licenseExists = elements.licenseElement.exists; 40 await t 41 .expect(monitoringElement.exists) 42 .ok() 43 .click(monitoringElement) 44 .expect(dashboardElement.exists) 45 .ok() 46 .expect(bucketsElement.exists) 47 .ok() 48 .expect(identityElement.exists) 49 .ok() 50 .click(identityElement) 51 .expect(usersElement.exists) 52 .ok() 53 .expect(groupsElement.exists) 54 .ok() 55 .expect(serviceAcctsElement.exists) 56 .ok() 57 .expect(iamPoliciesElement.exists) 58 .ok() 59 .expect(notificationEndpointsElement.exists) 60 .ok() 61 .expect(tiersElement.exists) 62 .ok() 63 .expect(elements.diagnosticsElement.exists) 64 .ok() 65 .expect(elements.performanceElement.exists) 66 .ok() 67 .expect(licenseExists) 68 .ok(); 69 });