Skip to content

Commit

Permalink
Merge pull request #6374 from nextcloud/fix/cy_imageview
Browse files Browse the repository at this point in the history
test(cy): Fix ImageView native tests
  • Loading branch information
juliushaertl authored Sep 15, 2024
2 parents 03910ed + f10d973 commit ec9b3fc
Showing 1 changed file with 2 additions and 4 deletions.
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

0 comments on commit ec9b3fc

Please sign in to comment.