Skip to content

Commit

Permalink
chore: fix cypress visual regression and modal name selector
Browse files Browse the repository at this point in the history
Signed-off-by: skjnldsv <[email protected]>
  • Loading branch information
skjnldsv committed Aug 6, 2024
1 parent ca3f7ec commit 9f3b30e
Show file tree
Hide file tree
Showing 42 changed files with 33 additions and 676 deletions.
Binary file added css/fonts/roboto-cyrillic-400-normal.woff
Binary file not shown.
Binary file added css/fonts/roboto-cyrillic-400-normal.woff2
Binary file not shown.
Binary file added css/fonts/roboto-cyrillic-ext-400-normal.woff
Binary file not shown.
Binary file added css/fonts/roboto-cyrillic-ext-400-normal.woff2
Binary file not shown.
Binary file added css/fonts/roboto-greek-400-normal.woff
Binary file not shown.
Binary file added css/fonts/roboto-greek-400-normal.woff2
Binary file not shown.
Binary file added css/fonts/roboto-latin-400-normal.woff
Binary file not shown.
Binary file added css/fonts/roboto-latin-400-normal.woff2
Binary file not shown.
Binary file added css/fonts/roboto-latin-ext-400-normal.woff
Binary file not shown.
Binary file added css/fonts/roboto-latin-ext-400-normal.woff2
Binary file not shown.
Binary file added css/fonts/roboto-vietnamese-400-normal.woff
Binary file not shown.
Binary file added css/fonts/roboto-vietnamese-400-normal.woff2
Binary file not shown.
2 changes: 1 addition & 1 deletion cypress/e2e/a11y.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('A11y tests', function() {
})

it('See the title on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', 'image2.jpg')
cy.get('body > .viewer .modal-header__name').should('contain', 'image2.jpg')
})

it('Should have rendered the previous video and the next image', function() {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/actions/sidebar.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('Open the sidebar from the viewer and open viewer with sidebar already
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header__name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/audios/audios.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('Open mp3 and ogg audio in viewer', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', 'audio.mp3')
cy.get('body > .viewer .modal-header__name').should('contain', 'audio.mp3')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/images/images-custom-list-loadmore.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ describe('Open custom list of images in viewer with pagination', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header__name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/images/images-custom-list.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('Open custom images list in viewer', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header__name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})
Expand Down Expand Up @@ -134,7 +134,7 @@ describe('Open custom images list in viewer', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', 'image3.jpg')
cy.get('body > .viewer .modal-header__name').should('contain', 'image3.jpg')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})
Expand All @@ -160,7 +160,7 @@ describe('Open custom images list in viewer', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header__name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/images/images.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('Open images in viewer', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header__name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/mixins/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function(fileName = 'audio.ogg', mimeType = 'audio/ogg') {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', fileName)
cy.get('body > .viewer .modal-header__name').should('contain', fileName)
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/mixins/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function(fileName = 'image1.jpg', mimeType = 'image/jpeg', source
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', fileName)
cy.get('body > .viewer .modal-header__name').should('contain', fileName)
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/mixins/oddname.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default function(file, type, sidebar = false) {
*/
function menuOk() {
cy.get('body > .viewer .icon-error').should('not.exist')
cy.get('body > .viewer .modal-name').should('contain', placedName)
cy.get('body > .viewer .modal-header__name').should('contain', placedName)
cy.get('body > .viewer .modal-header button.header-close').should(
'be.visible',
)
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/mixins/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default function(fileName = 'image1.jpg', mimeType = 'image/jpeg') {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', fileName)
cy.get('body > .viewer .modal-header__name').should('contain', fileName)
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/non-dav-files.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('Open non-dav files in viewer', function() {
})

it('See the title and close button on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', basename)
cy.get('body > .viewer .modal-header__name').should('contain', basename)
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/sharing/download-share-disabled.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe(`Download ${fileName} in viewer`, function() {
})

it('See the title on the viewer header but not the Download nor the menu button', function() {
cy.get('body > .viewer .modal-name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header__name').should('contain', 'image1.jpg')
cy.get('body a[download="image1.jpg"]').should('not.exist')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('not.exist')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/sharing/download-share.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe(`Download ${fileName} from viewer in link share`, function() {
})

it('See the title and the close icon on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header__name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})

Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/sharing/files-shares.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('See shared folder with link share', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header__name').should('contain', 'image1.jpg')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})

Expand Down Expand Up @@ -141,7 +141,7 @@ describe('See shared folder with link share', function() {
cy.get('body > .viewer .modal-container video').should('have.length', 1)
cy.get('body > .viewer button.prev').should('be.visible')
cy.get('body > .viewer button.next').should('be.visible')
cy.get('body > .viewer .modal-name').should('contain', 'video1.mp4')
cy.get('body > .viewer .modal-header__name').should('contain', 'video1.mp4')
})

it('Does not see a loading animation', function() {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/videos/videos.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('Open mp4 videos in viewer', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', 'video1.mp4')
cy.get('body > .viewer .modal-header__name').should('contain', 'video1.mp4')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/visual-regression.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('Visual regression tests ', function() {
})

it('See the menu icon and title on the viewer header', function() {
cy.get('body > .viewer .modal-name').should('contain', 'test-card.mp4')
cy.get('body > .viewer .modal-header__name').should('contain', 'test-card.mp4')
cy.get('body > .viewer .modal-header button.action-item__menutoggle').should('be.visible')
cy.get('body > .viewer .modal-header button.header-close').should('be.visible')
})
Expand Down Expand Up @@ -108,7 +108,7 @@ describe('Visual regression tests ', function() {
cy.get('body > .viewer').should('not.exist')
cy.openFile('test-card.png')
cy.get('body > .viewer').should('be.visible')
cy.get('body > .viewer .modal-name').should('contain', 'test-card.png')
cy.get('body > .viewer .modal-header__name').should('contain', 'test-card.png')
cy.get('body > .viewer .modal-container img').should('have.length', 1)
cy.get('body > .viewer .modal-container img').should('have.attr', 'src')
cy.get('body > .viewer button.prev').should('be.visible')
Expand Down
4 changes: 2 additions & 2 deletions js/viewer-main.js

Large diffs are not rendered by default.

Loading

0 comments on commit 9f3b30e

Please sign in to comment.