Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test automation] Configure and verify GitHub integration with Org data fetching #1336

Merged
merged 6 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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']);
});
});
Loading