import type { Locator } from '@playwright/test'; /** * 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 this.root.locator('.btn--cancel'); } getCloseButton(): Locator { return this.root.locator('.el-message-box__headerbtn'); } async clickCancel(): Promise { await this.getCancelButton().click(); } async clickClose(): Promise { await this.getCloseButton().click(); } }