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:
parent
af961a3004
commit
1676ec4981
@ -25,6 +25,7 @@ describe("Lens cluster pages", () => {
|
|||||||
let clusterAdded = false;
|
let clusterAdded = false;
|
||||||
const addCluster = async () => {
|
const addCluster = async () => {
|
||||||
await utils.clickWhatsNew(app);
|
await utils.clickWhatsNew(app);
|
||||||
|
await utils.clickWelcomeNotification(app);
|
||||||
await addMinikubeCluster(app);
|
await addMinikubeCluster(app);
|
||||||
await waitForMinikubeDashboard(app);
|
await waitForMinikubeDashboard(app);
|
||||||
await app.client.click('a[href="/nodes"]');
|
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);
|
expect(clusterAdded).toBe(true);
|
||||||
// Go to Pods page
|
// Go to Pods page
|
||||||
await app.client.click(".sidebar-nav [data-test-id='workloads'] span.link-text");
|
await app.client.click(".sidebar-nav [data-test-id='workloads'] span.link-text");
|
||||||
|
|||||||
@ -50,6 +50,15 @@ export async function clickWhatsNew(app: Application) {
|
|||||||
await app.client.waitUntilTextExists("h2", "default");
|
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>;
|
type AsyncPidGetter = () => Promise<number>;
|
||||||
|
|
||||||
export async function tearDown(app: Application) {
|
export async function tearDown(app: Application) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user