Skip to content

Debug flaky cypress test in stable33#8320

Merged
mejo- merged 1 commit intostable33from
chore/fix-flaky-cypress-attachment-test
Mar 9, 2026
Merged

Debug flaky cypress test in stable33#8320
mejo- merged 1 commit intostable33from
chore/fix-flaky-cypress-attachment-test

Conversation

@max-nextcloud
Copy link
Collaborator

@max-nextcloud max-nextcloud commented Mar 9, 2026

Tests have been passing since i pushed this. And I tried them several times. But anyways - with these changes the next test failure will hopefully have a more meaningful output:

  • Avoid retries that fail for unrelated reasons ( not being able to create an already existing directory )
  • Compare file ids of the created file and the moved file. Failures look like these might be changing 🤯

Failures before

Note how there is an attachments folder - just with a different id.

Test all attachment insertion methods -- test if attachment folder is moved with the markdown file (failed)

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@max-nextcloud max-nextcloud force-pushed the chore/fix-flaky-cypress-attachment-test branch 3 times, most recently from 39a3c30 to 7cc9623 Compare March 9, 2026 06:06
.should('have.attr', 'data-cy-files-list-row-fileid')
.then((documentId) => {
const files = attachmentFileNameToId[documentId]
cy.get('@createdFileId').should('eq', parseInt(documentId))
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the failing tests it looks as if the .attachments folder has a different id then expected. So compare the ids first to see if the id changed when moving the file.

@max-nextcloud max-nextcloud marked this pull request as ready for review March 9, 2026 06:31
Also disable retries as the subfolder cannot be created twice
so all retries fail anyways.

Signed-off-by: Max <max@nextcloud.com>
@max-nextcloud max-nextcloud force-pushed the chore/fix-flaky-cypress-attachment-test branch from 7cc9623 to 7690b00 Compare March 9, 2026 06:33
@max-nextcloud
Copy link
Collaborator Author

/backport to main please

@max-nextcloud
Copy link
Collaborator Author

/backport to stable32 please

Copy link
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for investigating, looks sensible to me. I wonder whether we should also forward-port this to main?

@mejo-
Copy link
Member

mejo- commented Mar 9, 2026

I wonder whether we should also forward-port this to main?

Ah just saw you already requested this 😉

@mejo- mejo- merged commit 95ddac8 into stable33 Mar 9, 2026
64 checks passed
@mejo- mejo- deleted the chore/fix-flaky-cypress-attachment-test branch March 9, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants