Skip to content
Merged
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
18 changes: 9 additions & 9 deletions tests/src/openshift-local-extension.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**********************************************************************

Check notice on line 1 in tests/src/openshift-local-extension.spec.ts

View check run for this annotation

Podman Desktop Triager / Domain Review Status

QE

Approved
* Copyright (C) 2024 Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -29,8 +29,8 @@
const extensionLabelNameCrc = 'openshift-local';
const extensionLabelAuthentication = 'redhat.redhat-authentication';
const extensionLabelNameAuthentication = 'redhat-authentication';
const activeExtensionStatus = 'ACTIVE';
const disabledExtensionStatus = 'DISABLED';
const activeExtensionStatus = 'Installed';
const disabledExtensionStatus = 'Disabled';
const notInstalledExtensionStatus = 'NOT-INSTALLED';
const skipInstallation = process.env.SKIP_INSTALLATION ? process.env.SKIP_INSTALLATION : false;

Expand Down Expand Up @@ -81,7 +81,7 @@
await extensions.extensionIsInstalled(extensionLabelCrc), { timeout: 30000 },
).toBeTruthy();
const extensionCard = await extensions.getInstalledExtension(extensionLabelNameCrc, extensionLabelCrc);
await playExpect(extensionCard.status).toHaveText(activeExtensionStatus);
await playExpect(extensionCard.status).toContainText(activeExtensionStatus);
});

test('Extension\'s dependency, Red Hat Authentication, (card) is installed, present and active', async ({ navigationBar }) => {
Expand All @@ -90,7 +90,7 @@
await extensions.extensionIsInstalled(extensionLabelAuthentication), { timeout: 30000 },
).toBeTruthy();
const extensionCard = await extensions.getInstalledExtension(extensionLabelNameAuthentication, extensionLabelAuthentication);
await playExpect(extensionCard.status).toHaveText(activeExtensionStatus);
await playExpect(extensionCard.status).toContainText(activeExtensionStatus);
});

test('Extension\'s details show correct status, no error', async ({ page,navigationBar }) => {
Expand All @@ -99,7 +99,7 @@
await extensionCard.openExtensionDetails('Red Hat OpenShift Local');
const details = new OpenShiftLocalExtensionPage(page);
await playExpect(details.heading).toBeVisible();
await playExpect(details.status).toHaveText(activeExtensionStatus);
await playExpect(details.status).toContainText(activeExtensionStatus);
const errorTab = details.tabs.getByRole('button', { name: 'Error' });
// we would like to propagate the error's stack trace into test failure message
let stackTrace = '';
Expand All @@ -116,9 +116,9 @@
const extensions = await navigationBar.openExtensions();
await playExpect.poll(async() => await extensions.extensionIsInstalled(extensionLabelCrc), { timeout: 30000 }).toBeTruthy();
const extensionCard = await extensions.getInstalledExtension(extensionLabelNameCrc, extensionLabelCrc);
await playExpect(extensionCard.status).toHaveText(activeExtensionStatus);
await playExpect(extensionCard.status).toContainText(activeExtensionStatus);
await extensionCard.disableExtension();
await playExpect(extensionCard.status).toHaveText(disabledExtensionStatus);
await playExpect(extensionCard.status).toContainText(disabledExtensionStatus);
//checking dashboard assets
const dashboard = await navigationBar.openDashboard();
await playExpect(dashboard.openshiftLocalProvider).toHaveCount(0);
Expand All @@ -131,9 +131,9 @@
const extensions = await navigationBar.openExtensions();
await playExpect.poll(async() => await extensions.extensionIsInstalled(extensionLabelCrc), { timeout: 30000 }).toBeTruthy();
const extensionCard = await extensions.getInstalledExtension(extensionLabelNameCrc, extensionLabelCrc);
await playExpect(extensionCard.status).toHaveText(disabledExtensionStatus);
await playExpect(extensionCard.status).toContainText(disabledExtensionStatus);
await extensionCard.enableExtension();
await playExpect(extensionCard.status).toHaveText(activeExtensionStatus);
await playExpect(extensionCard.status).toContainText(activeExtensionStatus);
//checking dashboard assets
const dashboard = await navigationBar.openDashboard();
await playExpect(dashboard.openshiftLocalProvider).toBeVisible();
Expand Down
Loading