test: Migrate NPS from Cypress -> Playwright (#18535)

This commit is contained in:
shortstacked
2025-08-19 16:13:43 +01:00
committed by GitHub
parent 8b98713b7f
commit 5df0ca908e
5 changed files with 215 additions and 149 deletions

View File

@@ -423,4 +423,15 @@ export class CanvasPage extends BasePage {
await this.canvasPane().focus();
await this.page.keyboard.press(keyMap[direction]);
}
/**
* Visit the workflow page with a specific timestamp for NPS survey testing.
* Uses Playwright's clock API to set a fixed time.
*/
async visitWithTimestamp(timestamp: number): Promise<void> {
// Set fixed time using Playwright's clock API
await this.page.clock.setFixedTime(timestamp);
await this.page.goto('/workflow/new');
}
}