Skip to content

Build your personal knowledge base with Trilium Notes

e2e(server): fix some flakiness in support app

Elian Dorand8d91451c842
diff --git a/apps/server-e2e/src/support/app.ts b/apps/server-e2e/src/support/app.ts
index 86cbb855a0..da229607b8 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() {