Skip to content

Commit a787afc

Browse files
Jakob Schlanstedtwerererer
authored andcommitted
test(server-e2e): fix test for new create note option
1 parent b836760 commit a787afc

File tree

1 file changed

+3
-1
lines changed
  • apps/server-e2e/src/support

1 file changed

+3
-1
lines changed

apps/server-e2e/src/support/app.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ interface GotoOpts {
88
}
99

1010
const BASE_URL = "http://127.0.0.1:8082";
11+
const NUM_OF_CREATE_NOTE_OPTIONS = 2;
1112

1213
interface DropdownLocator extends Locator {
1314
selectOptionByText: (text: string) => Promise<void>;
@@ -73,7 +74,8 @@ export default class App {
7374
const resultsSelector = this.currentNoteSplit.locator(".note-detail-empty-results");
7475
await expect(resultsSelector).toContainText(noteTitle);
7576
await resultsSelector.locator(".aa-suggestion", { hasText: noteTitle })
76-
.nth(1) // Select the second one, as the first one is "Create a new note"
77+
// Select the n+1 one, as the first one is "Create a new note"
78+
.nth(NUM_OF_CREATE_NOTE_OPTIONS)
7779
.click();
7880
}
7981

0 commit comments

Comments
 (0)