mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fail tests in before and after handles
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
74fc8b42ad
commit
7395d0c343
@ -14,7 +14,11 @@ describe("Lens integration tests", () => {
|
|||||||
|
|
||||||
describe("app start", () => {
|
describe("app start", () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
app = await utils.appStart();
|
try {
|
||||||
|
app = await utils.appStart();
|
||||||
|
} catch (error) {
|
||||||
|
fail(error);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|||||||
@ -34,11 +34,21 @@ describe("Lens cluster pages", () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
describe("cluster add", () => {
|
describe("cluster add", () => {
|
||||||
beforeAll(async () => app = await utils.appStart());
|
beforeAll(async () => {
|
||||||
|
try {
|
||||||
|
app = await utils.appStart();
|
||||||
|
} catch (error) {
|
||||||
|
fail(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
if (app?.isRunning()) {
|
try {
|
||||||
return utils.tearDown(app);
|
if (app?.isRunning()) {
|
||||||
|
await utils.tearDown(app);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
fail(error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -56,11 +66,21 @@ describe("Lens cluster pages", () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
describe("cluster menu pages", () => {
|
describe("cluster menu pages", () => {
|
||||||
beforeAll(appStartAddCluster);
|
beforeAll(async () => {
|
||||||
|
try {
|
||||||
|
await appStartAddCluster();
|
||||||
|
} catch (error) {
|
||||||
|
fail(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
if (app?.isRunning()) {
|
try {
|
||||||
return utils.tearDown(app);
|
if (app?.isRunning()) {
|
||||||
|
await utils.tearDown(app);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
fail(error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -438,14 +458,23 @@ describe("Lens cluster pages", () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
abortContoller = new AbortController();
|
abortContoller = new AbortController();
|
||||||
await appStartAddCluster();
|
|
||||||
|
try {
|
||||||
|
await appStartAddCluster();
|
||||||
|
} catch (error) {
|
||||||
|
fail(error);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
abortContoller.abort();
|
abortContoller.abort();
|
||||||
|
|
||||||
if (app?.isRunning()) {
|
try {
|
||||||
await utils.tearDown(app);
|
if (app?.isRunning()) {
|
||||||
|
await utils.tearDown(app);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
fail(error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -485,11 +514,21 @@ describe("Lens cluster pages", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe("cluster operations", () => {
|
describe("cluster operations", () => {
|
||||||
beforeEach(appStartAddCluster);
|
beforeEach(async () => {
|
||||||
|
try {
|
||||||
|
await appStartAddCluster();
|
||||||
|
} catch (error) {
|
||||||
|
fail(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
afterEach(async () => {
|
afterEach(async () => {
|
||||||
if (app?.isRunning()) {
|
try {
|
||||||
return utils.tearDown(app);
|
if (app?.isRunning()) {
|
||||||
|
await utils.tearDown(app);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
fail(error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -7,11 +7,21 @@ describe("Lens command palette", () => {
|
|||||||
let app: Application;
|
let app: Application;
|
||||||
|
|
||||||
describe("menu", () => {
|
describe("menu", () => {
|
||||||
beforeAll(async () => app = await utils.appStart());
|
beforeAll(async () => {
|
||||||
|
try {
|
||||||
|
app = await utils.appStart();
|
||||||
|
} catch (error) {
|
||||||
|
fail(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
if (app?.isRunning()) {
|
try {
|
||||||
await utils.tearDown(app);
|
if (app?.isRunning()) {
|
||||||
|
await utils.tearDown(app);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
fail(error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -14,13 +14,21 @@ describe("Lens integration tests", () => {
|
|||||||
|
|
||||||
utils.describeIf(ready)("workspaces", () => {
|
utils.describeIf(ready)("workspaces", () => {
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
app = await utils.appStart();
|
try {
|
||||||
await utils.clickWhatsNew(app);
|
app = await utils.appStart();
|
||||||
|
await utils.clickWhatsNew(app);
|
||||||
|
} catch (error) {
|
||||||
|
fail(error);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterAll(async () => {
|
||||||
if (app && app.isRunning()) {
|
try {
|
||||||
return utils.tearDown(app);
|
if (app?.isRunning()) {
|
||||||
|
await utils.tearDown(app);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
fail(error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user