Skip to content

Commit

Permalink
ci(cypress): Use cypress select file
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliushaertl authored and mejo- committed Jun 27, 2023
1 parent b217d0f commit 7944d20
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 24 deletions.
8 changes: 6 additions & 2 deletions cypress/e2e/attachments.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*/

import { initUserAndFiles, randHash, randUser } from '../utils/index.js'
import 'cypress-file-upload'

const user = randUser()
const recipient = randUser()
Expand All @@ -41,7 +40,12 @@ function attachFile(name, requestAlias = null) {
}
return cy.getEditor()
.find('input[type="file"][data-text-el="attachment-file-input"]')
.attachFile(name)
.selectFile([
{
contents: 'cypress/fixtures/' + name,
fileName: name,
},
], { force: true })
}

/**
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/nodes/Mentions.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { initUserAndFiles, randUser } from '../../utils/index.js'
import 'cypress-file-upload'

const user = randUser()
const mentionMe = randUser()
Expand Down
20 changes: 0 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@
"@vue/test-utils": "^1.3.0 <2",
"@vue/vue2-jest": "^29.2.4",
"cypress": "^12.15.0",
"cypress-file-upload": "^5.0.8",
"eslint-plugin-cypress": "^2.13.3",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.5.0",
Expand Down

0 comments on commit 7944d20

Please sign in to comment.