diff --git a/integration/__tests__/cluster-pages.tests.ts b/integration/__tests__/cluster-pages.tests.ts index e73774f86a..1662f33f4a 100644 --- a/integration/__tests__/cluster-pages.tests.ts +++ b/integration/__tests__/cluster-pages.tests.ts @@ -25,6 +25,7 @@ describe("Lens cluster pages", () => { let clusterAdded = false; const addCluster = async () => { await utils.clickWhatsNew(app); + await utils.clickWelcomeNotification(app); await addMinikubeCluster(app); await waitForMinikubeDashboard(app); await app.client.click('a[href="/nodes"]'); @@ -345,7 +346,7 @@ describe("Lens cluster pages", () => { } }); - it(`shows a logs for a pod`, async () => { + it(`shows a log for a pod`, async () => { expect(clusterAdded).toBe(true); // Go to Pods page await app.client.click(".sidebar-nav [data-test-id='workloads'] span.link-text"); diff --git a/integration/helpers/utils.ts b/integration/helpers/utils.ts index e8414fd37c..b749d82f8e 100644 --- a/integration/helpers/utils.ts +++ b/integration/helpers/utils.ts @@ -50,6 +50,15 @@ export async function clickWhatsNew(app: Application) { await app.client.waitUntilTextExists("h2", "default"); } +export async function clickWelcomeNotification(app: Application) { + const itemsText = await app.client.$("ItemListLayout.info-panel").getText(); + if (itemsText === "0 item") { + // welcome notification should be present, dismiss it + await app.client.waitUntilTextExists("Notifications.message", "Welcome!"); + await app.client.click("Notifications.Icon"); + } +} + type AsyncPidGetter = () => Promise; export async function tearDown(app: Application) {