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", () => {
|
||||
beforeAll(async () => {
|
||||
app = await utils.appStart();
|
||||
try {
|
||||
app = await utils.appStart();
|
||||
} catch (error) {
|
||||
fail(error);
|
||||
}
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@ -34,11 +34,21 @@ describe("Lens cluster pages", () => {
|
||||
};
|
||||
|
||||
describe("cluster add", () => {
|
||||
beforeAll(async () => app = await utils.appStart());
|
||||
beforeAll(async () => {
|
||||
try {
|
||||
app = await utils.appStart();
|
||||
} catch (error) {
|
||||
fail(error);
|
||||
}
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
if (app?.isRunning()) {
|
||||
return utils.tearDown(app);
|
||||
try {
|
||||
if (app?.isRunning()) {
|
||||
await utils.tearDown(app);
|
||||
}
|
||||
} catch (error) {
|
||||
fail(error);
|
||||
}
|
||||
});
|
||||
|
||||
@ -56,11 +66,21 @@ describe("Lens cluster pages", () => {
|
||||
};
|
||||
|
||||
describe("cluster menu pages", () => {
|
||||
beforeAll(appStartAddCluster);
|
||||
beforeAll(async () => {
|
||||
try {
|
||||
await appStartAddCluster();
|
||||
} catch (error) {
|
||||
fail(error);
|
||||
}
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
if (app?.isRunning()) {
|
||||
return utils.tearDown(app);
|
||||
try {
|
||||
if (app?.isRunning()) {
|
||||
await utils.tearDown(app);
|
||||
}
|
||||
} catch (error) {
|
||||
fail(error);
|
||||
}
|
||||
});
|
||||
|
||||
@ -438,14 +458,23 @@ describe("Lens cluster pages", () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
abortContoller = new AbortController();
|
||||
await appStartAddCluster();
|
||||
|
||||
try {
|
||||
await appStartAddCluster();
|
||||
} catch (error) {
|
||||
fail(error);
|
||||
}
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
abortContoller.abort();
|
||||
|
||||
if (app?.isRunning()) {
|
||||
await utils.tearDown(app);
|
||||
|
||||
try {
|
||||
if (app?.isRunning()) {
|
||||
await utils.tearDown(app);
|
||||
}
|
||||
} catch (error) {
|
||||
fail(error);
|
||||
}
|
||||
});
|
||||
|
||||
@ -485,11 +514,21 @@ describe("Lens cluster pages", () => {
|
||||
});
|
||||
|
||||
describe("cluster operations", () => {
|
||||
beforeEach(appStartAddCluster);
|
||||
beforeEach(async () => {
|
||||
try {
|
||||
await appStartAddCluster();
|
||||
} catch (error) {
|
||||
fail(error);
|
||||
}
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
if (app?.isRunning()) {
|
||||
return utils.tearDown(app);
|
||||
try {
|
||||
if (app?.isRunning()) {
|
||||
await utils.tearDown(app);
|
||||
}
|
||||
} catch (error) {
|
||||
fail(error);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -7,11 +7,21 @@ describe("Lens command palette", () => {
|
||||
let app: Application;
|
||||
|
||||
describe("menu", () => {
|
||||
beforeAll(async () => app = await utils.appStart());
|
||||
beforeAll(async () => {
|
||||
try {
|
||||
app = await utils.appStart();
|
||||
} catch (error) {
|
||||
fail(error);
|
||||
}
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
if (app?.isRunning()) {
|
||||
await utils.tearDown(app);
|
||||
try {
|
||||
if (app?.isRunning()) {
|
||||
await utils.tearDown(app);
|
||||
}
|
||||
} catch (error) {
|
||||
fail(error);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -14,13 +14,21 @@ describe("Lens integration tests", () => {
|
||||
|
||||
utils.describeIf(ready)("workspaces", () => {
|
||||
beforeAll(async () => {
|
||||
app = await utils.appStart();
|
||||
await utils.clickWhatsNew(app);
|
||||
try {
|
||||
app = await utils.appStart();
|
||||
await utils.clickWhatsNew(app);
|
||||
} catch (error) {
|
||||
fail(error);
|
||||
}
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
if (app && app.isRunning()) {
|
||||
return utils.tearDown(app);
|
||||
try {
|
||||
if (app?.isRunning()) {
|
||||
await utils.tearDown(app);
|
||||
}
|
||||
} catch (error) {
|
||||
fail(error);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user