mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 08:34:07 -08:00
add test
This commit is contained in:
parent
173935b725
commit
61929a6422
|
@ -80,4 +80,24 @@ describe('Workflow Selector Parameter', () => {
|
||||||
.find('input')
|
.find('input')
|
||||||
.should('have.value', 'By ID');
|
.should('have.value', 'By ID');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should render add resource option and redirect to the correct route when clicked', () => {
|
||||||
|
cy.window().then((win) => {
|
||||||
|
cy.stub(win, 'open').as('windowOpen');
|
||||||
|
});
|
||||||
|
|
||||||
|
ndv.getters.resourceLocator('workflowId').should('be.visible');
|
||||||
|
ndv.getters.resourceLocatorInput('workflowId').click();
|
||||||
|
|
||||||
|
getVisiblePopper().findChildByTestId('rlc-item').eq(0).should('exist');
|
||||||
|
getVisiblePopper()
|
||||||
|
.findChildByTestId('rlc-item')
|
||||||
|
.eq(0)
|
||||||
|
.find('span')
|
||||||
|
.should('have.text', 'Create a new sub-workflow');
|
||||||
|
|
||||||
|
getVisiblePopper().findChildByTestId('rlc-item').eq(0).click();
|
||||||
|
|
||||||
|
cy.get('@windowOpen').should('be.calledWith', '/workflows/onboarding/0?');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue