-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SIMSBIOHUB-275: Remove Project Coordinator from SIMS (#1104)
* Removes any Project Coordinator UI for creating, editing or viewing projects * Removes any reference to Project Coordinator in the frontend and backend codebase * Adds a migration that makes project coordinator fields optional, retaining any existing project coordinator data.
- Loading branch information
1 parent
dfa7a99
commit 3dafd6c
Showing
57 changed files
with
317 additions
and
1,373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
import { expect } from 'chai'; | ||
import { describe } from 'mocha'; | ||
import { | ||
PostCoordinatorData, | ||
PostIUCNData, | ||
PostLocationData, | ||
PostObjectivesData, | ||
|
@@ -17,10 +16,6 @@ describe('PostProjectObject', () => { | |
projectPostObject = new PostProjectObject(null); | ||
}); | ||
|
||
it('sets coordinator', function () { | ||
expect(projectPostObject.coordinator).to.equal(null); | ||
}); | ||
|
||
it('sets project', function () { | ||
expect(projectPostObject.project).to.equal(null); | ||
}); | ||
|
@@ -37,71 +32,6 @@ describe('PostProjectObject', () => { | |
expect(projectPostObject.iucn).to.equal(null); | ||
}); | ||
}); | ||
|
||
describe('All values provided', () => { | ||
let projectPostObject: PostProjectObject; | ||
|
||
const obj = { | ||
coordinator: { | ||
first_name: 'first', | ||
last_name: 'last', | ||
email_address: '[email protected]', | ||
coordinator_agency: 'agency', | ||
share_contact_details: 'true' | ||
}, | ||
project: { | ||
project_name: 'name_test_data', | ||
project_programs: [1], | ||
start_date: 'start_date_test_data', | ||
end_date: 'end_date_test_data', | ||
comments: 'comments_test_data' | ||
}, | ||
objectives: { | ||
objectives: 'these are the project objectives' | ||
}, | ||
location: { | ||
location_description: 'a location description', | ||
geometry: [ | ||
{ | ||
type: 'Polygon', | ||
coordinates: [ | ||
[ | ||
[-128, 55], | ||
[-128, 55.5], | ||
[-128, 56], | ||
[-126, 58], | ||
[-128, 55] | ||
] | ||
], | ||
properties: { | ||
name: 'Biohub Islands' | ||
} | ||
} | ||
] | ||
}, | ||
iucn: { | ||
classificationDetails: [ | ||
{ | ||
classification: 1, | ||
subClassification1: 2, | ||
subClassification2: 3 | ||
} | ||
] | ||
}, | ||
partnerships: { | ||
indigenous_partnerships: [1, 2], | ||
stakeholder_partnerships: ['partner1, partner2'] | ||
} | ||
}; | ||
|
||
before(() => { | ||
projectPostObject = new PostProjectObject(obj); | ||
}); | ||
|
||
it('sets coordinator', function () { | ||
expect(projectPostObject.coordinator.first_name).to.equal(obj.coordinator.first_name); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('PostProjectData', () => { | ||
|
@@ -200,72 +130,6 @@ describe('PostObjectivesData', () => { | |
}); | ||
}); | ||
|
||
describe('PostCoordinatorData', () => { | ||
describe('No values provided', () => { | ||
let projectCoordinatorData: PostCoordinatorData; | ||
|
||
before(() => { | ||
projectCoordinatorData = new PostCoordinatorData(null); | ||
}); | ||
|
||
it('sets first_name', function () { | ||
expect(projectCoordinatorData.first_name).to.eql(null); | ||
}); | ||
|
||
it('sets last_name', function () { | ||
expect(projectCoordinatorData.last_name).to.eql(null); | ||
}); | ||
|
||
it('sets email_address', function () { | ||
expect(projectCoordinatorData.email_address).to.eql(null); | ||
}); | ||
|
||
it('sets coordinator_agency', function () { | ||
expect(projectCoordinatorData.coordinator_agency).to.eql(null); | ||
}); | ||
|
||
it('sets share_contact_details', function () { | ||
expect(projectCoordinatorData.share_contact_details).to.eql(false); | ||
}); | ||
}); | ||
|
||
describe('All values provided', () => { | ||
let projectCoordinatorData: PostCoordinatorData; | ||
|
||
const obj = { | ||
first_name: 'first', | ||
last_name: 'last', | ||
email_address: '[email protected]', | ||
coordinator_agency: 'agency', | ||
share_contact_details: 'true' | ||
}; | ||
|
||
before(() => { | ||
projectCoordinatorData = new PostCoordinatorData(obj); | ||
}); | ||
|
||
it('sets first_name', function () { | ||
expect(projectCoordinatorData.first_name).to.eql(obj.first_name); | ||
}); | ||
|
||
it('sets last_name', function () { | ||
expect(projectCoordinatorData.last_name).to.eql(obj.last_name); | ||
}); | ||
|
||
it('sets email_address', function () { | ||
expect(projectCoordinatorData.email_address).to.eql(obj.email_address); | ||
}); | ||
|
||
it('sets coordinator_agency', function () { | ||
expect(projectCoordinatorData.coordinator_agency).to.eql(obj.coordinator_agency); | ||
}); | ||
|
||
it('sets share_contact_details', function () { | ||
expect(projectCoordinatorData.share_contact_details).to.eql(true); | ||
}); | ||
}); | ||
}); | ||
|
||
describe('PostIUCNData', () => { | ||
describe('No values provided', () => { | ||
let projectIUCNData: PostIUCNData; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.