diff --git a/packages/app-desktop/integration-tests/models/NoteList.ts b/packages/app-desktop/integration-tests/models/NoteList.ts index 86990e7e884..72eb70612eb 100644 --- a/packages/app-desktop/integration-tests/models/NoteList.ts +++ b/packages/app-desktop/integration-tests/models/NoteList.ts @@ -35,11 +35,4 @@ export default class NoteList { public async expectNoteToBeSelected(title: string|RegExp) { await expect(this.getNoteItemByTitle(title)).toHaveAttribute('aria-selected', 'true'); } - - public expectNoteCountToBe(count: number) { - return expect.poll(async () => { - const firstItem = this.container.locator('[role=option][aria-setsize]').first(); - return firstItem.evaluate(element => Number(element.ariaSetSize)); - }).toBe(count); - } } diff --git a/packages/app-desktop/integration-tests/noteList.spec.ts b/packages/app-desktop/integration-tests/noteList.spec.ts index 4210002e22a..2affee7e286 100644 --- a/packages/app-desktop/integration-tests/noteList.spec.ts +++ b/packages/app-desktop/integration-tests/noteList.spec.ts @@ -89,11 +89,16 @@ test.describe('noteList', () => { const noteList = mainScreen.noteList; await noteList.sortByTitle(electronApp); await noteList.focusContent(electronApp); - await noteList.expectNoteCountToBe(4); // The most recently-created note should be visible const note4Item = noteList.getNoteItemByTitle('note_4'); + const note3Item = noteList.getNoteItemByTitle('note_3'); + const note2Item = noteList.getNoteItemByTitle('note_2'); + const note1Item = noteList.getNoteItemByTitle('note_1'); await expect(note4Item).toBeVisible(); + await expect(note3Item).toBeVisible(); + await expect(note2Item).toBeVisible(); + await expect(note1Item).toBeVisible(); await noteList.expectNoteToBeSelected('note_4');