Baoyuantop commented on code in PR #3398:
URL: https://github.com/apache/apisix-dashboard/pull/3398#discussion_r3349157354


##########
e2e/tests/auth.spec.ts:
##########
@@ -60,9 +61,19 @@ test('can auth with admin key', { tag: '@auth' }, async ({ 
page }) => {
       .getByRole('button')
       .click();
 
-    await page.reload();
+    // The key authenticates the current session immediately (it is held in
+    // memory), so the token check now succeeds without a reload.
     await expect(failedMsg).toBeHidden();
   });
+
+  await test.step('admin key is not persisted across a full reload', async () 
=> {
+    // The admin key is kept in memory only and never written to browser
+    // storage, so a hard reload drops it and re-authentication is required.
+    await page.reload();
+    await expect(failedMsg).toBeVisible();
+    await expect(settingsModal).toBeVisible();
+    await expect(adminKeyInput).toBeEmpty();

Review Comment:
   Does this mean I have to reconfigure the admin key every time I refresh the 
page? I'm not sure if this will affect the user experience.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to