This commit is contained in:
Ricardo Espinoza 2024-11-13 16:45:07 -05:00
parent 173935b725
commit 61929a6422
No known key found for this signature in database

View file

@ -80,4 +80,24 @@ describe('Workflow Selector Parameter', () => {
.find('input')
.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?');
});
});