Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]>
  • Loading branch information
mejo- authored and backportbot[bot] committed Sep 15, 2024
commit 3a1005b628ce20bc645c33bad1c20b74975f19a6
6 changes: 2 additions & 4 deletions cypress/e2e/nodes/ImageView.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ describe('Image View', () => {
cy.createFolder('child-folder')
cy.uploadFile('github.png', 'image/png')
cy.uploadFile('github.png', 'image/png', 'child-folder/github.png')

})

beforeEach(() => {
Expand Down Expand Up @@ -110,11 +111,8 @@ describe('Image View', () => {
describe('native attachments', () => {
before(() => {
cy.login(user)
cy.visit('/apps/files')
const fileName = 'native attachments.md'
cy.createMarkdown(fileName, '# open image in modal\n\n ![git](.attachments.123/github.png)\n\n ![file.txt.gz](.attachments.123/file.txt.gz)')

cy.getFileId(fileName).then((fileId) => {
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) => {
const attachmentsFolder = `.attachments.${fileId}`
cy.createFolder(attachmentsFolder)
cy.uploadFile('github.png', 'image/png', `${attachmentsFolder}/github.png`)
Expand Down