Update to cypress 9 and fix firefox upload crash (#1653)

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
This commit is contained in:
Tilman Vatteroth 2021-12-11 21:17:23 +01:00 committed by GitHub
parent d4251519e2
commit 03725f5512
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 80 additions and 58 deletions

View file

@ -136,8 +136,8 @@ describe('History', () => {
})
it('works with valid file', () => {
cy.getById('import-history-file-button').click()
cy.getById('import-history-file-input').attachFile({
cy.getById('import-history-file-button').should('be.visible')
cy.getById('import-history-file-input').attachFixture({
filePath: 'history.json',
mimeType: 'application/json'
})
@ -145,23 +145,23 @@ describe('History', () => {
})
it('fails on invalid file', () => {
cy.getById('import-history-file-button').click()
cy.getById('import-history-file-input').attachFile({
filePath: 'history.json.license',
cy.getById('import-history-file-button').should('be.visible')
cy.getById('import-history-file-input').attachFixture({
filePath: 'invalid-history.txt',
mimeType: 'text/plain'
})
cy.getById('notification-toast').should('be.visible')
})
it('works when selecting two files with the same name', () => {
cy.getById('import-history-file-button').click()
cy.getById('import-history-file-input').attachFile({
cy.getById('import-history-file-button').should('be.visible')
cy.getById('import-history-file-input').attachFixture({
filePath: 'history.json',
mimeType: 'application/json'
})
cy.getById('history-entry-title').should('have.length', 1).contains('cy-Test')
cy.getById('import-history-file-button').click()
cy.getById('import-history-file-input').attachFile({
cy.getById('import-history-file-button').should('be.visible')
cy.getById('import-history-file-input').attachFixture({
filePath: 'history-2.json',
fileName: 'history.json',
mimeType: 'application/json'