mirror of
https://github.com/n8n-io/n8n.git
synced 2026-07-29 12:05:04 +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
744 B
TypeScript
32 lines
744 B
TypeScript
import type { Locator } from '@playwright/test';
|
|
|
|
import { MessageBox } from './messageBoxLocators';
|
|
|
|
/**
|
|
* Save Changes Modal component for handling unsaved changes dialogs.
|
|
* Appears when navigating away from workflow with unsaved changes.
|
|
*/
|
|
export class SaveChangesModal {
|
|
constructor(private root: Locator) {}
|
|
|
|
getModal(): Locator {
|
|
return this.root.filter({ hasText: 'Save changes before leaving?' });
|
|
}
|
|
|
|
getCancelButton(): Locator {
|
|
return new MessageBox(this.root).cancelButton;
|
|
}
|
|
|
|
getCloseButton(): Locator {
|
|
return new MessageBox(this.root).closeIcon;
|
|
}
|
|
|
|
async clickCancel(): Promise<void> {
|
|
await this.getCancelButton().click();
|
|
}
|
|
|
|
async clickClose(): Promise<void> {
|
|
await this.getCloseButton().click();
|
|
}
|
|
}
|