mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
20 lines
499 B
TypeScript
20 lines
499 B
TypeScript
export const universalAddButton = () => cy.getByTestId('universal-add');
|
|
|
|
export const createResource = (
|
|
resourceType: 'project' | 'workflow' | 'credential',
|
|
projectName: string,
|
|
) => {
|
|
universalAddButton().click();
|
|
cy.getByTestId('navigation-submenu')
|
|
.contains(new RegExp(resourceType, 'i'))
|
|
.should('be.visible')
|
|
.click();
|
|
|
|
if (resourceType !== 'project') {
|
|
cy.getByTestId('navigation-submenu-item')
|
|
.contains(new RegExp(projectName))
|
|
.should('be.visible')
|
|
.click();
|
|
}
|
|
};
|