Skip to content

Commit 3a1005b

Browse files
mejo-backportbot[bot]
authored andcommitted
test(cy): Fix ImageView native tests
Use `createFile` instead of `createMarkdown` in `before()` block. No idea why, but it fixes the tests reliably. Signed-off-by: Jonas <[email protected]>
1 parent 91f982a commit 3a1005b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cypress/e2e/nodes/ImageView.spec.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ describe('Image View', () => {
1616
cy.createFolder('child-folder')
1717
cy.uploadFile('github.png', 'image/png')
1818
cy.uploadFile('github.png', 'image/png', 'child-folder/github.png')
19+
1920
})
2021

2122
beforeEach(() => {
@@ -110,11 +111,8 @@ describe('Image View', () => {
110111
describe('native attachments', () => {
111112
before(() => {
112113
cy.login(user)
113-
cy.visit('/apps/files')
114114
const fileName = 'native attachments.md'
115-
cy.createMarkdown(fileName, '# open image in modal\n\n ![git](.attachments.123/github.png)\n\n ![file.txt.gz](.attachments.123/file.txt.gz)')
116-
117-
cy.getFileId(fileName).then((fileId) => {
115+
cy.createFile(fileName, '# open image in modal\n\n ![git](.attachments.123/github.png)\n\n ![file.txt.gz](.attachments.123/file.txt.gz)').then((fileId) => {
118116
const attachmentsFolder = `.attachments.${fileId}`
119117
cy.createFolder(attachmentsFolder)
120118
cy.uploadFile('github.png', 'image/png', `${attachmentsFolder}/github.png`)

0 commit comments

Comments
 (0)