keycloak-scim/js/apps/account-ui/test/groups.spec.ts
Erik Jan de Wit 1049ad8edf
added test for the groups tab of the account-ui (#22371)
* added test for the groups tab of the account-ui

* simplified groups realm setup

* fixed url

* changed login to add realm

* set account ui v3 as theme
2023-08-18 14:18:28 +02:00

16 lines
689 B
TypeScript

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");
});
});