Repository navigation
test(e2e): allow testing of multiple users - #54752
Merged
huyenltnguyen merged 2 commits intoMay 13, 2024
Merged
Conversation
With these changes it's now possible to switch between users by both seeding the desired user and switching to their storage state
Now that global-setup uses api requests (to save time), this adds a spec to test the ui.
4 tasks done
Sembauke
approved these changes
May 13, 2024
huyenltnguyen
approved these changes
May 13, 2024
4 tasks done
4 tasks done
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.
Checklist:
mainbranch of freeCodeCamp.This allows tests to switch users by seeding the user they want and
test.useing thestorageStateof that user.There is an alternative approach that I didn't go with, but we could consider. Using the same
_idfor whichever user is signed in. i.e. when seeding the db, the[email protected]user would always have the same_id, regardless of the rest of the document. I don't like this because it's not so clear what's going on, but it would mean we could use the samestorageStatefor all users and only need to change the db to change who is signed in.However, neither approach will work for #54751 so I went with the (hopefully) less confusing one for now.