fix(editor): Fix flaky AI Assistant test (no-changelog)

This commit is contained in:
Milorad FIlipović 2024-10-11 14:41:00 +02:00
parent 0820cb5ab9
commit a96912e650

View file

@ -163,6 +163,7 @@ describe('AI Assistant::enabled', () => {
}
});
}).as('chatRequest');
cy.intercept('POST', '/rest/workflows/**/run?partialExecutionVersion=-1').as('executeWorkflow');
cy.createFixtureWorkflow('aiAssistant/workflows/test_workflow.json');
wf.actions.openNode('Edit Fields');
ndv.getters.nodeExecuteButton().click();
@ -170,6 +171,7 @@ describe('AI Assistant::enabled', () => {
cy.wait('@chatRequest');
aiAssistant.getters.chatMessagesAssistant().should('have.length', 1);
ndv.getters.nodeExecuteButton().click();
cy.wait('@executeWorkflow');
cy.wait('@chatRequest');
// Respond 'Yes' to the quick reply (request new suggestion)
aiAssistant.getters.quickReplies().contains('Yes').click();