mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-12 16:10:30 +02:00
31 lines
814 B
TypeScript
31 lines
814 B
TypeScript
import type { Locator, Page } from '@playwright/test';
|
|
|
|
import { BasePage } from './BasePage';
|
|
import { ChatHubPersonalAgentModal } from './components/ChatHubPersonalAgentModal';
|
|
|
|
export class ChatHubPersonalAgentsPage extends BasePage {
|
|
readonly editModal = new ChatHubPersonalAgentModal(
|
|
this.page.getByTestId('agentEditorModal-modal'),
|
|
);
|
|
|
|
constructor(page: Page) {
|
|
super(page);
|
|
}
|
|
|
|
getNewAgentButton(): Locator {
|
|
return this.page.getByText('New Agent');
|
|
}
|
|
|
|
getAgentCards(): Locator {
|
|
return this.page.getByTestId('chat-agent-card');
|
|
}
|
|
|
|
getEditButtonAt(index: number): Locator {
|
|
return this.page.getByTestId('chat-agent-card').nth(index).getByTitle('Edit');
|
|
}
|
|
|
|
getMenuAt(index: number): Locator {
|
|
return this.page.getByTestId('chat-agent-card').nth(index).getByTitle('More options');
|
|
}
|
|
}
|