1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

first attempt to fix integration test

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
Jim Ehrismann 2021-03-09 14:36:48 -05:00
parent af961a3004
commit 1676ec4981
2 changed files with 11 additions and 1 deletions

View File

@ -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");

View File

@ -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<number>;
export async function tearDown(app: Application) {