mirror of
https://github.com/n8n-io/n8n.git
synced 2026-10-17 13:39:44 +02:00
test: De-flake NDV run selector linking across input and output (#39087)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
346989eda1
commit
24d54e4db5
|
|
@ -550,24 +550,26 @@ export class NodeDetailsViewPage extends BasePage {
|
|||
const selector = this.inputPanel.getRunSelector();
|
||||
await selector.click();
|
||||
await this.getVisiblePopoverOption(value).click();
|
||||
await expect(this.inputPanel.getRunSelectorInput()).toHaveValue(containsValue(value));
|
||||
await this.expectInputRunSelectorValue(value);
|
||||
}
|
||||
|
||||
async changeOutputRunSelector(value: string) {
|
||||
const selector = this.outputPanel.getRunSelector();
|
||||
await selector.click();
|
||||
await this.getVisiblePopoverOption(value).click();
|
||||
await this.expectOutputRunSelectorValue(value);
|
||||
}
|
||||
|
||||
// Run-selector updates can land asynchronously (notably cross-panel via
|
||||
// run-linking), so assert with a retrying matcher rather than reading once.
|
||||
async expectInputRunSelectorValue(value: string) {
|
||||
await expect(this.inputPanel.getRunSelectorInput()).toHaveValue(containsValue(value));
|
||||
}
|
||||
|
||||
async expectOutputRunSelectorValue(value: string) {
|
||||
await expect(this.outputPanel.getRunSelectorInput()).toHaveValue(containsValue(value));
|
||||
}
|
||||
|
||||
async getInputRunSelectorValue() {
|
||||
return await this.inputPanel.getRunSelectorInput().inputValue();
|
||||
}
|
||||
|
||||
async getOutputRunSelectorValue() {
|
||||
return await this.outputPanel.getRunSelectorInput().inputValue();
|
||||
}
|
||||
|
||||
getExecuteNodeButton() {
|
||||
return this.container.getByTestId('node-execute-button');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -167,35 +167,35 @@ test.describe(
|
|||
|
||||
await n8n.ndv.ensureOutputRunLinking(true);
|
||||
await n8n.ndv.inputPanel.getTbodyCell(0, 0).click();
|
||||
expect(await n8n.ndv.getInputRunSelectorValue()).toContain('2 of 2 (6 items)');
|
||||
expect(await n8n.ndv.getOutputRunSelectorValue()).toContain('2 of 2 (6 items)');
|
||||
await n8n.ndv.expectInputRunSelectorValue('2 of 2 (6 items)');
|
||||
await n8n.ndv.expectOutputRunSelectorValue('2 of 2 (6 items)');
|
||||
|
||||
await n8n.ndv.changeOutputRunSelector('1 of 2 (6 items)');
|
||||
expect(await n8n.ndv.getInputRunSelectorValue()).toContain('1 of 2 (6 items)');
|
||||
await n8n.ndv.expectInputRunSelectorValue('1 of 2 (6 items)');
|
||||
await expect(n8n.ndv.inputPanel.getTbodyCell(0, 0)).toHaveText('1111');
|
||||
await expect(n8n.ndv.outputPanel.getTbodyCell(0, 0)).toHaveText('1111');
|
||||
|
||||
await n8n.ndv.inputPanel.getTbodyCell(0, 0).click();
|
||||
await n8n.ndv.changeInputRunSelector('2 of 2 (6 items)');
|
||||
expect(await n8n.ndv.getOutputRunSelectorValue()).toContain('2 of 2 (6 items)');
|
||||
await n8n.ndv.expectOutputRunSelectorValue('2 of 2 (6 items)');
|
||||
|
||||
await n8n.ndv.outputPanel.getLinkRun().click();
|
||||
await n8n.ndv.inputPanel.getTbodyCell(0, 0).click();
|
||||
await n8n.ndv.changeOutputRunSelector('1 of 2 (6 items)');
|
||||
expect(await n8n.ndv.getInputRunSelectorValue()).toContain('2 of 2 (6 items)');
|
||||
await n8n.ndv.expectInputRunSelectorValue('2 of 2 (6 items)');
|
||||
|
||||
await n8n.ndv.outputPanel.getLinkRun().click();
|
||||
await n8n.ndv.inputPanel.getTbodyCell(0, 0).click();
|
||||
expect(await n8n.ndv.getInputRunSelectorValue()).toContain('1 of 2 (6 items)');
|
||||
await n8n.ndv.expectInputRunSelectorValue('1 of 2 (6 items)');
|
||||
|
||||
await n8n.ndv.inputPanel.toggleInputRunLinking();
|
||||
await n8n.ndv.inputPanel.getTbodyCell(0, 0).click();
|
||||
await n8n.ndv.changeInputRunSelector('2 of 2 (6 items)');
|
||||
expect(await n8n.ndv.getOutputRunSelectorValue()).toContain('1 of 2 (6 items)');
|
||||
await n8n.ndv.expectOutputRunSelectorValue('1 of 2 (6 items)');
|
||||
|
||||
await n8n.ndv.inputPanel.toggleInputRunLinking();
|
||||
await n8n.ndv.inputPanel.getTbodyCell(0, 0).click();
|
||||
expect(await n8n.ndv.getOutputRunSelectorValue()).toContain('2 of 2 (6 items)');
|
||||
await n8n.ndv.expectOutputRunSelectorValue('2 of 2 (6 items)');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user