mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(editor): Data in input/output panel incorrectly mapped (#14878)
This commit is contained in:
41
cypress/composables/logs.ts
Normal file
41
cypress/composables/logs.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* Accessors
|
||||
*/
|
||||
|
||||
export function getLogEntryAtRow(rowIndex: number) {
|
||||
return cy.getByTestId('logs-overview-body').find('[role=treeitem]').eq(rowIndex);
|
||||
}
|
||||
|
||||
export function getInputTableRows() {
|
||||
return cy.getByTestId('log-details-input').find('table tr');
|
||||
}
|
||||
|
||||
export function getInputTbodyCell(row: number, col: number) {
|
||||
return cy.getByTestId('log-details-input').find('table tr').eq(row).find('td').eq(col);
|
||||
}
|
||||
|
||||
/**
|
||||
* Actions
|
||||
*/
|
||||
|
||||
export function openLogsPanel() {
|
||||
cy.getByTestId('logs-overview-header').click();
|
||||
}
|
||||
|
||||
export function clickLogEntryAtRow(rowIndex: number) {
|
||||
getLogEntryAtRow(rowIndex).click();
|
||||
}
|
||||
|
||||
export function toggleInputPanel() {
|
||||
cy.getByTestId('log-details-header').contains('Input').click();
|
||||
}
|
||||
|
||||
export function clickOpenNdvAtRow(rowIndex: number) {
|
||||
getLogEntryAtRow(rowIndex).realHover();
|
||||
getLogEntryAtRow(rowIndex).find('[aria-label="Open..."]').click();
|
||||
}
|
||||
|
||||
export function setInputDisplayMode(mode: 'table') {
|
||||
cy.getByTestId('log-details-input').realHover();
|
||||
cy.getByTestId('log-details-input').findChildByTestId(`radio-button-${mode}`).click();
|
||||
}
|
||||
@@ -32,6 +32,10 @@ export function getInputPanel() {
|
||||
return cy.getByTestId('ndv-input-panel');
|
||||
}
|
||||
|
||||
export function getInputSelect() {
|
||||
return cy.getByTestId('ndv-input-select').find('input');
|
||||
}
|
||||
|
||||
export function getMainPanel() {
|
||||
return cy.getByTestId('node-parameters');
|
||||
}
|
||||
@@ -53,11 +57,19 @@ export function getResourceLocatorInput(paramName: string) {
|
||||
}
|
||||
|
||||
export function getInputPanelDataContainer() {
|
||||
return getInputPanel().getByTestId('ndv-data-container');
|
||||
return getInputPanel().findChildByTestId('ndv-data-container');
|
||||
}
|
||||
|
||||
export function getInputTableRows() {
|
||||
return getInputPanelDataContainer().find('table tr');
|
||||
}
|
||||
|
||||
export function getInputTbodyCell(row: number, col: number) {
|
||||
return getInputTableRows().eq(row).find('td').eq(col);
|
||||
}
|
||||
|
||||
export function getOutputPanelDataContainer() {
|
||||
return getOutputPanel().getByTestId('ndv-data-container');
|
||||
return getOutputPanel().findChildByTestId('ndv-data-container');
|
||||
}
|
||||
|
||||
export function getOutputTableRows() {
|
||||
@@ -278,7 +290,7 @@ export function assertInlineExpressionValid() {
|
||||
}
|
||||
|
||||
export function hoverInputItemByText(text: string) {
|
||||
return getInputPanelDataContainer().contains(text).trigger('mouseover', { force: true });
|
||||
return getInputPanelDataContainer().contains(text).realHover();
|
||||
}
|
||||
|
||||
export function verifyInputHoverState(expectedText: string) {
|
||||
@@ -296,5 +308,5 @@ export function verifyOutputHoverState(expectedText: string) {
|
||||
}
|
||||
|
||||
export function resetHoverState() {
|
||||
getBackToCanvasButton().trigger('mouseover');
|
||||
getBackToCanvasButton().realHover();
|
||||
}
|
||||
|
||||
@@ -25,10 +25,12 @@ export type EndpointType =
|
||||
* Getters
|
||||
*/
|
||||
|
||||
export function executeWorkflowAndWait() {
|
||||
export function executeWorkflowAndWait(waitForSuccessBannerToDisappear = true) {
|
||||
cy.get('[data-test-id="execute-workflow-button"]').click();
|
||||
cy.contains('Workflow executed successfully', { timeout: 4000 }).should('be.visible');
|
||||
cy.contains('Workflow executed successfully', { timeout: 10000 }).should('not.exist');
|
||||
if (waitForSuccessBannerToDisappear) {
|
||||
cy.contains('Workflow executed successfully', { timeout: 10000 }).should('not.exist');
|
||||
}
|
||||
}
|
||||
|
||||
export function getCanvas() {
|
||||
|
||||
Reference in New Issue
Block a user