Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/smoke/suites/actionBar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function startActionBarTests(): void {
return app.getMainPage();
}

async function dispose() {
async function dispose(this: Mocha.Context): Promise<void> {
if (this.currentTest?.state === "failed") {
SmokeTestLogger.info("Test failed, taking screenshot ...");
await screenshots.takeScreenshots(
Expand Down
4 changes: 2 additions & 2 deletions test/smoke/suites/helper/baseSmokeTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class BaseSmokeTest {
* Common dispose function to be called after each test
* Takes screenshots on failure and closes the app
*/
public static async dispose(this: any): Promise<void> {
public static async dispose(this: Mocha.Context): Promise<void> {
if (this.currentTest?.state === "failed") {
SmokeTestLogger.info("Test failed, taking screenshot ...");
await screenshots.takeScreenshots(
Expand All @@ -30,7 +30,7 @@ export class BaseSmokeTest {
);
}
try {
SmokeTestLogger.info(`Dispose test: "${this.currentTest.title}" ...`);
SmokeTestLogger.info(`Dispose test: "${this.currentTest?.title ?? "unknown"}" ...`);
if (app) {
await app.close();
}
Expand Down