- Add Activepieces fork with SmoothSchedule custom piece - Create integrations app with Activepieces service layer - Add embed token endpoint for iframe integration - Create Automations page with embedded workflow builder - Add sidebar visibility fix for embed mode - Add list inactive customers endpoint to Public API - Include SmoothSchedule triggers: event created/updated/cancelled - Include SmoothSchedule actions: create/update/cancel events, list resources/services/customers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
48 lines
1.5 KiB
TypeScript
48 lines
1.5 KiB
TypeScript
import { FlowRunStatus } from '@activepieces/shared'
|
|
import { FlowExecutorContext } from '../../src/lib/handler/context/flow-execution-context'
|
|
import { flowExecutor } from '../../src/lib/handler/flow-executor'
|
|
import { buildPieceAction, generateMockEngineConstants } from './test-helper'
|
|
|
|
describe('flow with response', () => {
|
|
|
|
it('should execute return response successfully', async () => {
|
|
const input = {
|
|
responseType: 'json',
|
|
fields: {
|
|
status: 200,
|
|
headers: {
|
|
'random': 'header',
|
|
},
|
|
body: {
|
|
'hello': 'world',
|
|
},
|
|
},
|
|
respond: 'stop',
|
|
}
|
|
const response = {
|
|
status: 200,
|
|
headers: {
|
|
'random': 'header',
|
|
},
|
|
body: {
|
|
'hello': 'world',
|
|
},
|
|
}
|
|
|
|
const result = await flowExecutor.execute({
|
|
action: buildPieceAction({
|
|
name: 'http',
|
|
pieceName: '@activepieces/piece-webhook',
|
|
actionName: 'return_response',
|
|
input,
|
|
}), executionState: FlowExecutorContext.empty(), constants: generateMockEngineConstants(),
|
|
})
|
|
expect(result.verdict).toStrictEqual({
|
|
status: FlowRunStatus.SUCCEEDED,
|
|
stopResponse: response,
|
|
})
|
|
expect(result.steps.http.output).toEqual(response)
|
|
})
|
|
|
|
})
|