2022-11-08 04:21:10 -08:00
|
|
|
import { BasePage } from "./base";
|
|
|
|
|
|
|
|
export class WorkflowsPage extends BasePage {
|
|
|
|
url = '/workflows';
|
2022-11-22 01:37:26 -08:00
|
|
|
getters = {
|
2022-11-11 00:07:14 -08:00
|
|
|
newWorkflowButtonCard: () => cy.getByTestId('new-workflow-card'),
|
|
|
|
newWorkflowTemplateCard: () => cy.getByTestId('new-workflow-template-card'),
|
|
|
|
searchBar: () => cy.getByTestId('resources-list-search'),
|
|
|
|
createWorkflowButton: () => cy.getByTestId('resources-list-add'),
|
|
|
|
workflowCards: () => cy.getByTestId(`workflow-card`),
|
|
|
|
workflowCard: (workflowName: string) => cy.getByTestId(`workflow-card`)
|
|
|
|
.contains(workflowName)
|
|
|
|
.parents('[data-test-id="workflow-card"]'),
|
2022-11-22 01:37:26 -08:00
|
|
|
workflowTags: (workflowName: string) => this.getters.workflowCard(workflowName)
|
2022-11-11 00:07:14 -08:00
|
|
|
.findChildByTestId('workflow-card-tags'),
|
2022-11-22 01:37:26 -08:00
|
|
|
workflowActivator: (workflowName: string) => this.getters.workflowCard(workflowName)
|
2022-11-11 00:07:14 -08:00
|
|
|
.findChildByTestId('workflow-card-activator'),
|
2022-11-22 01:37:26 -08:00
|
|
|
workflowActivatorStatus: (workflowName: string) => this.getters.workflowActivator(workflowName)
|
2022-11-11 00:07:14 -08:00
|
|
|
.findChildByTestId('workflow-activator-status'),
|
2022-11-22 01:37:26 -08:00
|
|
|
workflowCardActions: (workflowName: string) => this.getters.workflowCard(workflowName)
|
2022-11-11 00:07:14 -08:00
|
|
|
.findChildByTestId('workflow-card-actions'),
|
|
|
|
workflowDeleteButton: () => cy.getByTestId('action-toggle-dropdown').filter(':visible').contains('Delete')
|
|
|
|
// Not yet implemented
|
|
|
|
// myWorkflows: () => cy.getByTestId('my-workflows'),
|
|
|
|
// allWorkflows: () => cy.getByTestId('all-workflows'),
|
|
|
|
};
|
2022-11-08 04:21:10 -08:00
|
|
|
}
|