Skip to content

Commit

Permalink
Revert unnecessary change
Browse files Browse the repository at this point in the history
  • Loading branch information
personalizedrefrigerator committed Nov 19, 2024
1 parent 0b74585 commit 26ca46b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 0 additions & 7 deletions packages/app-desktop/integration-tests/models/NoteList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
7 changes: 6 additions & 1 deletion packages/app-desktop/integration-tests/noteList.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit 26ca46b

Please sign in to comment.