Skip to content

Commit

Permalink
[e2e-tests] Update and Fix tests (ocm & dynamic plugins info) (#975)
Browse files Browse the repository at this point in the history
Signed-off-by: Subhash Khileri <skhileri@redhat.com>
  • Loading branch information
subhashkhileri committed Feb 16, 2024
1 parent 1f5f080 commit 617a26d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .ibm/pipelines/auth/secrets-rhdh-secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ data:
GITHUB_APP_CLIENT_SECRET: dGVtcA==
GITHUB_APP_WEBHOOK_URL: aHR0cHM6Ly9zbWVlLmlvL0NrRUNLYVgwNzhyZVhobEpEVzA=
GITHUB_APP_WEBHOOK_SECRET: dGVtcA==
GITHUB_ORG_URL: aHR0cHM6Ly9naXRodWIuY29tL2phbnVzLXFl
GITHUB_URL: aHR0cHM6Ly9naXRodWIuY29t
GITHUB_ORG: amFudXMtcWU=
K8S_CLUSTER_NAME: Y2k1aGp2ZmYwMG8yZzY2OXZxOGc=
K8S_CLUSTER_API_SERVER_URL: aHR0cHM6Ly9jMTE0LWUuZXUtZGUuY29udGFpbmVycy5jbG91ZC5pYm0uY29tOjMxNTA2
K8S_SERVICE_ACCOUNT_TOKEN: dGVtcA==
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ test.describe('dynamic-plugins-info backend plugin', () => {
resPlugin.platform === plugin.platform,
);

expect(isPluginIncluded).toBeTruthy();
expect(
isPluginIncluded,
`Plugin not found: ${JSON.stringify(plugin)}`,
).toBeTruthy();
}
});
});
4 changes: 3 additions & 1 deletion e2e-tests/playwright/e2e/plugins/ocm.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ let page: Page;
test.describe.serial('Test OCM plugin', () => {
let uiHelper: UIhelper;
let clusters: Clusters;
let common: Common;

test.beforeAll(async ({ browserName }) => {
const browserType = browserName === 'firefox' ? firefox : chromium;
const browser = await browserType.launch();
page = await browser.newPage();

const common = new Common(page);
common = new Common(page);
uiHelper = new UIhelper(page);
clusters = new Clusters(page);

Expand Down Expand Up @@ -54,6 +55,7 @@ test.describe.serial('Test OCM plugin', () => {

test('Navigate to Catalog > resources and verify cluster', async () => {
await uiHelper.openSidebar('Catalog');
await common.waitForLoad();
await uiHelper.selectMuiBox('Kind', 'Resource');
await uiHelper.verifyRowsInTable([clusterDetails.clusterName]);
await uiHelper.clickLink(clusterDetails.clusterName);
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/playwright/support/pageObjects/global-obj.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export const UIhelperPO = {
MuiCard: cardHeading =>
`//div[contains(@class,'MuiCardHeader-root') and descendant::*[text()='${cardHeading}']]/..`,
tabs: '[role="tab"]',
rowByText: (text: string) => `tr:has(td:text-is("${text}"))`,
rowByText: (text: string) => `tr:has(:text-is("${text}"))`,
};
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const plugins = [
{
name: 'backstage-plugin-kubernetes-backend-dynamic',
platform: 'node',
role: 'backend-plugin-module',
role: 'backend-plugin',
},
{
name: 'roadiehq-scaffolder-backend-module-utils-dynamic',
Expand Down

0 comments on commit 617a26d

Please sign in to comment.