-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #928 from EyeSeeTea/development
Release 2.16.0
- Loading branch information
Showing
13 changed files
with
188 additions
and
49 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
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
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
66 changes: 66 additions & 0 deletions
66
src/data/transformations/__tests__/integration/transformations-api-36.spec.ts
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { sync } from "./helpers"; | ||
|
||
describe("API 36", () => { | ||
beforeAll(() => { | ||
jest.setTimeout(30000); | ||
}); | ||
|
||
describe("Transformation 2.34 -> 2.36", () => { | ||
it("Remove duplicate transformations", async () => { | ||
const metadata = { | ||
dataElements: [ | ||
{ | ||
code: "BU_EPI_Gender", | ||
lastUpdated: "2020-10-30T16:12:08.461", | ||
id: "zqv3IsyTYta", | ||
created: "2018-05-09T22:26:29.218", | ||
name: "BU_EPI_Gender", | ||
shortName: "# BU cases (by gender)", | ||
aggregationType: "SUM", | ||
domainType: "AGGREGATE", | ||
displayName: "BU_EPI_Gender", | ||
translations: [ | ||
{ | ||
property: "SHORT_NAME", | ||
locale: "fr", | ||
value: "# cas d'UB par sexe", | ||
}, | ||
{ | ||
property: "NAME", | ||
locale: "fr", | ||
value: "Nombre de cas d'ulc�re de Buruli (par genre)", | ||
}, | ||
{ | ||
property: "SHORT_NAME", | ||
locale: "fr", | ||
value: "Cas d'ulc�re de Buruli (par genre)", | ||
}, | ||
{ | ||
property: "FORM_NAME", | ||
locale: "fr", | ||
value: "Nombre de nouveaux cas d'UB par sexe", | ||
}, | ||
], | ||
}, | ||
], | ||
}; | ||
|
||
const { dataElements } = await sync({ | ||
from: "2.34", | ||
to: "2.36", | ||
metadata, | ||
models: ["dataElements"], | ||
}); | ||
|
||
const translations = dataElements["zqv3IsyTYta"].translations as any[]; | ||
|
||
const translationsOldDuplicate = translations.filter( | ||
trans => trans.property === "SHORT_NAME" && trans.locale === "fr" | ||
); | ||
|
||
expect(translationsOldDuplicate.length).toBe(1); | ||
}); | ||
}); | ||
}); | ||
|
||
export {}; |
File renamed without changes.
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
File renamed without changes.
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.