mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-29 15:57:00 +02:00
30 lines
717 B
TypeScript
30 lines
717 B
TypeScript
import type { Locator } from '@playwright/test';
|
|
|
|
export class InstanceAiSidebar {
|
|
constructor(private root: Locator) {}
|
|
|
|
getNewThreadButton(): Locator {
|
|
return this.root.getByTestId('instance-ai-new-thread-button');
|
|
}
|
|
|
|
getThreadItems(): Locator {
|
|
return this.root.getByTestId('instance-ai-thread-item');
|
|
}
|
|
|
|
getThreadByTitle(title: string): Locator {
|
|
return this.getThreadItems().filter({ hasText: title });
|
|
}
|
|
|
|
getRenameInput(): Locator {
|
|
return this.root.locator('input');
|
|
}
|
|
|
|
getThreadActionsTrigger(threadItem: Locator): Locator {
|
|
return threadItem.locator('button').last();
|
|
}
|
|
|
|
getDeleteMenuItem(): Locator {
|
|
return this.root.page().getByRole('menuitem').filter({ hasText: 'Delete' });
|
|
}
|
|
}
|