Skip to content

Commit

Permalink
[Test automation] Configure and verify GitHub integration with Org da…
Browse files Browse the repository at this point in the history
…ta fetching (#1336)

* Added test file to verify the GitHub integration with Org data fetching

* configuring the github organization integration

* removed the names of the people in the group, leaving only the non-person user

---------

Co-authored-by: Joseph Kim <joskim@redhat.com>
  • Loading branch information
Omar-AlJaljuli and josephca committed Jul 8, 2024
1 parent ef76d0e commit 8ff97cd
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ data:
target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml
rules:
- allow: [User, Group]
providers:
githubOrg:
id: production
githubUrl: "${GITHUB_URL}"
orgs: ["${GITHUB_ORG}"]
dynatrace:
baseUrl: temp
Expand All @@ -119,4 +123,3 @@ data:
admin:
users:
- name: user:default/rhdh-qe
35 changes: 35 additions & 0 deletions e2e-tests/playwright/e2e/github-integration-org-fetch.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { test, Page } from '@playwright/test';
import { UIhelper } from '../utils/UIhelper';
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);
await common.loginAsGithubUser();
});

test('Verify that fetching the groups of the org works', async () => {
await uiHelper.openSidebar('Catalog');
await uiHelper.selectMuiBox('Kind', 'Group');

await uiHelper.searchInputPlaceholder('m');
await uiHelper.verifyRowsInTable(['maintainers']);

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

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

await uiHelper.searchInputPlaceholder('r');
await uiHelper.verifyRowsInTable(['rhdh-qe']);
});
});

0 comments on commit 8ff97cd

Please sign in to comment.