fix(e2e): align test assertions with current popup/sidebar UI
popup.spec.ts: button text changed from "Sign in with Hanzo" to "Sign In" sidebar.spec.ts: default tab is now chat (not tools) per sidebar.ts checkAuth
This commit is contained in:
@@ -12,7 +12,7 @@ test.describe('Popup', () => {
|
||||
// Login button should be present
|
||||
const loginBtn = page.locator('#login-btn');
|
||||
await expect(loginBtn).toBeVisible();
|
||||
await expect(loginBtn).toContainText('Sign in with Hanzo');
|
||||
await expect(loginBtn).toContainText('Sign In');
|
||||
await expect(loginBtn).toBeEnabled();
|
||||
});
|
||||
|
||||
|
||||
@@ -10,16 +10,16 @@ test.describe('Sidebar', () => {
|
||||
await expect(tabBar).toBeVisible();
|
||||
});
|
||||
|
||||
test('defaults to tools tab when not authenticated', async ({ context, extensionId }) => {
|
||||
test('defaults to chat tab when not authenticated', async ({ context, extensionId }) => {
|
||||
const page = await context.newPage();
|
||||
await page.goto(`chrome-extension://${extensionId}/sidebar.html`);
|
||||
|
||||
// Wait for JS to initialize
|
||||
await page.waitForTimeout(500);
|
||||
|
||||
// Tools tab should be active by default (no auth required)
|
||||
const toolsTab = page.locator('#tab-tools');
|
||||
await expect(toolsTab).toBeVisible();
|
||||
// Chat tab should be active by default (shows login prompt for unauthenticated)
|
||||
const chatTab = page.locator('#tab-chat');
|
||||
await expect(chatTab).toBeVisible();
|
||||
});
|
||||
|
||||
test('chat tab shows login prompt when not authenticated', async ({ context, extensionId }) => {
|
||||
|
||||
Reference in New Issue
Block a user