mirror of
https://github.com/n8n-io/n8n.git
synced 2026-09-24 23:22:38 +08:00
test: Use identity-based assertion in node search test (no-changelog) (#29426)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
ded94a5124
commit
d461ec3e9b
@@ -488,6 +488,10 @@ export class CanvasPage extends BasePage {
|
||||
return this.page.getByTestId('node-creator-item-name');
|
||||
}
|
||||
|
||||
nodeCreatorNodeItem(name: string): Locator {
|
||||
return this.nodeCreatorNodeItems().getByText(name, { exact: true });
|
||||
}
|
||||
|
||||
nodeCreatorActionItems(): Locator {
|
||||
return this.page.getByTestId('node-creator-action-item');
|
||||
}
|
||||
|
||||
@@ -47,8 +47,8 @@ test.describe(
|
||||
test('should clear search and show all nodes', async ({ n8n }) => {
|
||||
await n8n.canvas.clickCanvasPlusButton();
|
||||
await n8n.canvas.fillNodeCreatorSearchBar('Linear');
|
||||
await expect(n8n.canvas.nodeCreatorNodeItem('Linear')).toBeVisible();
|
||||
const searchCount = await n8n.canvas.nodeCreatorNodeItems().count();
|
||||
await expect(n8n.canvas.nodeCreatorNodeItems()).toHaveCount(1);
|
||||
|
||||
await n8n.canvas.nodeCreatorSearchBar().clear();
|
||||
const nodeCount = await n8n.canvas.nodeCreatorNodeItems().count();
|
||||
|
||||
Reference in New Issue
Block a user