github.com/minio/console@v1.4.1/web-app/e2e/groups.spec.ts (about) 1 // This file is part of MinIO Console Server 2 // Copyright (c) 2023 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 { expect } from "@playwright/test"; 18 import { generateUUID, test } from "./fixtures/baseFixture"; 19 import { minioadminFile } from "./consts"; 20 import { BUCKET_LIST_PAGE } from "./consts"; 21 22 test.use({ storageState: minioadminFile }); 23 24 test.beforeEach(async ({ page }) => { 25 await page.goto(BUCKET_LIST_PAGE); 26 }); 27 28 test("Add a new group", async ({ page }) => { 29 await page.getByRole("button", { name: "Identity" }).click(); 30 await page.getByRole("button", { name: "Groups" }).click(); 31 await page.getByRole("button", { name: "Create Group" }).click(); 32 33 const groupName = `new-group-${generateUUID()}`; 34 35 await page.getByLabel("Group Name").fill(groupName); 36 await page.getByRole("button", { name: "Save" }).click(); 37 await expect(page.getByRole("gridcell", { name: groupName })).toBeTruthy(); 38 });