Skip to content

Commit

Permalink
make GitHub integration with Org data fetching parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
nilgaar committed Jan 22, 2025
1 parent 5dadc10 commit 64592c2
Showing 1 changed file with 27 additions and 22 deletions.
49 changes: 27 additions & 22 deletions e2e-tests/playwright/e2e/github-integration-org-fetch.spec.ts
Original file line number Diff line number Diff line change
@@ -1,42 +1,47 @@
import { test, Page } from "@playwright/test";
import { test as base } from "@playwright/test";
import { UIhelper } from "../utils/ui-helper";
import { Common, setupBrowser } from "../utils/common";

let page: Page;
test.describe.serial("GitHub integration with Org data fetching", () => {
let common: Common;
let uiHelper: UIhelper;

test.beforeAll(async ({ browser }, testInfo) => {
page = (await setupBrowser(browser, testInfo)).page;
uiHelper = new UIhelper(page);
common = new Common(page);
import { Common } from "../utils/common";

const test = base.extend<{
common: Common;
uiHelper: UIhelper;
}>({
common: async ({ page }) => {
const common = new Common(page);
await common.loginAsKeycloakUser();
});

test("Verify that fetching the groups of the first org works", async () => {
},
// eslint-disable-next-line @typescript-eslint/no-unused-vars
uiHelper: async ({ page, common }, use) => {
const uiHelper = new UIhelper(page);
await uiHelper.openSidebar("Catalog");
await uiHelper.selectMuiBox("Kind", "Group");
await use(uiHelper);
},
});

test.describe("GitHub integration with Org data fetching", () => {
test("Verify that fetching the groups of the first org works", async ({
uiHelper,
}) => {
await uiHelper.selectMuiBox("Kind", "Group");
await uiHelper.searchInputPlaceholder("maintainers");
await uiHelper.verifyRowsInTable(["maintainers"]);

await uiHelper.searchInputPlaceholder("r");
await uiHelper.verifyRowsInTable(["rhdh-qes"]);
});

test("Verify that fetching the groups of the second org works", async () => {
test("Verify that fetching the groups of the second org works", async ({
uiHelper,
}) => {
await uiHelper.searchInputPlaceholder("c");
await uiHelper.verifyRowsInTable(["catalog-group"]);

await uiHelper.searchInputPlaceholder("j");
await uiHelper.verifyRowsInTable(["janus-test"]);
});

test("Verify that fetching the users of the orgs works", async () => {
await uiHelper.openSidebar("Catalog");
test("Verify that fetching the users of the orgs works", async ({
uiHelper,
}) => {
await uiHelper.selectMuiBox("Kind", "User");

await uiHelper.searchInputPlaceholder("r");
await uiHelper.verifyRowsInTable(["rhdh-qe"]);
});
Expand Down

0 comments on commit 64592c2

Please sign in to comment.