Add Activepieces integration for workflow automation
- 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>
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
import {
|
||||
CreateProjectReleaseRequestBody,
|
||||
ProjectReleaseType,
|
||||
} from '@activepieces/shared'
|
||||
import { faker } from '@faker-js/faker'
|
||||
import { FastifyInstance } from 'fastify'
|
||||
import { StatusCodes } from 'http-status-codes'
|
||||
import { initializeDatabase } from '../../../../src/app/database'
|
||||
import { databaseConnection } from '../../../../src/app/database/database-connection'
|
||||
import { setupServer } from '../../../../src/app/server'
|
||||
import {
|
||||
createMockApiKey,
|
||||
mockAndSaveBasicSetup,
|
||||
} from '../../../helpers/mocks'
|
||||
|
||||
let app: FastifyInstance | null = null
|
||||
|
||||
beforeAll(async () => {
|
||||
await initializeDatabase({ runMigrations: false })
|
||||
app = await setupServer()
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
await databaseConnection().destroy()
|
||||
await app?.close()
|
||||
})
|
||||
|
||||
|
||||
describe('Create Project Release', () => {
|
||||
it('Fails if projectId does not match', async () => {
|
||||
const { mockPlatform } = await mockAndSaveBasicSetup()
|
||||
const apiKey = createMockApiKey({
|
||||
platformId: mockPlatform.id,
|
||||
})
|
||||
await databaseConnection().getRepository('api_key').save([apiKey])
|
||||
|
||||
const request: CreateProjectReleaseRequestBody = {
|
||||
name: faker.animal.bird(),
|
||||
description: faker.lorem.sentence(),
|
||||
selectedFlowsIds: [],
|
||||
projectId: faker.string.uuid(),
|
||||
type: ProjectReleaseType.GIT,
|
||||
}
|
||||
|
||||
const response = await app?.inject({
|
||||
method: 'POST',
|
||||
url: '/v1/project-releases',
|
||||
body: request,
|
||||
headers: {
|
||||
authorization: `Bearer ${apiKey.value}`,
|
||||
},
|
||||
})
|
||||
|
||||
expect(response?.statusCode).toBe(StatusCodes.FORBIDDEN)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user