1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Chore: Desktop: Fixes #9873: Fix Playwright test failure due to image not visible (#9874)

This commit is contained in:
Henry Heino 2024-02-08 08:56:12 -08:00 committed by GitHub
parent debd8a6ebe
commit c54603025b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -153,10 +153,12 @@ test.describe('main', () => {
await editor.attachFileButton.click();
const getImageSize = async () => {
// Wait for it to render
const viewerFrame = editor.getNoteViewerIframe();
const renderedImage = viewerFrame.getByAltText(filename);
await renderedImage.waitFor();
// Use state: 'attached' -- we don't need the image to be on the screen (just present
// in the DOM).
await renderedImage.waitFor({ state: 'attached' });
// We load a copy of the image to avoid returning an overriden width set with
// .width = some_number