From a787afcf549e4ccd60f459752e125dfab6255633 Mon Sep 17 00:00:00 2001 From: Jakob Schlanstedt Date: Mon, 3 Nov 2025 19:48:44 +0100 Subject: [PATCH] test(server-e2e): fix test for new create note option --- apps/server-e2e/src/support/app.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/server-e2e/src/support/app.ts b/apps/server-e2e/src/support/app.ts index a0c3ca1ad..ea708e6af 100644 --- a/apps/server-e2e/src/support/app.ts +++ b/apps/server-e2e/src/support/app.ts @@ -8,6 +8,7 @@ interface GotoOpts { } const BASE_URL = "http://127.0.0.1:8082"; +const NUM_OF_CREATE_NOTE_OPTIONS = 2; interface DropdownLocator extends Locator { selectOptionByText: (text: string) => Promise; @@ -73,7 +74,8 @@ export default class App { const resultsSelector = this.currentNoteSplit.locator(".note-detail-empty-results"); await expect(resultsSelector).toContainText(noteTitle); await resultsSelector.locator(".aa-suggestion", { hasText: noteTitle }) - .nth(1) // Select the second one, as the first one is "Create a new note" + // Select the n+1 one, as the first one is "Create a new note" + .nth(NUM_OF_CREATE_NOTE_OPTIONS) .click(); }