Skip to content

Commit

Permalink
chore(tests): check inside settings/preferences
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Villanueva <davillan@redhat.com>
  • Loading branch information
danivilla9 committed Nov 11, 2024
1 parent e0cce79 commit f6896a0
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/src/openshift-local-extension.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,11 @@ test.describe.serial('Red Hat OpenShift Local extension verification', () => {
const settingsBar = await navigationBar.openSettings();
await playExpect(resourcesPage.card).toHaveCount(0);
//checking settings/preferences assets
//const preferencesPage = await settingsBar.openTabPage(PreferencesPage);
const preferencesTab = await preferencesPage.getTab();
await preferencesTab.click();
//await playExpect(preferencesTab.getByLabel('Extension: Red Hat OpenShift Local')).not.toBeVisible(); //this step will fail
//await playExpect(preferencesPage.getPage().getByRole('region', {name: 'Content'}).getByText('Extension: Red Hat OpenShift Local')).toBeVisible(); //this step will fail
await playExpect(settingsBar.getSettingsNavBarTabLocator('Extension: Red Hat OpenShift Local')).not.toBeVisible(); //this step will fail
await playExpect(settingsBar.getSettingsNavBarTabLocator('Extension: Red Hat OpenShift Local')).not.toBeVisible(); //this step will fail
await playExpect(preferencesPage.getPage().getByRole('region', {name: 'Content'}).getByText('Extension: Red Hat OpenShift Local')).toBeVisible(); //this step will fail
});

test('Extension can be re-enabled correctly', async ({ navigationBar }) => {
Expand All @@ -151,12 +150,10 @@ test.describe.serial('Red Hat OpenShift Local extension verification', () => {
const settingsBar = await navigationBar.openSettings();
await playExpect(resourcesPage.card).toBeVisible();
//checking settings/preferences assets
//const preferencesPage = await settingsBar.openTabPage(PreferencesPage);
const preferencesTab = await preferencesPage.getTab();
await preferencesTab.click();
//await playExpect(preferencesTab.getByLabel('Extension: Red Hat OpenShift Local')).toBeVisible();
//await playExpect(preferencesPage.getPage().getByRole('region', {name: 'Content'}).getByText('Extension: Red Hat OpenShift Local')).toBeVisible();
await playExpect(settingsBar.getSettingsNavBarTabLocator('Extension: Red Hat OpenShift Local')).toBeVisible();
await playExpect(preferencesPage.getPage().getByRole('region', {name: 'Content'}).getByText('Extension: Red Hat OpenShift Local')).toBeVisible();
});
});

Expand Down

0 comments on commit f6896a0

Please sign in to comment.