refactor: Format root-level dirs (no-changelog) (#4938)

🎨 Format root-level dirs
This commit is contained in:
Iván Ovejero
2022-12-15 16:39:59 +01:00
committed by GitHub
parent d7b3d649d6
commit 3028ad3c61
32 changed files with 612 additions and 513 deletions

View File

@@ -1,4 +1,4 @@
import { BasePage } from "./base";
import { BasePage } from './base';
export class WorkflowsPage extends BasePage {
url = '/workflows';
@@ -8,18 +8,21 @@ export class WorkflowsPage extends BasePage {
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')
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'),
@@ -35,6 +38,6 @@ export class WorkflowsPage extends BasePage {
this.getters.workflowDeleteButton().click();
cy.get('button').contains('delete').click();
}
}
},
};
}