diff --git a/api/tests/acceptance/application/databases/replication-data-controller_test.js b/api/tests/acceptance/application/databases/replication-data-controller_test.js index b9266f86e..14d184d59 100644 --- a/api/tests/acceptance/application/databases/replication-data-controller_test.js +++ b/api/tests/acceptance/application/databases/replication-data-controller_test.js @@ -66,6 +66,14 @@ async function mockCurrentContent() { delete expectedThematic.airtableId; + const expectedPrimaryQualityAttributes = { + requireGafamWebsiteAccess: true, + isIncompatibleIpadCertif: true, + deafAndHardOfHearing: LocalizedChallenge.DEAF_AND_HARD_OF_HEARING_VALUES.OK, + isAwarenessChallenge: true, + toRephrase: true, + }; + const expectedChallenge = { ...challenge, geography: 'Brésil', @@ -74,10 +82,11 @@ async function mockCurrentContent() { 'https://example.com/', 'https://pix.org/nl-be', ], + ...expectedPrimaryQualityAttributes, }; delete expectedChallenge.localizedChallenges; - const expectedChallengeNl = { ...challengeNl, illustrationAlt: 'alt_nl', geography: 'Neutre', area: 'Neutre' }; + const expectedChallengeNl = { ...challengeNl, ...expectedPrimaryQualityAttributes, illustrationAlt: 'alt_nl', geography: 'Neutre', area: 'Neutre' }; delete expectedChallengeNl.localizedChallenges; const expectedCompetence = domainBuilder.buildCompetence({ @@ -176,6 +185,11 @@ async function mockCurrentContent() { 'https://example.com/', 'https://pix.org/nl-be', ], + requireGafamWebsiteAccess: true, + isIncompatibleIpadCertif: true, + deafAndHardOfHearing: LocalizedChallenge.DEAF_AND_HARD_OF_HEARING_VALUES.OK, + isAwarenessChallenge: true, + toRephrase: true, }); databaseBuilder.factory.buildLocalizedChallenge({ id: 'localized-challenge-id', @@ -183,6 +197,11 @@ async function mockCurrentContent() { locale: 'nl', status: LocalizedChallenge.STATUSES.PLAY, geography: null, + requireGafamWebsiteAccess: false, + isIncompatibleIpadCertif: false, + deafAndHardOfHearing: LocalizedChallenge.DEAF_AND_HARD_OF_HEARING_VALUES.KO, + isAwarenessChallenge: false, + toRephrase: false, }); databaseBuilder.factory.buildTranslation({ key: `challenge.${challenge.id}.instruction`, @@ -317,7 +336,7 @@ describe('Acceptance | Controller | replication-data-controller', () => { }); describe('GET /api/replication-data', function() { - it.fails('should return data for replication', async function() { + it('should return data for replication', async function() { const expectedCurrentContent = await mockCurrentContent(); const server = await createServer();