Skip to content

Commit a1c6110

Browse files
author
Roman Snapko
committed
Update test references for step renaming to step_a for consistency
1 parent b8f2888 commit a1c6110

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

packages/react-ui/src/app/features/builder/tests/update-flow-version.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ describe('updateFlowVersion', () => {
5252
valid: false,
5353
displayName: 'Select Trigger',
5454
nextAction: {
55-
id: 'step_1',
56-
name: 'step_1',
55+
id: 'step_a',
56+
name: 'step_a',
5757
type: ActionType.BLOCK,
5858
valid: false,
5959
displayName: 'step1',
@@ -68,7 +68,7 @@ describe('updateFlowVersion', () => {
6868
valid: false,
6969
state: FlowVersionState.DRAFT,
7070
},
71-
selectedStep: 'step_1',
71+
selectedStep: 'step_a',
7272
rightSidebar: RightSideBarType.BLOCK_SETTINGS,
7373
readonly: false,
7474
loopsIndexes: {},
@@ -124,7 +124,7 @@ describe('updateFlowVersion', () => {
124124
const operation = {
125125
type: FlowOperationType.UPDATE_ACTION,
126126
request: {
127-
name: 'step_1',
127+
name: 'step_a',
128128
type: 'BLOCK',
129129
valid: false,
130130
settings: { blockVersion: '1.0.0' },
@@ -160,7 +160,7 @@ describe('updateFlowVersion', () => {
160160
valid: false,
161161
displayName: 'Select Trigger',
162162
nextAction: {
163-
name: 'step_1',
163+
name: 'step_a',
164164
valid: false,
165165
type: 'BLOCK',
166166
displayName: 'Google Cloud CLI',
@@ -175,7 +175,7 @@ describe('updateFlowVersion', () => {
175175
it('should handle delete action and clear selection when deleting selected step', async () => {
176176
const operation = {
177177
type: FlowOperationType.DELETE_ACTION,
178-
request: { name: 'step_1' },
178+
request: { name: 'step_a' },
179179
} as FlowOperationRequest;
180180

181181
updateFlowVersion(mockState, operation, mockOnError, mockSet);
@@ -189,26 +189,26 @@ describe('updateFlowVersion', () => {
189189
it('should handle duplicate action selecting new step', async () => {
190190
const operation = {
191191
type: FlowOperationType.DUPLICATE_ACTION,
192-
request: { stepName: 'step_1' },
192+
request: { stepName: 'step_a' },
193193
} as FlowOperationRequest;
194194

195195
updateFlowVersion(mockState, operation, mockOnError, mockSet);
196196

197197
await waitFor(() => expect(mockSet).toHaveBeenCalledWith({ saving: true }));
198198
await waitFor(() =>
199-
expect(mockSet).toHaveBeenCalledWith({ selectedStep: 'step_2' }),
199+
expect(mockSet).toHaveBeenCalledWith({ selectedStep: 'step_b' }),
200200
);
201201
});
202202

203203
it('should call stepTestOutputCache.clearStep when deleting a step', async () => {
204204
const operation = {
205205
type: FlowOperationType.DELETE_ACTION,
206-
request: { name: 'step_1' },
206+
request: { name: 'step_a' },
207207
} as FlowOperationRequest;
208208
const clearStepSpy = jest.spyOn(stepTestOutputCache, 'clearStep');
209209
updateFlowVersion(mockState, operation, mockOnError, mockSet);
210210

211-
expect(clearStepSpy).toHaveBeenCalledWith('step_1');
211+
expect(clearStepSpy).toHaveBeenCalledWith('step_a');
212212
clearStepSpy.mockRestore();
213213
});
214214
});

0 commit comments

Comments
 (0)