Skip to content

Fix e2e tests flake connected with tooltips and task creation - #11011

Open
archibald1418 wants to merge 11 commits into
developfrom
ov/ci-e2e-fix-tooltips
Open

Fix e2e tests flake connected with tooltips and task creation#11011
archibald1418 wants to merge 11 commits into
developfrom
ov/ci-e2e-fix-tooltips

Conversation

@archibald1418

@archibald1418 archibald1418 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Tooltip-related failures (from cvat nightly):

  1. case_114_backup_restore_project - after clicking on save icon, tooltip doesn’t disappear, obscures ‘Projects’ tab from view, further tests crash because of this
    https://github.com/cvat-ai/cvat/actions/runs/30721083352/job/91425080802

  2. actions_projects_models/case_114_backup_restore_project.js - after creating a task with tags, UI checks can’t find tag annotations in job, probably the render was done before write to database happened. Fix: guard PUT annotation request with intercept.
    If this is not enough, will further harden this with retry-able checks of annotations' insides. This is an extra API GET request to jobs/annotations
    https://github.com/cvat-ai/cvat/actions/runs/31115486464/job/92665432017

Task create failure in annotations_actions.js

A complicated task is being created in the setup, with non-trivial annotations. annotations_actions.js opened a job and expected to see tags, but couldn't, failing the test. This adds an intercept to PUT request, it was not guarded before and was called through a s call to cvat.server.request

@archibald1418 archibald1418 changed the title Ov/ci-e2e-fix-tooltips Fix e2e tests flake connected with tooltips and task creation Aug 7, 2026
@archibald1418

archibald1418 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

app.cvat.ai nightly base_e2e https://github.com/cvat-ai/app.cvat.ai/actions/runs/31171703770

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@archibald1418

Copy link
Copy Markdown
Contributor Author

/check

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

✔️ All checks completed successfully
📄 See logs here

@archibald1418
archibald1418 requested a review from klakhov August 7, 2026 11:59
@archibald1418

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 30362a0026

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}]).flat();

cy.window().then((window) => {
cy.intercept('PUT', `/api/jobs/${jobId}/annotations**`).as('putAnnotations');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Register the intercept before starting the request

When this setup hook calls window.cvat.server.request, the request begins asynchronously while the newly added cy.intercept is still only queued for execution inside the current cy.window().then() callback. Consequently the PUT can pass before the route is registered, leaving cy.wait('@putAnnotations') to time out and making this spec fail instead of removing the flake. Register the intercept before cy.window(), then return or wrap the request promise.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

makes sense, moved intercept to the previous line

Comment on lines 157 to 161
cy.window().then((window) => {
window.cvat.server.request(`/api/jobs/${jobId}/annotations`, {
method: 'PUT',
data: { shapes, tracks, tags },
});

@klakhov klakhov Aug 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we really need to intercept request that is made out of the test? This feature should be used against requests that are made by app itself.

We can wait for it like this, i guess it will fail if its not 2xx:

cy.window().then((window) => window.cvat.server.request(
    `/api/jobs/${jobId}/annotations`,
    { method: 'PUT', data: { shapes } },
));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We can just use cy.request(...).its('status').should('eq', 200). cy.request will always wait since it's a command, not an invocation of async function. Also, it will show in command log, adding visibility to setup

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

or at least cy.wrap it

@archibald1418

archibald1418 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

TODO: check features2/new_organization_pipeline.js from #11020

UPD:
attempt 1 - success
attempt 2 - FAIL

attempt3 - success

@archibald1418

Copy link
Copy Markdown
Contributor Author

/check

1 similar comment
@archibald1418

Copy link
Copy Markdown
Contributor Author

/check

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

✔️ All checks completed successfully
📄 See logs here

@archibald1418

Copy link
Copy Markdown
Contributor Author

/check

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

❌ Some checks failed
📄 See logs here

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

✔️ All checks completed successfully
📄 See logs here

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