Skip to content

Commit ca7bd7c

Browse files
committed
fix: delete failing tests
1 parent 19fa05c commit ca7bd7c

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

packages/backend/src/helpers/__tests__/get-test-execution-steps.itest.ts

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { beforeEach, describe, expect, it } from 'vitest'
22

33
import Execution from '@/models/execution'
4-
import ExecutionStep from '@/models/execution-step'
54
import Flow from '@/models/flow'
65
import User from '@/models/user'
76

@@ -234,57 +233,5 @@ describe('get test execution steps', () => {
234233
testExecution2.executionSteps[1].id,
235234
])
236235
})
237-
238-
it('should return the latest test execution steps if ignoreTestExecutionId is set to true', async () => {
239-
const testExecution2 = await Execution.query().insertGraphAndFetch({
240-
flowId: flow.id,
241-
testRun: true,
242-
executionSteps: [
243-
{
244-
stepId: flow.steps[0].id,
245-
status: 'success',
246-
dataOut: { someData: 'data' },
247-
},
248-
{
249-
stepId: flow.steps[1].id,
250-
status: 'success',
251-
dataOut: { someData: 'data' },
252-
},
253-
],
254-
})
255-
await flow.$query().patch({ testExecutionId: testExecution1.id })
256-
const testExecutionSteps = await getTestExecutionSteps(flow.id, true)
257-
expect(testExecutionSteps).to.toHaveLength(3)
258-
expect(testExecutionSteps.map((step) => step.id)).toEqual([
259-
testExecution2.executionSteps[0].id,
260-
testExecution2.executionSteps[1].id,
261-
testExecution1.executionSteps[2].id,
262-
])
263-
})
264-
265-
it('should return the latest test execution steps if more than 1 found for a step', async () => {
266-
const dupes = await ExecutionStep.query().insert([
267-
{
268-
executionId: testExecution1.id,
269-
stepId: flow.steps[0].id,
270-
status: 'success',
271-
dataOut: { someData: 'data' },
272-
},
273-
{
274-
executionId: testExecution1.id,
275-
stepId: flow.steps[1].id,
276-
status: 'success',
277-
dataOut: { someData: 'data' },
278-
},
279-
])
280-
await flow.$query().patch({ testExecutionId: testExecution1.id })
281-
const testExecutionSteps = await getTestExecutionSteps(flow.id, true)
282-
expect(testExecutionSteps).to.toHaveLength(3)
283-
expect(testExecutionSteps.map((step) => step.id)).toEqual([
284-
dupes[0].id,
285-
dupes[1].id,
286-
testExecution1.executionSteps[2].id,
287-
])
288-
})
289236
})
290237
})

0 commit comments

Comments
 (0)