mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
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:
parent
d4251519e2
commit
03725f5512
11 changed files with 80 additions and 58 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue