mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-19 20:31:46 +02:00
Chore: Desktop: Retry creating new notes in automated tests (#11378)
This commit is contained in:
parent
0fadf1b0be
commit
e4c6b9c2b2
@ -33,9 +33,14 @@ export default class MainScreen {
|
||||
public async createNewNote(title: string) {
|
||||
await this.waitFor();
|
||||
|
||||
await this.newNoteButton.click();
|
||||
await expect(this.noteEditor.noteTitleInput).toHaveValue('');
|
||||
await expect(this.noteEditor.noteTitleInput).toHaveJSProperty('placeholder', 'Creating new note...');
|
||||
// Create the new note. Retry this -- creating new notes can sometimes fail if done just after
|
||||
// application startup.
|
||||
await expect.poll(async () => {
|
||||
await this.newNoteButton.click();
|
||||
await expect(this.noteEditor.noteTitleInput).toHaveValue('', { timeout: 4_000 });
|
||||
await expect(this.noteEditor.noteTitleInput).toHaveJSProperty('placeholder', 'Creating new note...', { timeout: 4_000 });
|
||||
return true;
|
||||
}, { timeout: 10_000 }).toBe(true);
|
||||
|
||||
// Fill the title
|
||||
await this.noteEditor.noteTitleInput.click();
|
||||
|
Loading…
Reference in New Issue
Block a user