Skip to content

Commit

Permalink
Merge pull request #2497 from nextcloud/backport/2496/stable30
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Sep 14, 2024
2 parents d68a2c5 + 2efe03b commit bde93f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cypress/e2e/visual-regression.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ describe('Visual regression tests', function() {
cy.window().then((win) => {
// Load roboto font for visual regression consistency
win.loadRoboto = true
win.document.body.style.fontFamily = 'Roboto'
win.document.body.style.setProperty('--font-face', 'Roboto')
win.document.body.style.setProperty('font-family', 'Roboto')
})
})

Expand All @@ -52,9 +53,11 @@ describe('Visual regression tests', function() {
})

it('Open the viewer on file click', function() {
cy.intercept('GET', '**/viewer/css/fonts/roboto-*').as('roboto-font')
cy.intercept('GET', '**/core/preview*').as('image1')
cy.intercept('GET', '/remote.php/dav/files/*/test-card.mp4').as('video')
cy.openFile('test-card.mp4')
cy.wait('@roboto-font')
cy.wait('@video')
// We preload images, so we can check its loading here and not when clicking next
cy.wait('@image1')
Expand Down

0 comments on commit bde93f7

Please sign in to comment.