mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-15 22:14:40 +00:00
fix(dashboard): clear local control-panel management key (#1372)
This commit is contained in:
1 parent
e6f764c79b
commit
6c0f7ac39c
2 files changed
+18
No files matched your search
@@ -94,6 +94,7 @@ describe('ControlPanelEmbed', () => {
|
||||
const iframe = await screen.findByTitle('CLIProxy Management Panel');
|
||||
|
||||
expect(iframe).toHaveAttribute('src', '/api/cliproxy-local/management.html');
|
||||
fireEvent.load(iframe);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(window.localStorage.removeItem).toHaveBeenCalledWith('cli-proxy-auth');
|
||||
@@ -107,6 +108,7 @@ describe('ControlPanelEmbed', () => {
|
||||
);
|
||||
expect(window.localStorage.setItem).toHaveBeenCalledWith('managementKey', 'custom-secret');
|
||||
expect(window.localStorage.setItem).toHaveBeenCalledWith('isLoggedIn', 'true');
|
||||
expect(window.localStorage.removeItem).toHaveBeenCalledWith('managementKey');
|
||||
});
|
||||
|
||||
vi.clearAllMocks();
|
||||
|
||||
Reference in new issue
Block a user