From 96d551f3b0c1bba2013fc67b37c53e298c2d885f Mon Sep 17 00:00:00 2001 From: MelvLee Date: Tue, 23 Sep 2025 00:16:07 +0000 Subject: [PATCH] chore: sync met 'BRP-API/brp-shared' repo Signed-off-by: MelvLee --- cucumber.js | 7 +++---- features/step_definitions/als-stepdefs.js | 14 +------------- features/step_definitions/dan-stepdefs-response.js | 1 - 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/cucumber.js b/cucumber.js index 0a85122..998f10c 100644 --- a/cucumber.js +++ b/cucumber.js @@ -91,14 +91,13 @@ module.exports = { apiUrl: 'http://localhost:8080/haalcentraal/api', api: 'autorisatie-en-protocollering', logger: { - level: 'warn' + level: 'info' }, oAuth: { enable: true }, - addAcceptGezagVersionHeader: false, - logFileToAssert: './test-data/logs/brp-autorisatie-protocollering.json' + addAcceptGezagVersionHeader: true }, - tags: 'not @skip-verify and not @stap-documentatie and not @deprecated and not @gezag-api and not @data-api' + tags: 'not @skip-verify and not @deprecated and not @gezag-api and not @data-api' } } diff --git a/features/step_definitions/als-stepdefs.js b/features/step_definitions/als-stepdefs.js index 2efec4f..58e920f 100644 --- a/features/step_definitions/als-stepdefs.js +++ b/features/step_definitions/als-stepdefs.js @@ -248,32 +248,20 @@ function createDataTableForRequest(parameterNames, fields) { return undefined; } } - -function sleep(ms) { - return new Promise((resolve) => setTimeout(resolve, ms)); -} - + async function handleRequestWithParameters(context, endpoint, parametersDataTable) { initializeAfnemerIdAndGemeenteCode(context); - let mustSleep = false; if(context.gezag !== undefined) { fs.writeFileSync(context.gezagDataPath, JSON.stringify(context.gezag, null, '\t')); - mustSleep = true; } if(context.downstreamApiResponseHeaders !== undefined) { fs.writeFileSync(context.downstreamApiDataPath + '/response-headers.json', JSON.stringify(context.downstreamApiResponseHeaders[0], null, '\t')); - mustSleep = true; } if(context.downstreamApiResponseBody !== undefined) { fs.writeFileSync(context.downstreamApiDataPath + '/response-body.json', context.downstreamApiResponseBody); - mustSleep = true; - } - if(mustSleep) { - // wait 15 ms to ensure the files are written before the request is made - await sleep(15); } addDefaultAutorisatieSettings(context, context.afnemerID); diff --git a/features/step_definitions/dan-stepdefs-response.js b/features/step_definitions/dan-stepdefs-response.js index 749785f..aeb6c42 100644 --- a/features/step_definitions/dan-stepdefs-response.js +++ b/features/step_definitions/dan-stepdefs-response.js @@ -15,7 +15,6 @@ Then('bevat de request naar de gezag API de header {string} met waarde {string}' const header = headers[headerNaam]; should.exist(header); - header.should.equal(headerWaarde); }); Then('bevat de request naar de gezag API geen {string} header', function (headerNaam) {