mirror of
https://github.com/n8n-io/n8n.git
synced 2026-07-28 11:35:03 +02:00
Co-authored-by: n8n-cat-bot[bot] <n8n-cat-bot[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
32 lines
898 B
TypeScript
32 lines
898 B
TypeScript
import type { Locator, Page } from '@playwright/test';
|
|
|
|
/**
|
|
* Shared component for the "Setup workflow credentials" modal that appears in
|
|
* the workflow editor (e.g. after importing a template or skipping credential
|
|
* setup). Owns the `setup-workflow-credentials-modal` test-id so it is declared
|
|
* in a single place.
|
|
*/
|
|
export class SetupWorkflowCredentialsModal {
|
|
constructor(private readonly root: Locator) {}
|
|
|
|
static fromPage(page: Page): SetupWorkflowCredentialsModal {
|
|
return new SetupWorkflowCredentialsModal(page.getByTestId('setup-workflow-credentials-modal'));
|
|
}
|
|
|
|
getModal(): Locator {
|
|
return this.root;
|
|
}
|
|
|
|
getContinueButton(): Locator {
|
|
return this.root.getByTestId('continue-button');
|
|
}
|
|
|
|
getFormSteps(): Locator {
|
|
return this.root.getByTestId('setup-credentials-form-step');
|
|
}
|
|
|
|
async clickContinue(): Promise<void> {
|
|
await this.getContinueButton().click();
|
|
}
|
|
}
|