displayForm tests update

This commit is contained in:
Michael Kret 2024-09-17 07:23:45 +03:00
parent 50450c3afb
commit a924763596

View file

@ -15,7 +15,6 @@ vi.mock('../executionUtils', async () => {
describe('displayForm', () => { describe('displayForm', () => {
const getTestUrlMock = vi.fn(); const getTestUrlMock = vi.fn();
const shouldShowFormMock = vi.fn();
beforeEach(() => { beforeEach(() => {
vi.clearAllMocks(); vi.clearAllMocks();
@ -50,11 +49,8 @@ describe('displayForm', () => {
pinData, pinData,
destinationNode: undefined, destinationNode: undefined,
directParentNodes: [], directParentNodes: [],
formWaitingUrl: 'http://example.com',
executionId: undefined,
source: undefined, source: undefined,
getTestUrl: getTestUrlMock, getTestUrl: getTestUrlMock,
shouldShowForm: shouldShowFormMock,
}); });
expect(openPopUpWindow).not.toHaveBeenCalled(); expect(openPopUpWindow).not.toHaveBeenCalled();
@ -86,11 +82,8 @@ describe('displayForm', () => {
pinData: {}, pinData: {},
destinationNode: 'Node3', destinationNode: 'Node3',
directParentNodes: ['Node4'], directParentNodes: ['Node4'],
formWaitingUrl: 'http://example.com',
executionId: '12345',
source: undefined, source: undefined,
getTestUrl: getTestUrlMock, getTestUrl: getTestUrlMock,
shouldShowForm: shouldShowFormMock,
}); });
expect(openPopUpWindow).not.toHaveBeenCalled(); expect(openPopUpWindow).not.toHaveBeenCalled();
@ -116,11 +109,8 @@ describe('displayForm', () => {
pinData: {}, pinData: {},
destinationNode: undefined, destinationNode: undefined,
directParentNodes: [], directParentNodes: [],
formWaitingUrl: 'http://example.com',
executionId: undefined,
source: 'RunData.ManualChatMessage', source: 'RunData.ManualChatMessage',
getTestUrl: getTestUrlMock, getTestUrl: getTestUrlMock,
shouldShowForm: shouldShowFormMock,
}); });
expect(openPopUpWindow).not.toHaveBeenCalled(); expect(openPopUpWindow).not.toHaveBeenCalled();