Add e2e tests for the Use as Draft feature (#9845)

Test with and without a draft version as the last version of the
workflow
This commit is contained in:
Baptiste Devessier
2025-01-24 18:38:35 +01:00
committed by GitHub
parent aacbf11435
commit a4011676f0
2 changed files with 185 additions and 0 deletions

View File

@ -20,6 +20,9 @@ export class WorkflowVisualizerPage {
readonly workflowNameButton: Locator;
readonly triggerNode: Locator;
readonly background: Locator;
readonly useAsDraftButton: Locator;
readonly overrideDraftButton: Locator;
readonly discardDraftButton: Locator;
#actionNames: Record<WorkflowActionType, string> = {
'create-record': 'Create Record',
@ -70,6 +73,13 @@ export class WorkflowVisualizerPage {
});
this.triggerNode = this.#page.getByTestId('rf__node-trigger');
this.background = page.locator('.react-flow__pane');
this.useAsDraftButton = page.getByRole('button', { name: 'Use as draft' });
this.overrideDraftButton = page.getByRole('button', {
name: 'Override Draft',
});
this.discardDraftButton = page.getByRole('button', {
name: 'Discard Draft',
});
}
async createOneWorkflow() {