Skip to content

Cypress workspace test is flaky when switching between views #7505

@max-nextcloud

Description

@max-nextcloud

Describe the bug
The workspace test has been flaky recently.

It tries to render a workspace when there is none after switching to the 'Recent' view.

To Reproduce
Steps to reproduce the behavior:
See https://github.com/nextcloud/text/actions/runs/16546964854/job/46796529217 for an example of a failed run.

Cypress output
   1) Workspace
       Hides the workspace when switching to another view:
     AssertionError: Timed out retrying after 10000ms: Expected <div#rich-workspace> not to exist in the DOM, but it was continuously found.
      at Context.eval (http://localhost:8081/__cypress/tests?p=cypress/e2e/workspace.spec.js:639:33)

Image

Expected behavior
Workspace should only show if there is one and tests should pass reliably

Screenshots
Some debugging revealed that localHasRichWorkspace is true despite hasRichWorkspace having switched to false. This is most likely due to a getFileInfo request from the previous view finishing afterwards.

Image

Server details:
Text github CI

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtestsIf you write them we ♥ you

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions