Skip to content

Commit

Permalink
Tweak E2E tests to make them less flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-grace committed Mar 12, 2024
1 parent 6f13825 commit fe3d9b4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/e2e/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ export class App {
private async clickSettingsMenu(): Promise<void> {
// All test ids for the sake of language-related tests.
const document = await this.document();
await document.waitForSelector('[data-testid="settings"]');
return (await document.findByTestId("settings")).click();
}

Expand Down Expand Up @@ -745,6 +746,7 @@ export class App {

async connect(): Promise<void> {
const document = await this.document();
await document.waitForSelector('[data-testid="more-connect-options"]');
const moreConnectOptions = await document.findByTestId(
"more-connect-options"
);
Expand Down
2 changes: 1 addition & 1 deletion src/e2e/documentation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import { App } from "./app";

describe("documentaion", () => {
describe("documentation", () => {
const app = new App();
beforeEach(app.reset.bind(app));
afterEach(app.screenshot.bind(app));
Expand Down
2 changes: 1 addition & 1 deletion src/e2e/edits.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe("edits", () => {
await app.reloadPage();

await app.findVisibleEditorContents(/A change/, {
timeout: 2_000,
timeout: 5_000,
});
});
});

0 comments on commit fe3d9b4

Please sign in to comment.