add greenhouse (#1690)
This commit is contained in:
23
packages/pipeline/test/entities/greenhouse_test.ts
Normal file
23
packages/pipeline/test/entities/greenhouse_test.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import 'mocha';
|
||||
import 'reflect-metadata';
|
||||
|
||||
import { GreenhouseApplication } from '../../src/entities';
|
||||
import { createDbConnectionOnceAsync } from '../db_setup';
|
||||
import { ParsedApplications } from '../fixtures/greenhouse/api_v1_applications';
|
||||
import { chaiSetup } from '../utils/chai_setup';
|
||||
|
||||
import { testSaveAndFindEntityAsync } from './util';
|
||||
|
||||
chaiSetup.configure();
|
||||
|
||||
describe('Greenhouse entities', () => {
|
||||
describe('save and find', async () => {
|
||||
it('Greenhouse application', async () => {
|
||||
const connection = await createDbConnectionOnceAsync();
|
||||
const repository = connection.getRepository(GreenhouseApplication);
|
||||
ParsedApplications.forEach(async entity => {
|
||||
await testSaveAndFindEntityAsync(repository, entity);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
815
packages/pipeline/test/fixtures/greenhouse/api_v1_applications.json
vendored
Normal file
815
packages/pipeline/test/fixtures/greenhouse/api_v1_applications.json
vendored
Normal file
@@ -0,0 +1,815 @@
|
||||
[
|
||||
{
|
||||
"status": "rejected",
|
||||
"source": {
|
||||
"public_name": "AngelList",
|
||||
"id": 4000058002
|
||||
},
|
||||
"rejection_reason": {
|
||||
"type": {
|
||||
"name": "We rejected them",
|
||||
"id": 4000000002
|
||||
},
|
||||
"name": "Lacking skill(s)/qualification(s)",
|
||||
"id": 4000002002
|
||||
},
|
||||
"rejection_details": {},
|
||||
"rejected_at": "2018-05-17T07:00:00.000Z",
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": null,
|
||||
"last_activity_at": "2019-03-08T00:32:00.138Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Data Scientist",
|
||||
"id": 4018564002
|
||||
}
|
||||
],
|
||||
"id": 7510796002,
|
||||
"current_stage": {
|
||||
"name": "Phone Interview",
|
||||
"id": 4138361002
|
||||
},
|
||||
"credited_to": {
|
||||
"name": "Zack Skelly",
|
||||
"last_name": "Skelly",
|
||||
"id": 4069870002,
|
||||
"first_name": "Zack",
|
||||
"employee_id": null
|
||||
},
|
||||
"candidate_id": 6977554002,
|
||||
"applied_at": "2018-05-03T17:51:36.660Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "active",
|
||||
"source": {
|
||||
"public_name": "Jobs page on your website",
|
||||
"id": 4000015002
|
||||
},
|
||||
"rejection_reason": null,
|
||||
"rejection_details": null,
|
||||
"rejected_at": null,
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": {
|
||||
"address": "San Francisco, California, United States"
|
||||
},
|
||||
"last_activity_at": "2019-03-08T15:10:02.636Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Software Engineer — Blockchain",
|
||||
"id": 4018550002
|
||||
}
|
||||
],
|
||||
"id": 14858220002,
|
||||
"current_stage": {
|
||||
"name": "Outreach",
|
||||
"id": 4138271002
|
||||
},
|
||||
"credited_to": null,
|
||||
"candidate_id": 13419271002,
|
||||
"applied_at": "2018-12-11T17:17:06.473Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "rejected",
|
||||
"source": {
|
||||
"public_name": "Jobs page on your website",
|
||||
"id": 4000015002
|
||||
},
|
||||
"rejection_reason": {
|
||||
"type": {
|
||||
"name": "We rejected them",
|
||||
"id": 4000000002
|
||||
},
|
||||
"name": "Lacking skill(s)/qualification(s)",
|
||||
"id": 4000002002
|
||||
},
|
||||
"rejection_details": {},
|
||||
"rejected_at": "2019-01-09T22:23:35.136Z",
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": {
|
||||
"address": "Atlanta, Georgia, United States"
|
||||
},
|
||||
"last_activity_at": "2019-03-08T15:10:11.691Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Software Engineer — Back-end",
|
||||
"id": 4053187002
|
||||
}
|
||||
],
|
||||
"id": 14984854002,
|
||||
"current_stage": {
|
||||
"name": "Application Review",
|
||||
"id": 4393404002
|
||||
},
|
||||
"credited_to": null,
|
||||
"candidate_id": 16301491002,
|
||||
"applied_at": "2018-12-15T02:19:02.807Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "active",
|
||||
"source": {
|
||||
"public_name": "ZenSourcer",
|
||||
"id": 4000173002
|
||||
},
|
||||
"rejection_reason": null,
|
||||
"rejection_details": null,
|
||||
"rejected_at": null,
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": null,
|
||||
"last_activity_at": "2019-03-08T01:58:37.267Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Corporate Counsel",
|
||||
"id": 4164900002
|
||||
}
|
||||
],
|
||||
"id": 15719204002,
|
||||
"current_stage": {
|
||||
"name": "Debrief",
|
||||
"id": 5221852002
|
||||
},
|
||||
"credited_to": {
|
||||
"name": "Zack Skelly",
|
||||
"last_name": "Skelly",
|
||||
"id": 4069870002,
|
||||
"first_name": "Zack",
|
||||
"employee_id": null
|
||||
},
|
||||
"candidate_id": 14231312002,
|
||||
"applied_at": "2019-01-10T00:25:20.613Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "active",
|
||||
"source": {
|
||||
"public_name": "Jobs page on your website",
|
||||
"id": 4000015002
|
||||
},
|
||||
"rejection_reason": null,
|
||||
"rejection_details": null,
|
||||
"rejected_at": null,
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": {
|
||||
"address": "London, Greater London, England, United Kingdom"
|
||||
},
|
||||
"last_activity_at": "2019-03-08T15:10:10.534Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Product Manager — Growth",
|
||||
"id": 4114086002
|
||||
}
|
||||
],
|
||||
"id": 16178464002,
|
||||
"current_stage": {
|
||||
"name": "Phone Interview",
|
||||
"id": 4841984002
|
||||
},
|
||||
"credited_to": null,
|
||||
"candidate_id": 14662768002,
|
||||
"applied_at": "2019-01-21T19:13:05.665Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "rejected",
|
||||
"source": {
|
||||
"public_name": "ZenSourcer",
|
||||
"id": 4000173002
|
||||
},
|
||||
"rejection_reason": {
|
||||
"type": {
|
||||
"name": "We rejected them",
|
||||
"id": 4000000002
|
||||
},
|
||||
"name": "Lacking skill(s)/qualification(s)",
|
||||
"id": 4000002002
|
||||
},
|
||||
"rejection_details": {},
|
||||
"rejected_at": "2019-03-07T18:41:29.967Z",
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": null,
|
||||
"last_activity_at": "2019-03-08T15:10:09.636Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Software Engineer — Blockchain",
|
||||
"id": 4018550002
|
||||
}
|
||||
],
|
||||
"id": 16987221002,
|
||||
"current_stage": {
|
||||
"name": "Phone Interview",
|
||||
"id": 4138252002
|
||||
},
|
||||
"credited_to": {
|
||||
"name": "Zack Skelly",
|
||||
"last_name": "Skelly",
|
||||
"id": 4069870002,
|
||||
"first_name": "Zack",
|
||||
"employee_id": null
|
||||
},
|
||||
"candidate_id": 15425402002,
|
||||
"applied_at": "2019-02-05T05:50:46.504Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "active",
|
||||
"source": {
|
||||
"public_name": "ZenSourcer",
|
||||
"id": 4000173002
|
||||
},
|
||||
"rejection_reason": null,
|
||||
"rejection_details": null,
|
||||
"rejected_at": null,
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": null,
|
||||
"last_activity_at": "2019-03-08T01:07:48.511Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Software Engineer — Blockchain",
|
||||
"id": 4018550002
|
||||
}
|
||||
],
|
||||
"id": 17110646002,
|
||||
"current_stage": {
|
||||
"name": "Take Home Test",
|
||||
"id": 4138280002
|
||||
},
|
||||
"credited_to": {
|
||||
"name": "Marc Savino",
|
||||
"last_name": "Savino",
|
||||
"id": 4243712002,
|
||||
"first_name": "Marc",
|
||||
"employee_id": null
|
||||
},
|
||||
"candidate_id": 15546609002,
|
||||
"applied_at": "2019-02-07T02:15:21.653Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "rejected",
|
||||
"source": {
|
||||
"public_name": "Jobs page on your website",
|
||||
"id": 4000015002
|
||||
},
|
||||
"rejection_reason": {
|
||||
"type": {
|
||||
"name": "We rejected them",
|
||||
"id": 4000000002
|
||||
},
|
||||
"name": "Lacking skill(s)/qualification(s)",
|
||||
"id": 4000002002
|
||||
},
|
||||
"rejection_details": {},
|
||||
"rejected_at": "2019-03-01T01:18:27.114Z",
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": {
|
||||
"address": "San Francisco, California, United States"
|
||||
},
|
||||
"last_activity_at": "2019-03-08T11:15:26.517Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Product Manager — Growth",
|
||||
"id": 4114086002
|
||||
}
|
||||
],
|
||||
"id": 17248048002,
|
||||
"current_stage": {
|
||||
"name": "Phone Interview",
|
||||
"id": 4841984002
|
||||
},
|
||||
"credited_to": null,
|
||||
"candidate_id": 15678079002,
|
||||
"applied_at": "2019-02-10T22:18:05.091Z",
|
||||
"answers": [
|
||||
{
|
||||
"question": "How did you hear about this job?",
|
||||
"answer": "Angellist"
|
||||
},
|
||||
{
|
||||
"question": "Website",
|
||||
"answer": null
|
||||
},
|
||||
{
|
||||
"question": "GitHub",
|
||||
"answer": null
|
||||
},
|
||||
{
|
||||
"question": "LinkedIn Profile",
|
||||
"answer": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"status": "active",
|
||||
"source": {
|
||||
"public_name": "Recurse",
|
||||
"id": 4008626002
|
||||
},
|
||||
"rejection_reason": null,
|
||||
"rejection_details": null,
|
||||
"rejected_at": null,
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": null,
|
||||
"last_activity_at": "2019-03-08T01:40:50.107Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Software Engineer — Blockchain",
|
||||
"id": 4018550002
|
||||
}
|
||||
],
|
||||
"id": 17289149002,
|
||||
"current_stage": {
|
||||
"name": "Phone Interview",
|
||||
"id": 4138252002
|
||||
},
|
||||
"credited_to": {
|
||||
"name": "Zack Skelly",
|
||||
"last_name": "Skelly",
|
||||
"id": 4069870002,
|
||||
"first_name": "Zack",
|
||||
"employee_id": null
|
||||
},
|
||||
"candidate_id": 15717915002,
|
||||
"applied_at": "2019-02-11T21:25:51.243Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "active",
|
||||
"source": {
|
||||
"public_name": "ZenSourcer",
|
||||
"id": 4000173002
|
||||
},
|
||||
"rejection_reason": null,
|
||||
"rejection_details": null,
|
||||
"rejected_at": null,
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": null,
|
||||
"last_activity_at": "2019-03-08T15:10:19.937Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Quantitative Software Engineer",
|
||||
"id": 4166565002
|
||||
}
|
||||
],
|
||||
"id": 17311290002,
|
||||
"current_stage": {
|
||||
"name": "Preliminary Phone Screen",
|
||||
"id": 5233631002
|
||||
},
|
||||
"credited_to": {
|
||||
"name": "Zack Skelly",
|
||||
"last_name": "Skelly",
|
||||
"id": 4069870002,
|
||||
"first_name": "Zack",
|
||||
"employee_id": null
|
||||
},
|
||||
"candidate_id": 15739177002,
|
||||
"applied_at": "2019-02-12T04:19:17.173Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "rejected",
|
||||
"source": {
|
||||
"public_name": "Jobs page on your website",
|
||||
"id": 4000015002
|
||||
},
|
||||
"rejection_reason": {
|
||||
"type": {
|
||||
"name": "We rejected them",
|
||||
"id": 4000000002
|
||||
},
|
||||
"name": "Lacking skill(s)/qualification(s)",
|
||||
"id": 4000002002
|
||||
},
|
||||
"rejection_details": {},
|
||||
"rejected_at": "2019-02-27T01:27:49.570Z",
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": {
|
||||
"address": "Los Angeles, California, United States"
|
||||
},
|
||||
"last_activity_at": "2019-03-08T15:10:12.111Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Software Engineer — Back-end",
|
||||
"id": 4053187002
|
||||
}
|
||||
],
|
||||
"id": 17566424002,
|
||||
"current_stage": {
|
||||
"name": "Application Review",
|
||||
"id": 4393404002
|
||||
},
|
||||
"credited_to": null,
|
||||
"candidate_id": 15973199002,
|
||||
"applied_at": "2019-02-15T01:43:06.450Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "active",
|
||||
"source": {
|
||||
"public_name": "Jobs page on your website",
|
||||
"id": 4000015002
|
||||
},
|
||||
"rejection_reason": null,
|
||||
"rejection_details": null,
|
||||
"rejected_at": null,
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": null,
|
||||
"last_activity_at": "2019-03-08T15:10:12.111Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Quantitative Software Engineer",
|
||||
"id": 4166565002
|
||||
}
|
||||
],
|
||||
"id": 17566430002,
|
||||
"current_stage": {
|
||||
"name": "Outreach",
|
||||
"id": 5233629002
|
||||
},
|
||||
"credited_to": null,
|
||||
"candidate_id": 15973199002,
|
||||
"applied_at": "2019-02-15T01:43:07.628Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "rejected",
|
||||
"source": {
|
||||
"public_name": "Jobs page on your website",
|
||||
"id": 4000015002
|
||||
},
|
||||
"rejection_reason": {
|
||||
"type": {
|
||||
"name": "We rejected them",
|
||||
"id": 4000000002
|
||||
},
|
||||
"name": "Lacking skill(s)/qualification(s)",
|
||||
"id": 4000002002
|
||||
},
|
||||
"rejection_details": {},
|
||||
"rejected_at": "2019-02-21T01:31:35.276Z",
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": null,
|
||||
"last_activity_at": "2019-03-08T15:10:12.111Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Software Engineer — Blockchain",
|
||||
"id": 4018550002
|
||||
}
|
||||
],
|
||||
"id": 17566459002,
|
||||
"current_stage": {
|
||||
"name": "Application Review",
|
||||
"id": 4138250002
|
||||
},
|
||||
"credited_to": null,
|
||||
"candidate_id": 15973199002,
|
||||
"applied_at": "2019-02-15T01:44:05.399Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "active",
|
||||
"source": {
|
||||
"public_name": "Jobs page on your website",
|
||||
"id": 4000015002
|
||||
},
|
||||
"rejection_reason": null,
|
||||
"rejection_details": null,
|
||||
"rejected_at": null,
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": {
|
||||
"address": "New York, New York, United States"
|
||||
},
|
||||
"last_activity_at": "2019-03-08T15:10:09.886Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Product Manager — Growth",
|
||||
"id": 4114086002
|
||||
}
|
||||
],
|
||||
"id": 17595215002,
|
||||
"current_stage": {
|
||||
"name": "Phone Interview",
|
||||
"id": 4841984002
|
||||
},
|
||||
"credited_to": null,
|
||||
"candidate_id": 16001558002,
|
||||
"applied_at": "2019-02-15T20:42:01.408Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "rejected",
|
||||
"source": {
|
||||
"public_name": "Jobs page on your website",
|
||||
"id": 4000015002
|
||||
},
|
||||
"rejection_reason": {
|
||||
"type": {
|
||||
"name": "We rejected them",
|
||||
"id": 4000000002
|
||||
},
|
||||
"name": "Lacking skill(s)/qualification(s)",
|
||||
"id": 4000002002
|
||||
},
|
||||
"rejection_details": {},
|
||||
"rejected_at": "2019-03-08T02:36:03.530Z",
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": {
|
||||
"address": "Berkeley, California, United States"
|
||||
},
|
||||
"last_activity_at": "2019-03-08T02:36:03.584Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Corporate Counsel",
|
||||
"id": 4164900002
|
||||
}
|
||||
],
|
||||
"id": 17732605002,
|
||||
"current_stage": {
|
||||
"name": "Phone Interview",
|
||||
"id": 5221849002
|
||||
},
|
||||
"credited_to": null,
|
||||
"candidate_id": 16091577002,
|
||||
"applied_at": "2019-02-18T06:12:04.672Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "active",
|
||||
"source": {
|
||||
"public_name": "Jobs page on your website",
|
||||
"id": 4000015002
|
||||
},
|
||||
"rejection_reason": null,
|
||||
"rejection_details": null,
|
||||
"rejected_at": null,
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": null,
|
||||
"last_activity_at": "2019-03-08T18:18:55.989Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Corporate Counsel",
|
||||
"id": 4164900002
|
||||
}
|
||||
],
|
||||
"id": 17777009002,
|
||||
"current_stage": {
|
||||
"name": "Face to Face",
|
||||
"id": 5221850002
|
||||
},
|
||||
"credited_to": null,
|
||||
"candidate_id": 16134582002,
|
||||
"applied_at": "2019-02-19T02:26:06.452Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "active",
|
||||
"source": {
|
||||
"public_name": "ZenSourcer",
|
||||
"id": 4000173002
|
||||
},
|
||||
"rejection_reason": null,
|
||||
"rejection_details": null,
|
||||
"rejected_at": null,
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": null,
|
||||
"last_activity_at": "2019-03-08T15:10:16.650Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Software Engineer — Blockchain",
|
||||
"id": 4018550002
|
||||
}
|
||||
],
|
||||
"id": 17875779002,
|
||||
"current_stage": {
|
||||
"name": "Phone Interview",
|
||||
"id": 4138252002
|
||||
},
|
||||
"credited_to": {
|
||||
"name": "Zack Skelly",
|
||||
"last_name": "Skelly",
|
||||
"id": 4069870002,
|
||||
"first_name": "Zack",
|
||||
"employee_id": null
|
||||
},
|
||||
"candidate_id": 16224818002,
|
||||
"applied_at": "2019-02-20T18:55:14.798Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "active",
|
||||
"source": {
|
||||
"public_name": "ZenSourcer",
|
||||
"id": 4000173002
|
||||
},
|
||||
"rejection_reason": null,
|
||||
"rejection_details": null,
|
||||
"rejected_at": null,
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": null,
|
||||
"last_activity_at": "2019-03-08T15:10:15.360Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Product Designer",
|
||||
"id": 4111307002
|
||||
}
|
||||
],
|
||||
"id": 17914377002,
|
||||
"current_stage": {
|
||||
"name": "Preliminary Phone Screen",
|
||||
"id": 4820398002
|
||||
},
|
||||
"credited_to": {
|
||||
"name": "Chris Kalani",
|
||||
"last_name": "Kalani",
|
||||
"id": 4147082002,
|
||||
"first_name": "Chris",
|
||||
"employee_id": null
|
||||
},
|
||||
"candidate_id": 16261232002,
|
||||
"applied_at": "2019-02-21T05:52:50.097Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "active",
|
||||
"source": {
|
||||
"public_name": "ZenSourcer",
|
||||
"id": 4000173002
|
||||
},
|
||||
"rejection_reason": null,
|
||||
"rejection_details": null,
|
||||
"rejected_at": null,
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": null,
|
||||
"last_activity_at": "2019-03-08T15:10:12.746Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Product Designer",
|
||||
"id": 4111307002
|
||||
}
|
||||
],
|
||||
"id": 17944911002,
|
||||
"current_stage": {
|
||||
"name": "Phone Interview",
|
||||
"id": 4820399002
|
||||
},
|
||||
"credited_to": {
|
||||
"name": "Zack Skelly",
|
||||
"last_name": "Skelly",
|
||||
"id": 4069870002,
|
||||
"first_name": "Zack",
|
||||
"employee_id": null
|
||||
},
|
||||
"candidate_id": 16290422002,
|
||||
"applied_at": "2019-02-21T21:26:17.865Z",
|
||||
"answers": []
|
||||
},
|
||||
{
|
||||
"status": "active",
|
||||
"source": {
|
||||
"public_name": "Jobs page on your website",
|
||||
"id": 4000015002
|
||||
},
|
||||
"rejection_reason": null,
|
||||
"rejection_details": null,
|
||||
"rejected_at": null,
|
||||
"prospect_detail": {
|
||||
"prospect_stage": null,
|
||||
"prospect_pool": null,
|
||||
"prospect_owner": null
|
||||
},
|
||||
"prospect": false,
|
||||
"location": {
|
||||
"address": "Atlanta, Georgia, United States"
|
||||
},
|
||||
"last_activity_at": "2019-03-08T15:10:11.691Z",
|
||||
"jobs": [
|
||||
{
|
||||
"name": "Data Engineer",
|
||||
"id": 4194568002
|
||||
}
|
||||
],
|
||||
"id": 17956360002,
|
||||
"current_stage": {
|
||||
"name": "Outreach",
|
||||
"id": 5448217002
|
||||
},
|
||||
"credited_to": null,
|
||||
"candidate_id": 16301491002,
|
||||
"applied_at": "2019-02-22T03:09:02.181Z",
|
||||
"answers": [
|
||||
{
|
||||
"question": "How did you hear about this job?",
|
||||
"answer": null
|
||||
},
|
||||
{
|
||||
"question": "Website",
|
||||
"answer": null
|
||||
},
|
||||
{
|
||||
"question": "GitHub",
|
||||
"answer": null
|
||||
},
|
||||
{
|
||||
"question": "LinkedIn Profile",
|
||||
"answer": null
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
286
packages/pipeline/test/fixtures/greenhouse/api_v1_applications.ts
vendored
Normal file
286
packages/pipeline/test/fixtures/greenhouse/api_v1_applications.ts
vendored
Normal file
@@ -0,0 +1,286 @@
|
||||
import { GreenhouseApplication } from '../../../src/entities';
|
||||
|
||||
const ParsedApplications: GreenhouseApplication[] = [
|
||||
{
|
||||
id: 7510796002,
|
||||
candidate_id: 6977554002,
|
||||
applied_at: new Date('2018-05-03T17:51:36.660Z'),
|
||||
rejected_at: new Date('2018-05-17T07:00:00.000Z'),
|
||||
last_activity_at: new Date('2019-03-08T00:32:00.138Z'),
|
||||
source_id: 4000058002,
|
||||
source_name: 'AngelList',
|
||||
credited_to_id: 4069870002,
|
||||
credited_to_name: 'Zack Skelly',
|
||||
status: 'rejected',
|
||||
current_stage_id: 4138361002,
|
||||
current_stage_name: 'Phone Interview',
|
||||
},
|
||||
{
|
||||
id: 14858220002,
|
||||
candidate_id: 13419271002,
|
||||
applied_at: new Date('2018-12-11T17:17:06.473Z'),
|
||||
rejected_at: undefined,
|
||||
last_activity_at: new Date('2019-03-08T15:10:02.636Z'),
|
||||
source_id: 4000015002,
|
||||
source_name: 'Jobs page on your website',
|
||||
credited_to_id: undefined,
|
||||
credited_to_name: undefined,
|
||||
status: 'active',
|
||||
current_stage_id: 4138271002,
|
||||
current_stage_name: 'Outreach',
|
||||
},
|
||||
{
|
||||
id: 14984854002,
|
||||
candidate_id: 16301491002,
|
||||
applied_at: new Date('2018-12-15T02:19:02.807Z'),
|
||||
rejected_at: new Date('2019-01-09T22:23:35.136Z'),
|
||||
last_activity_at: new Date('2019-03-08T15:10:11.691Z'),
|
||||
source_id: 4000015002,
|
||||
source_name: 'Jobs page on your website',
|
||||
credited_to_id: undefined,
|
||||
credited_to_name: undefined,
|
||||
status: 'rejected',
|
||||
current_stage_id: 4393404002,
|
||||
current_stage_name: 'Application Review',
|
||||
},
|
||||
{
|
||||
id: 15719204002,
|
||||
candidate_id: 14231312002,
|
||||
applied_at: new Date('2019-01-10T00:25:20.613Z'),
|
||||
rejected_at: undefined,
|
||||
last_activity_at: new Date('2019-03-08T01:58:37.267Z'),
|
||||
source_id: 4000173002,
|
||||
source_name: 'ZenSourcer',
|
||||
credited_to_id: 4069870002,
|
||||
credited_to_name: 'Zack Skelly',
|
||||
status: 'active',
|
||||
current_stage_id: 5221852002,
|
||||
current_stage_name: 'Debrief',
|
||||
},
|
||||
{
|
||||
id: 16178464002,
|
||||
candidate_id: 14662768002,
|
||||
applied_at: new Date('2019-01-21T19:13:05.665Z'),
|
||||
rejected_at: undefined,
|
||||
last_activity_at: new Date('2019-03-08T15:10:10.534Z'),
|
||||
source_id: 4000015002,
|
||||
source_name: 'Jobs page on your website',
|
||||
credited_to_id: undefined,
|
||||
credited_to_name: undefined,
|
||||
status: 'active',
|
||||
current_stage_id: 4841984002,
|
||||
current_stage_name: 'Phone Interview',
|
||||
},
|
||||
{
|
||||
id: 16987221002,
|
||||
candidate_id: 15425402002,
|
||||
applied_at: new Date('2019-02-05T05:50:46.504Z'),
|
||||
rejected_at: new Date('2019-03-07T18:41:29.967Z'),
|
||||
last_activity_at: new Date('2019-03-08T15:10:09.636Z'),
|
||||
source_id: 4000173002,
|
||||
source_name: 'ZenSourcer',
|
||||
credited_to_id: 4069870002,
|
||||
credited_to_name: 'Zack Skelly',
|
||||
status: 'rejected',
|
||||
current_stage_id: 4138252002,
|
||||
current_stage_name: 'Phone Interview',
|
||||
},
|
||||
{
|
||||
id: 17110646002,
|
||||
candidate_id: 15546609002,
|
||||
applied_at: new Date('2019-02-07T02:15:21.653Z'),
|
||||
rejected_at: undefined,
|
||||
last_activity_at: new Date('2019-03-08T01:07:48.511Z'),
|
||||
source_id: 4000173002,
|
||||
source_name: 'ZenSourcer',
|
||||
credited_to_id: 4243712002,
|
||||
credited_to_name: 'Marc Savino',
|
||||
status: 'active',
|
||||
current_stage_id: 4138280002,
|
||||
current_stage_name: 'Take Home Test',
|
||||
},
|
||||
{
|
||||
id: 17248048002,
|
||||
candidate_id: 15678079002,
|
||||
applied_at: new Date('2019-02-10T22:18:05.091Z'),
|
||||
rejected_at: new Date('2019-03-01T01:18:27.114Z'),
|
||||
last_activity_at: new Date('2019-03-08T11:15:26.517Z'),
|
||||
source_id: 4000015002,
|
||||
source_name: 'Jobs page on your website',
|
||||
credited_to_id: undefined,
|
||||
credited_to_name: undefined,
|
||||
status: 'rejected',
|
||||
current_stage_id: 4841984002,
|
||||
current_stage_name: 'Phone Interview',
|
||||
},
|
||||
{
|
||||
id: 17289149002,
|
||||
candidate_id: 15717915002,
|
||||
applied_at: new Date('2019-02-11T21:25:51.243Z'),
|
||||
rejected_at: undefined,
|
||||
last_activity_at: new Date('2019-03-08T01:40:50.107Z'),
|
||||
source_id: 4008626002,
|
||||
source_name: 'Recurse',
|
||||
credited_to_id: 4069870002,
|
||||
credited_to_name: 'Zack Skelly',
|
||||
status: 'active',
|
||||
current_stage_id: 4138252002,
|
||||
current_stage_name: 'Phone Interview',
|
||||
},
|
||||
{
|
||||
id: 17311290002,
|
||||
candidate_id: 15739177002,
|
||||
applied_at: new Date('2019-02-12T04:19:17.173Z'),
|
||||
rejected_at: undefined,
|
||||
last_activity_at: new Date('2019-03-08T15:10:19.937Z'),
|
||||
source_id: 4000173002,
|
||||
source_name: 'ZenSourcer',
|
||||
credited_to_id: 4069870002,
|
||||
credited_to_name: 'Zack Skelly',
|
||||
status: 'active',
|
||||
current_stage_id: 5233631002,
|
||||
current_stage_name: 'Preliminary Phone Screen',
|
||||
},
|
||||
{
|
||||
id: 17566424002,
|
||||
candidate_id: 15973199002,
|
||||
applied_at: new Date('2019-02-15T01:43:06.450Z'),
|
||||
rejected_at: new Date('2019-02-27T01:27:49.570Z'),
|
||||
last_activity_at: new Date('2019-03-08T15:10:12.111Z'),
|
||||
source_id: 4000015002,
|
||||
source_name: 'Jobs page on your website',
|
||||
credited_to_id: undefined,
|
||||
credited_to_name: undefined,
|
||||
status: 'rejected',
|
||||
current_stage_id: 4393404002,
|
||||
current_stage_name: 'Application Review',
|
||||
},
|
||||
{
|
||||
id: 17566430002,
|
||||
candidate_id: 15973199002,
|
||||
applied_at: new Date('2019-02-15T01:43:07.628Z'),
|
||||
rejected_at: undefined,
|
||||
last_activity_at: new Date('2019-03-08T15:10:12.111Z'),
|
||||
source_id: 4000015002,
|
||||
source_name: 'Jobs page on your website',
|
||||
credited_to_id: undefined,
|
||||
credited_to_name: undefined,
|
||||
status: 'active',
|
||||
current_stage_id: 5233629002,
|
||||
current_stage_name: 'Outreach',
|
||||
},
|
||||
{
|
||||
id: 17566459002,
|
||||
candidate_id: 15973199002,
|
||||
applied_at: new Date('2019-02-15T01:44:05.399Z'),
|
||||
rejected_at: new Date('2019-02-21T01:31:35.276Z'),
|
||||
last_activity_at: new Date('2019-03-08T15:10:12.111Z'),
|
||||
source_id: 4000015002,
|
||||
source_name: 'Jobs page on your website',
|
||||
credited_to_id: undefined,
|
||||
credited_to_name: undefined,
|
||||
status: 'rejected',
|
||||
current_stage_id: 4138250002,
|
||||
current_stage_name: 'Application Review',
|
||||
},
|
||||
{
|
||||
id: 17595215002,
|
||||
candidate_id: 16001558002,
|
||||
applied_at: new Date('2019-02-15T20:42:01.408Z'),
|
||||
rejected_at: undefined,
|
||||
last_activity_at: new Date('2019-03-08T15:10:09.886Z'),
|
||||
source_id: 4000015002,
|
||||
source_name: 'Jobs page on your website',
|
||||
credited_to_id: undefined,
|
||||
credited_to_name: undefined,
|
||||
status: 'active',
|
||||
current_stage_id: 4841984002,
|
||||
current_stage_name: 'Phone Interview',
|
||||
},
|
||||
{
|
||||
id: 17732605002,
|
||||
candidate_id: 16091577002,
|
||||
applied_at: new Date('2019-02-18T06:12:04.672Z'),
|
||||
rejected_at: new Date('2019-03-08T02:36:03.530Z'),
|
||||
last_activity_at: new Date('2019-03-08T02:36:03.584Z'),
|
||||
source_id: 4000015002,
|
||||
source_name: 'Jobs page on your website',
|
||||
credited_to_id: undefined,
|
||||
credited_to_name: undefined,
|
||||
status: 'rejected',
|
||||
current_stage_id: 5221849002,
|
||||
current_stage_name: 'Phone Interview',
|
||||
},
|
||||
{
|
||||
id: 17777009002,
|
||||
candidate_id: 16134582002,
|
||||
applied_at: new Date('2019-02-19T02:26:06.452Z'),
|
||||
rejected_at: undefined,
|
||||
last_activity_at: new Date('2019-03-08T18:18:55.989Z'),
|
||||
source_id: 4000015002,
|
||||
source_name: 'Jobs page on your website',
|
||||
credited_to_id: undefined,
|
||||
credited_to_name: undefined,
|
||||
status: 'active',
|
||||
current_stage_id: 5221850002,
|
||||
current_stage_name: 'Face to Face',
|
||||
},
|
||||
{
|
||||
id: 17875779002,
|
||||
candidate_id: 16224818002,
|
||||
applied_at: new Date('2019-02-20T18:55:14.798Z'),
|
||||
rejected_at: undefined,
|
||||
last_activity_at: new Date('2019-03-08T15:10:16.650Z'),
|
||||
source_id: 4000173002,
|
||||
source_name: 'ZenSourcer',
|
||||
credited_to_id: 4069870002,
|
||||
credited_to_name: 'Zack Skelly',
|
||||
status: 'active',
|
||||
current_stage_id: 4138252002,
|
||||
current_stage_name: 'Phone Interview',
|
||||
},
|
||||
{
|
||||
id: 17914377002,
|
||||
candidate_id: 16261232002,
|
||||
applied_at: new Date('2019-02-21T05:52:50.097Z'),
|
||||
rejected_at: undefined,
|
||||
last_activity_at: new Date('2019-03-08T15:10:15.360Z'),
|
||||
source_id: 4000173002,
|
||||
source_name: 'ZenSourcer',
|
||||
credited_to_id: 4147082002,
|
||||
credited_to_name: 'Chris Kalani',
|
||||
status: 'active',
|
||||
current_stage_id: 4820398002,
|
||||
current_stage_name: 'Preliminary Phone Screen',
|
||||
},
|
||||
{
|
||||
id: 17944911002,
|
||||
candidate_id: 16290422002,
|
||||
applied_at: new Date('2019-02-21T21:26:17.865Z'),
|
||||
rejected_at: undefined,
|
||||
last_activity_at: new Date('2019-03-08T15:10:12.746Z'),
|
||||
source_id: 4000173002,
|
||||
source_name: 'ZenSourcer',
|
||||
credited_to_id: 4069870002,
|
||||
credited_to_name: 'Zack Skelly',
|
||||
status: 'active',
|
||||
current_stage_id: 4820399002,
|
||||
current_stage_name: 'Phone Interview',
|
||||
},
|
||||
{
|
||||
id: 17956360002,
|
||||
candidate_id: 16301491002,
|
||||
applied_at: new Date('2019-02-22T03:09:02.181Z'),
|
||||
rejected_at: undefined,
|
||||
last_activity_at: new Date('2019-03-08T15:10:11.691Z'),
|
||||
source_id: 4000015002,
|
||||
source_name: 'Jobs page on your website',
|
||||
credited_to_id: undefined,
|
||||
credited_to_name: undefined,
|
||||
status: 'active',
|
||||
current_stage_id: 5448217002,
|
||||
current_stage_name: 'Outreach',
|
||||
},
|
||||
];
|
||||
|
||||
export { ParsedApplications };
|
22
packages/pipeline/test/parsers/greenhouse/index_test.ts
Normal file
22
packages/pipeline/test/parsers/greenhouse/index_test.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import * as chai from 'chai';
|
||||
import 'mocha';
|
||||
|
||||
import { GreenhouseApplication } from '../../../src/entities';
|
||||
import { chaiSetup } from '../../utils/chai_setup';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
|
||||
import { GreenhouseApplicationResponse } from '../../../src/data_sources/greenhouse';
|
||||
import { parseApplications } from '../../../src/parsers/greenhouse';
|
||||
import { ParsedApplications } from '../../fixtures/greenhouse/api_v1_applications';
|
||||
import * as applicationsApiResponse from '../../fixtures/greenhouse/api_v1_applications.json';
|
||||
|
||||
describe('Greenhouse parser', () => {
|
||||
it('parses API applications responses', () => {
|
||||
const actual: GreenhouseApplication[] = (applicationsApiResponse as GreenhouseApplicationResponse[]).map(resp =>
|
||||
parseApplications(resp),
|
||||
);
|
||||
expect(actual).deep.equal(ParsedApplications);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user