diff --git a/src-ui/cypress/integration/settings.spec.ts b/src-ui/cypress/integration/settings.spec.ts index c19500441..92c4eda6a 100644 --- a/src-ui/cypress/integration/settings.spec.ts +++ b/src-ui/cypress/integration/settings.spec.ts @@ -92,8 +92,8 @@ describe('settings', () => { it('should change the pdf viewer type', () => { cy.visit('/documents/1') cy.get('object[data*="/api/documents/1/preview/"]').should('not.exist') - cy.visit('/settings') - cy.contains('Use PDF viewer provided by the browser').click().wait(1000) // await change to be registered + cy.visit('/settings').wait('@savedViews') + cy.contains('Use PDF viewer provided by the browser').click() cy.contains('button', 'Save').click().wait('@savedViews').wait(1000) cy.visit('/documents/1') cy.get('object[data*="/api/documents/1/preview/"]')