Skip to content

Commit

Permalink
Merge pull request #2496 from nextcloud/fix/roboto-cypress-visual
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv committed Sep 14, 2024
2 parents f9ff8e0 + edae219 commit 70979e1
Show file tree
Hide file tree
Showing 5 changed files 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 70979e1

Please sign in to comment.