feat: add e2e tests for change-account and change-org dropdowns #5429
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.
Closes #4053
Adds e2e tests for the 'change account' and 'change org' dropdowns in the multi-org phase 1 global header. The remaining e2e tests for multi-org were completed in #5386 and #5381.
Don't render the header if the server fails to provide the user's account/org data.
Account Dropdown
Organization Dropdown
The hurdle in testing global header is that the URLs targeted by the dropdown include IDPE-generated org IDs. In prod, the IDPE org id and the quartz org ID are the same. In remocal and CI, they are not, because quartz-mock serves static org ids.
This PR makes those links visitable during e2e testing by making one API call to retrieve the IDPE org ID, then intercepting calls to the quartz API and replacing the org id served by quartz mock with the IDPE org id.
Screen.Recording.2022-08-16.at.5.26.44.PM.mov
The
404at the end of the video is intended behavior. Logging out requires a quartz redirect that we can't accomplish during testing, so the test focuses on the target URL, rather than the expected content of the login page.Checklist
Authors and Reviewer(s), please verify the following:
multi-Org