test: add locator for approval workflow to enable the withdraw button (#4859)

This commit is contained in:
hongboji 2024-07-10 22:37:55 +08:00 committed by GitHub
parent 9033f73584
commit 2ef747de7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -97,6 +97,7 @@ export class ApprovalTriggerNode {
configureFieldsButton: Locator;
configureActionsButton: Locator;
saveDraftSwitch: Locator;
withdrawSwitch: Locator;
preloadAssociationsDropDown: Locator;
submitButton: Locator;
cancelButton: Locator;
@ -122,6 +123,7 @@ export class ApprovalTriggerNode {
`schema-initializer-ActionBar-ApprovalApplyAddActionButton-${collectionName}`,
);
this.saveDraftSwitch = page.getByRole('menuitem', { name: 'Save draft' }).getByRole('switch');
this.withdrawSwitch = page.getByRole('menuitem', { name: 'Withdraw' }).getByRole('switch');
this.preloadAssociationsDropDown = page.getByTestId('select-field-Preload associations');
this.submitButton = page.getByLabel('action-Action-Submit-workflows');
this.cancelButton = page.getByLabel('action-Action-Cancel-workflows');