mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-26 13:14:07 -08:00
14f81c2725
* test(e2e): Update getters, add search and sort tests for credentials * fix: Refactor sortOptions getter * fix: fix merge conflict * fix: removed double key * fix: Add db and session reset for every credentials suite run
34 lines
1.5 KiB
TypeScript
34 lines
1.5 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('resources-list-item'),
|
|
workflowCard: (workflowName: string) => this.getters.workflowCards()
|
|
.contains(workflowName)
|
|
.parents('[data-test-id="resources-list-item"]'),
|
|
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'),
|
|
};
|
|
|
|
actions = {
|
|
createWorkflowFromCard: () => {
|
|
this.getters.newWorkflowButtonCard().click();
|
|
},
|
|
}
|
|
}
|