Skip to content

Commit b41046e

Browse files
committed
Update e2e tests + remove useless ones
1 parent 1383a4a commit b41046e

File tree

3 files changed

+4
-44
lines changed

3 files changed

+4
-44
lines changed

tests/e2e/extension.spec.ts

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -45,30 +45,12 @@ test.describe('Sidepanel Interface', () => {
4545

4646
// Check main UI elements are present
4747
await expect(page.locator('h1')).toContainText('LLM Chat');
48-
await expect(page.locator('.welcome-message h3')).toContainText('Welcome to LLM Chat!');
48+
await expect(page.locator('.welcome-message h3')).toContainText('Welcome to LLM Actions!');
4949
await expect(page.locator('#message-input')).toBeVisible();
5050
await expect(page.locator('#send-btn')).toBeVisible();
5151
await expect(page.locator('#settings-btn')).toBeVisible();
5252
});
5353

54-
test('should have working message input', async ({ context, extensionId }) => {
55-
const page = await context.newPage();
56-
await page.goto(`chrome-extension://${extensionId}/sidepanel.html`);
57-
58-
const messageInput = page.locator('#message-input');
59-
const sendBtn = page.locator('#send-btn');
60-
61-
// Test input functionality
62-
await messageInput.fill('Hello, this is a test message');
63-
expect(await messageInput.inputValue()).toBe('Hello, this is a test message');
64-
65-
// Send button should be enabled with text
66-
await expect(sendBtn).toBeEnabled();
67-
68-
// Clear input
69-
await messageInput.fill('');
70-
expect(await messageInput.inputValue()).toBe('');
71-
});
7254

7355
test('should have working settings button', async ({ context, extensionId }) => {
7456
const page = await context.newPage();
@@ -88,7 +70,7 @@ test.describe('Sidepanel Interface', () => {
8870

8971
const welcomeMessage = page.locator('.welcome-message');
9072
await expect(welcomeMessage).toBeVisible();
91-
await expect(welcomeMessage.locator('h3')).toContainText('Welcome to LLM Chat!');
73+
await expect(welcomeMessage.locator('h3')).toContainText('Welcome to LLM Actions!');
9274
await expect(welcomeMessage.locator('p').first()).toContainText(
9375
'Start a conversation with your configured LLM',
9476
);
@@ -125,26 +107,6 @@ test.describe('Options Page', () => {
125107
await expect(page.locator('label[for="api-key-input"]')).toContainText('API Key:');
126108
});
127109

128-
test('should have working form inputs', async ({ context, extensionId }) => {
129-
const page = await context.newPage();
130-
await page.goto(`chrome-extension://${extensionId}/options.html`);
131-
132-
// Test endpoint input
133-
const endpointInput = page.locator('#endpoint-input');
134-
await endpointInput.fill('https://api.openai.com/v1/chat/completions');
135-
expect(await endpointInput.inputValue()).toBe('https://api.openai.com/v1/chat/completions');
136-
137-
// Test model input
138-
const modelInput = page.locator('#model-input');
139-
await modelInput.fill('gpt-4');
140-
await expect(modelInput).toHaveValue('gpt-4');
141-
142-
// Test API key input (should be password type)
143-
const apiKeyInput = page.locator('#api-key-input');
144-
await expect(apiKeyInput).toHaveAttribute('type', 'password');
145-
await apiKeyInput.fill('test-api-key');
146-
expect(await apiKeyInput.inputValue()).toBe('test-api-key');
147-
});
148110

149111
test('should have action buttons', async ({ context, extensionId }) => {
150112
const page = await context.newPage();

tests/e2e/tool-functionality.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ test.describe('Tool Functionality', () => {
6161
// Check that tool information is displayed
6262
await expect(welcomeMessage).toContainText('autonomously use browser automation tools');
6363
await expect(welcomeMessage).toContainText('Available Tools');
64-
await expect(welcomeMessage).toContainText('find elements');
65-
await expect(welcomeMessage).toContainText('extract text');
66-
await expect(welcomeMessage).toContainText('get page summary');
64+
await expect(welcomeMessage).toContainText('Find');
65+
await expect(welcomeMessage).toContainText('Extract');
6766
});
6867

6968
test('should handle background script tool execution', async ({ context, extensionId }) => {

tests/e2e/workflow.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ test.describe('Complete User Workflow', () => {
157157
// Initially should show welcome message
158158
const welcomeMessage = sidepanelPage.locator('.welcome-message').first();
159159
await expect(welcomeMessage).toBeVisible();
160-
await expect(welcomeMessage).toContainText('Welcome to LLM Chat!');
161160

162161
// Step 3: Test manual tool interface is present
163162
await expect(sidepanelPage.locator('.manual-tool-interface')).toBeVisible();

0 commit comments

Comments
 (0)