Skip to content

Fix tests flakiness.#1121

Merged
martinRenou merged 3 commits intogeojupyter:mainfrom
nakul-py:fix1119
Feb 18, 2026
Merged

Fix tests flakiness.#1121
martinRenou merged 3 commits intogeojupyter:mainfrom
nakul-py:fix1119

Conversation

@nakul-py
Copy link
Collaborator

@nakul-py nakul-py commented Feb 15, 2026

Description

This PR updates the beforeEach function in ui-tests/tests/contextmenu.spec.ts to delete and upload a new document before each test. So this removes the flakiness of the test as discussed in #1119 (comment)

Checklist

  • PR has a descriptive title and content.
  • PR description contains references to any issues the PR resolves, e.g. Resolves #XXX.
  • PR has one of the labels: documentation, bug, enhancement, feature, maintenance
  • Checks are passing.
    Failing lint checks can be resolved with:
    • pre-commit run --all-files
    • jlpm run lint

📚 Documentation preview: https://jupytergis--1121.org.readthedocs.build/en/1121/
💡 JupyterLite preview: https://jupytergis--1121.org.readthedocs.build/en/1121/lite

@github-actions
Copy link
Contributor

Binder 👈 Launch a Binder on branch nakul-py/jupytergis/fix1119

@nakul-py nakul-py added the maintenance Fixing lint errors, changing project metadata, changing tooling, changing dependencies, etc. label Feb 15, 2026
@nakul-py nakul-py requested a review from mfisher87 February 15, 2026 07:33
@github-actions
Copy link
Contributor

github-actions bot commented Feb 15, 2026

Integration tests report: appsharing.space

@mfisher87
Copy link
Member

mfisher87 commented Feb 15, 2026

I think this actually wouldn't close #1119, since that bug happens outside of a test context. But fixing the test flakiness is still good :) Could you provide some background on why this fixes the test flakiness? 🤔

Would fixing the underlying but #1119 also fix the flaky test? If the flaky test is telling us about a bug, I think I'd rather not address the flakiness and instead address the bug. That way if the bug ever regresses, we'll know because the test will become flaky again. What do you think?

@nakul-py
Copy link
Collaborator Author

This doesn’t fix #1119 itself, but it fixes test flakiness.

Previously we only closed activities between tests, which resets the UI but not the underlying JupyterGIS document. Since all tests reopened the same .jGIS file path, model state (layers, selection, rename state) leaked across tests, making locators ambiguous and causing F2/rename timeouts.

Re-uploading the .jGIS file in beforeEach guarantees a fresh document + model per test, so every test starts from the same baseline and the flakiness goes away.

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

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

Thanks! waitForTimeout(1000) is bound to generate flakyness, happy that it's removed

@martinRenou martinRenou merged commit 4028eba into geojupyter:main Feb 18, 2026
17 checks passed
@nakul-py nakul-py deleted the fix1119 branch February 18, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Fixing lint errors, changing project metadata, changing tooling, changing dependencies, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants