2038 zapier integration 1 initialize a zapier app with a twenty related account (#2089)
* Add doc for Zapier development * Add twenty-zapier package * Install zapier packages * Update doc * Add twenty-zapier app * Update doc * Update apiKey slug * Update integration * Update create people to person * Update version * Fix lint * Remove useless comments * Update docs * Update version * Update naming * Add prettier * Simplify docs * Remove twenty related stuff from public doc * Use typescript boilerplate * Update details
This commit is contained in:
@ -0,0 +1,25 @@
|
||||
import App from '../../index';
|
||||
import { createAppTester, tools } from 'zapier-platform-core';
|
||||
const appTester = createAppTester(App);
|
||||
tools.env.inject();
|
||||
|
||||
describe('creates.create_person', () => {
|
||||
test('should run', async () => {
|
||||
const bundle = {
|
||||
authData: { apiKey: String(process.env.API_KEY) },
|
||||
inputData: {
|
||||
firstName: 'John',
|
||||
lastName: 'Doe',
|
||||
email: 'johndoe@gmail.com',
|
||||
phone: '+33610203040',
|
||||
city: 'Paris',
|
||||
},
|
||||
};
|
||||
const results = await appTester(
|
||||
App.creates.create_person.operation.perform,
|
||||
bundle,
|
||||
);
|
||||
expect(results).toBeDefined();
|
||||
expect(results.data?.createOnePerson?.id).toBeDefined();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user