mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix: Improve stability of NDV hover test (no-changelog) (#14679)
This commit is contained in:
@@ -29,7 +29,7 @@ export function getParameterInputByName(name: string) {
|
||||
}
|
||||
|
||||
export function getInputPanel() {
|
||||
return cy.getByTestId('input-panel');
|
||||
return cy.getByTestId('ndv-input-panel');
|
||||
}
|
||||
|
||||
export function getMainPanel() {
|
||||
@@ -52,6 +52,10 @@ export function getResourceLocatorInput(paramName: string) {
|
||||
return getResourceLocator(paramName).find('[data-test-id="rlc-input-container"]');
|
||||
}
|
||||
|
||||
export function getInputPanelDataContainer() {
|
||||
return getInputPanel().getByTestId('ndv-data-container');
|
||||
}
|
||||
|
||||
export function getOutputPanelDataContainer() {
|
||||
return getOutputPanel().getByTestId('ndv-data-container');
|
||||
}
|
||||
@@ -272,3 +276,25 @@ export function populateFixedCollection<T extends readonly string[]>(
|
||||
export function assertInlineExpressionValid() {
|
||||
cy.getByTestId('inline-expression-editor-input').find('.cm-valid-resolvable').should('exist');
|
||||
}
|
||||
|
||||
export function hoverInputItemByText(text: string) {
|
||||
return getInputPanelDataContainer().contains(text).trigger('mouseover', { force: true });
|
||||
}
|
||||
|
||||
export function verifyInputHoverState(expectedText: string) {
|
||||
getInputPanelDataContainer()
|
||||
.find('[data-test-id="hovering-item"]')
|
||||
.should('be.visible')
|
||||
.should('have.text', expectedText);
|
||||
}
|
||||
|
||||
export function verifyOutputHoverState(expectedText: string) {
|
||||
getOutputPanelDataContainer()
|
||||
.find('[data-test-id="hovering-item"]')
|
||||
.should('be.visible')
|
||||
.should('have.text', expectedText);
|
||||
}
|
||||
|
||||
export function resetHoverState() {
|
||||
getBackToCanvasButton().trigger('mouseover');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user