keycloak-scim/js/apps/account-ui/test/groups.spec.ts

17 lines
689 B
TypeScript
Raw Normal View History

import { test, expect } from "@playwright/test";
import { login } from "./login";
import { deleteRealm, importRealm } from "./admin-client";
import groupsRealm from "./groups-realm.json" assert { type: "json" };
import RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
test.describe("Groups page", () => {
test.beforeAll(() => importRealm(groupsRealm as RealmRepresentation));
test.afterAll(() => deleteRealm("groups"));
test("List my groups", async ({ page }) => {
await login(page, "jdoe", "jdoe", "groups");
await page.getByTestId("groups").click();
await expect(page.getByTestId("group[0].name")).toHaveText("one");
});
});