test: workflow sql node e2e (#3341)

This commit is contained in:
hongboji 2024-01-07 17:09:32 +08:00 committed by GitHub
parent d85aaa36e3
commit 908944ce62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1336 additions and 0 deletions

View File

@ -506,6 +506,29 @@ export class ConditionBranchNode {
}
}
export class SQLNode {
readonly page: Page;
node: Locator;
nodeTitle: Locator;
nodeConfigure: Locator;
sqlEditBox: Locator;
submitButton: Locator;
cancelButton: Locator;
addNodeButton: Locator;
constructor(page: Page, nodeName: string) {
this.page = page;
this.node = page.getByLabel(`SQL action-${nodeName}`, { exact: true });
this.nodeTitle = page.getByLabel(`SQL action-${nodeName}`, { exact: true }).getByRole('textbox');
this.nodeConfigure = page
.getByLabel(`SQL action-${nodeName}`, { exact: true })
.getByRole('button', { name: 'Configure' });
this.sqlEditBox = page.getByLabel('block-item-WorkflowVariableRawTextArea-workflows-SQL').getByRole('textbox');
this.submitButton = page.getByLabel('action-Action-Submit-workflows');
this.cancelButton = page.getByLabel('action-Action-Cancel-workflows');
this.addNodeButton = page.getByLabel(`add-button-sql-${nodeName}`, { exact: true });
}
}
export default module.exports = {
CreateWorkFlow,
EditWorkFlow,
@ -525,4 +548,5 @@ export default module.exports = {
ManualNode,
ConditionYesNode,
ConditionBranchNode,
SQLNode,
};