Skip to content

Commit

Permalink
Merge pull request #6384 from nextcloud/backport/6374/stable30
Browse files Browse the repository at this point in the history
[stable30] test(cy): Fix ImageView native tests
  • Loading branch information
mejo- authored Sep 15, 2024
2 parents 6dbf909 + 3a1005b commit ceb621c
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 ceb621c

Please sign in to comment.