From d8d91451c84220b863e41ddf786ace603a0c2cf7 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Fri, 30 Jan 2026 08:11:32 +0200 Subject: [PATCH] e2e(server): fix some flakiness in support app --- apps/server-e2e/src/support/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/server-e2e/src/support/app.ts b/apps/server-e2e/src/support/app.ts index 86cbb855a..da229607b 100644 --- a/apps/server-e2e/src/support/app.ts +++ b/apps/server-e2e/src/support/app.ts @@ -59,7 +59,7 @@ export default class App { // Wait for the page to load. if (url === "/") { - await expect(this.page.locator(".tree")).toContainText("Trilium Integration Test"); + await expect(this.page.locator(".tree", { hasText: "Trilium Integration Test" })).toBeVisible(); if (!preserveTabs) { await this.closeAllTabs(); } @@ -76,7 +76,7 @@ export default class App { const suggestionSelector = resultsSelector.locator(".aa-suggestion") .nth(1); // Select the second one (best candidate), as the first one is "Create a new note" await expect(suggestionSelector).toContainText(noteTitle); - suggestionSelector.click(); + await suggestionSelector.click(); } async goToSettings() {