mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
feat(editor): Show workflow breadcrumbs in canvas (#14710)
This commit is contained in:
committed by
GitHub
parent
be53453def
commit
46df8b47d6
@@ -76,7 +76,11 @@ export function getVisibleListBreadcrumbs() {
|
||||
}
|
||||
|
||||
export function getCurrentBreadcrumb() {
|
||||
return getListBreadcrumbs().findChildByTestId('breadcrumbs-item-current');
|
||||
return getListBreadcrumbs().findChildByTestId('breadcrumbs-item-current').find('input');
|
||||
}
|
||||
|
||||
export function getCurrentBreadcrumbText() {
|
||||
return getCurrentBreadcrumb().invoke('val');
|
||||
}
|
||||
|
||||
export function getMainBreadcrumbsEllipsis() {
|
||||
@@ -117,6 +121,11 @@ export function getListActionsToggle() {
|
||||
return cy.getByTestId('folder-breadcrumbs-actions');
|
||||
}
|
||||
|
||||
export function getCanvasBreadcrumbs() {
|
||||
cy.getByTestId('canvas-breadcrumbs').should('exist');
|
||||
return cy.getByTestId('canvas-breadcrumbs').findChildByTestId('folder-breadcrumbs');
|
||||
}
|
||||
|
||||
export function getListActionItem(name: string) {
|
||||
return cy
|
||||
.getByTestId('folder-breadcrumbs-actions')
|
||||
@@ -127,6 +136,10 @@ export function getListActionItem(name: string) {
|
||||
});
|
||||
}
|
||||
|
||||
export function getInlineEditInput() {
|
||||
return cy.getByTestId('inline-edit-input');
|
||||
}
|
||||
|
||||
export function getFolderCardActionToggle(folderName: string) {
|
||||
return getFolderCard(folderName).find('[data-test-id="folder-card-actions"]');
|
||||
}
|
||||
@@ -303,7 +316,9 @@ export function renameFolderFromListActions(folderName: string, newName: string)
|
||||
getFolderCard(folderName).click();
|
||||
getListActionsToggle().click();
|
||||
getListActionItem('rename').click();
|
||||
renameFolder(newName);
|
||||
getInlineEditInput().should('be.visible');
|
||||
getInlineEditInput().type(newName, { delay: 50 });
|
||||
successToast().should('exist');
|
||||
}
|
||||
|
||||
export function renameFolderFromCardActions(folderName: string, newName: string) {
|
||||
@@ -372,12 +387,9 @@ export function deleteAndTransferFolderContentsFromCardDropdown(
|
||||
export function deleteAndTransferFolderContentsFromListDropdown(destinationName: string) {
|
||||
getListActionsToggle().click();
|
||||
getListActionItem('delete').click();
|
||||
getCurrentBreadcrumb()
|
||||
.find('span')
|
||||
.invoke('text')
|
||||
.then((currentFolderName) => {
|
||||
deleteFolderAndMoveContents(currentFolderName, destinationName);
|
||||
});
|
||||
getCurrentBreadcrumbText().then((currentFolderName) => {
|
||||
deleteFolderAndMoveContents(String(currentFolderName), destinationName);
|
||||
});
|
||||
}
|
||||
|
||||
export function createNewProject(projectName: string, options: { openAfterCreate?: boolean } = {}) {
|
||||
|
||||
Reference in New Issue
Block a user