Skip to content

Commit

Permalink
Update wdpa names in protected areas list endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
yulia-bel committed Sep 25, 2023
1 parent 97be5d0 commit b7ca3f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class SelectionGetService {

return [
...categories.map((category) => ({
name: category,
name: 'IUCN ' + category,
id: category,
kind: ProtectedAreaKind.Global,
selected:
Expand Down Expand Up @@ -69,7 +69,7 @@ export class SelectionGetService {

return [
...categories.map((category) => ({
name: category,
name: 'IUCN '+ category,
id: category,
isCustom: false,
})),
Expand Down
10 changes: 5 additions & 5 deletions api/apps/api/test/scenario-protected-areas/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const getFixtures = async () => {
{
id: 'III',
kind: 'global',
name: 'III',
name: 'IUCN III',
selected: false,
},
]);
Expand All @@ -156,7 +156,7 @@ export const getFixtures = async () => {
response.data.sort();
expect(response.data).toHaveLength(1);
expect(response.data[0].attributes.isCustom).toBe(false);
expect(response.data[0].attributes.name).toBe('III');
expect(response.data[0].attributes.name).toBe('IUCN III');
expect(response.data[0].attributes.scenarioUsageCount).toBe(1);
},

Expand All @@ -166,7 +166,7 @@ export const getFixtures = async () => {
expect(response.data[0].attributes.isCustom).toBe(true);
expect(response.data[0].attributes.name).toBe('custom protected area');
expect(response.data[1].attributes.isCustom).toBe(false);
expect(response.data[1].attributes.name).toBe('III');
expect(response.data[1].attributes.name).toBe('IUCN III');
},

GivenCustomProtectedAreaWasAddedToProject: async () => {
Expand Down Expand Up @@ -302,7 +302,7 @@ export const getFixtures = async () => {
expect(response.find((e) => e.id === category)).toEqual({
id: category,
kind: `global`,
name: category,
name: 'IUCN ' + category,
selected: true,
});
},
Expand All @@ -313,7 +313,7 @@ export const getFixtures = async () => {
expect(response.find((e) => e.id === category)).toEqual({
id: category,
kind: `global`,
name: category,
name: 'IUCN ' + category,
selected: false,
});
},
Expand Down

0 comments on commit b7ca3f7

Please sign in to comment.