diff --git a/tests/e2e/helpers/admin-auth.ts b/tests/e2e/helpers/admin-auth.ts index 7187575..385c4ec 100644 --- a/tests/e2e/helpers/admin-auth.ts +++ b/tests/e2e/helpers/admin-auth.ts @@ -24,7 +24,14 @@ export async function getAdminToken( } export async function installAdminToken(page: Page, token: string) { - await page.addInitScript(value => localStorage.setItem('accessToken', value), token); + await page.addInitScript(value => { + localStorage.setItem('accessToken', value); + localStorage.setItem('refreshToken', 'ci-test-refresh-token'); + // Calculate C# Ticks for 1 hour from now: (JS_ms * 10000) + 621355968000000000 + const expiryMs = Date.now() + 3600 * 1000; + const ticks = (expiryMs * 10000) + 621355968000000000; + localStorage.setItem('tokenExpiry', ticks.toString()); + }, token); } export async function loginThroughAdminUi(