Always use mockable location methods (#11929)

* Always use mockable location methods
* Add eslint rules for window.location calls/assignment
* Add useLocation hook
* Update tests

GitOrigin-RevId: eafb846db89f884a7a9a8570cce7745be605152c
This commit is contained in:
Alf Eaton
2023-03-17 09:05:21 +00:00
committed by Copybot
parent 49f1312b27
commit f375362894
48 changed files with 381 additions and 265 deletions
@@ -125,6 +125,7 @@ describe('UserActivateRegister', function () {
const body = JSON.parse(req.body)
if (body.email === 'abc@gmail.com') return endPointResponse1
else if (body.email === 'def@gmail.com') return endPointResponse2
else return 500
})
const registerInput = screen.getByLabelText('emails to register')
const registerButton = screen.getByRole('button', { name: /register/i })