first commit
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
import { test, expect, chatHubTestConfig } from './fixtures';
|
||||
import { ChatHubChatPage } from '../../../pages/ChatHubChatPage';
|
||||
|
||||
test.use(chatHubTestConfig);
|
||||
|
||||
test.describe('Tools usage @capability:proxy', {
|
||||
annotation: [
|
||||
{ type: 'owner', description: 'Chat' },
|
||||
],
|
||||
}, () => {
|
||||
test('use web search tool in conversation', async ({
|
||||
n8n,
|
||||
anthropicCredential: _,
|
||||
jinaCredential,
|
||||
}) => {
|
||||
const page = new ChatHubChatPage(n8n.page);
|
||||
|
||||
await n8n.navigate.toChatHub();
|
||||
await page.dismissWelcomeScreen();
|
||||
await expect(page.getModelSelectorButton()).toContainText(/claude/i);
|
||||
|
||||
// Open tools manager modal
|
||||
await page.getToolsButton().click();
|
||||
await expect(page.toolsModal.getRoot()).toBeVisible();
|
||||
|
||||
// Add Jina AI tool from available tools list
|
||||
await page.toolsModal.getAddButton('Jina AI').click();
|
||||
|
||||
// Select credential in settings view
|
||||
await page.toolsModal.getCredentialSelect().click();
|
||||
await page.getVisiblePopoverOption(jinaCredential.name).click();
|
||||
|
||||
// Change Operation from "Read" to "Search"
|
||||
await page.toolsModal.getParameterInput('operation').click();
|
||||
await page.getVisiblePopoverOption('Search').click();
|
||||
|
||||
// Set search query and simplify to "defined automatically by the model"
|
||||
await page.toolsModal.getFromAiOverrideButton('searchQuery').click();
|
||||
await page.toolsModal.getFromAiOverrideButton('simplify').click();
|
||||
|
||||
// Save and close
|
||||
await page.toolsModal.getSaveButton().click();
|
||||
await page.toolsModal.getCloseButton().click();
|
||||
await expect(page.toolsModal.getRoot()).toBeHidden();
|
||||
|
||||
// Verify tool is shown
|
||||
await expect(page.getToolsButton()).toContainText('Search web in Jina AI');
|
||||
|
||||
// Send message and check response
|
||||
await page.getChatInput().fill('What is n8n?');
|
||||
await page.getSendButton().click();
|
||||
await expect(page.getChatMessages().nth(0)).toContainText('What is n8n?');
|
||||
await expect(page.getChatMessages().nth(1)).toContainText(/automation/i, {
|
||||
timeout: 60000,
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user