mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-27 05:29:42 -08:00
b5b44d1b59
* fix: Fix inferred type of X cannot be named error after pnpm update * feat: Change page objects to expose actions and getters. Add credential creation suite
28 lines
1.4 KiB
TypeScript
28 lines
1.4 KiB
TypeScript
import { BasePage } from "./base";
|
|
|
|
export class WorkflowsPage extends BasePage {
|
|
url = '/workflows';
|
|
getters = {
|
|
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"]'),
|
|
workflowTags: (workflowName: string) => this.getters.workflowCard(workflowName)
|
|
.findChildByTestId('workflow-card-tags'),
|
|
workflowActivator: (workflowName: string) => this.getters.workflowCard(workflowName)
|
|
.findChildByTestId('workflow-card-activator'),
|
|
workflowActivatorStatus: (workflowName: string) => this.getters.workflowActivator(workflowName)
|
|
.findChildByTestId('workflow-activator-status'),
|
|
workflowCardActions: (workflowName: string) => this.getters.workflowCard(workflowName)
|
|
.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'),
|
|
};
|
|
}
|