You've already forked joplin
							
							
				mirror of
				https://github.com/laurent22/joplin.git
				synced 2025-10-31 00:07:48 +02:00 
			
		
		
		
	Chore: Desktop: Retry creating new notes in automated tests (#11378)
This commit is contained in:
		| @@ -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(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user