Set Cookie on e2e test
This commit is contained in:
@@ -47,11 +47,10 @@ test("User is redirected to login when JWT token is invalid", async t => {
|
|||||||
/**
|
/**
|
||||||
* Test if the user is redirected to login when JWT token is invalid.
|
* Test if the user is redirected to login when JWT token is invalid.
|
||||||
*/
|
*/
|
||||||
const TOKEN = "FOOBAR";
|
|
||||||
const setCookie = ClientFunction(() => {
|
const setCookie = ClientFunction(() => {
|
||||||
document.cookie = `jwt=${TOKEN}`;
|
document.cookie = "jwt=FOOBAR";
|
||||||
});
|
});
|
||||||
|
await setCookie();
|
||||||
await t.navigateTo("/admin/events");
|
await t.navigateTo("/admin/events");
|
||||||
|
|
||||||
const loginForm = Selector("form.admin-login-form");
|
const loginForm = Selector("form.admin-login-form");
|
||||||
|
|||||||
Reference in New Issue
Block a user