Repository navigation
test(ui): cover namespace switching, access mode and deletion in e2e - #7311
Merged
Merged
Conversation
The members, API key and vault specs each built these by hand, and the namespace tests that follow need all three.
Covers the switching and SSH access mode cases of Domain 5 in the e2e use case map in shellhub-io/team#243. The API key query key carries no tenant, so only the `removeQueries` call in `enterNamespace` keeps one namespace's keys off another's page. The switch test holds the key list request and checks the previous namespace's keys are gone while it is pending. The hold is set before the switch because the switch fetches the new namespace's keys at once. If the cache were kept, the keys would still be fresh, no request would fire, and the test would fail waiting for it instead of on the row. The vault lock test reaches the vault through the sidebar. Any page load locks the vault by itself, so a `goto` would pass even if the switch stopped locking it.
Covers the cloud namespace deletion case of Domain 5 in the e2e use case map in shellhub-io/team#243. The map expects a billing cleanup on delete, but cloud has none: it refuses the delete with a 402 while the subscription is active and allows it once the subscription is canceled, so the test checks that. The test stores the Stripe customer on the fixture's owner because the teardown can no longer read it from a deleted namespace. It reloads the page after canceling so the second attempt starts without the first refusal's dialog state. Reading the owner's namespaces logs in again each time, because the token issued for the deleted namespace gets a 401.
Code Review CompleteThe automated review ran but did not post an updated summary — this usually means no new issues were found since the previous review. If you've pushed changes and want a fresh pass, comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Covers the five Playwright cases of Domain 5 (Namespaces) in the e2e use case map in shellhub-io/team#243.
The API key query key has no tenant, so only
removeQueriesinenterNamespacekeeps one namespace's keys off another's page. The switch test holds the key list request and checks the previous namespace's keys are gone while it is pending.The map's billing case says "cleanup runs", but cloud has no cleanup on delete. It refuses the delete with a 402 while the subscription is active and allows it once canceled, so that is what the test checks. The case will be retitled in the issue.
Evidence
removeQueriescall inenterNamespacedisabled, the switch test fails. With the vault lock on switch disabled, the vault test fails. Without the Stripe cancel, the billing test fails on the final empty namespace list.After: with the code as is,
--repeat-each=3on the new tests passes 6 on community, 12 on enterprise and 15 on cloud. The full suites pass 30 on community and 66 on cloud.Merge Danger
Door: two-way
Blast Radius: tests
Only e2e files change.