Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync met 'BRP-API/brp-shared-dotnet' repo #7

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion features/step_definitions/als-stepdefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ const apiEndpointPrefixMap = new Map([
['personen', 'brp'],
['reisdocumenten', 'reisdocumenten'],
['verblijfplaatshistorie', 'brphistorie'],
['bestaat-niet', 'brp']
// niet bestaande endpoints
['ingezetenen', 'brp'],
['paspoorten', 'reisdocumenten'],
['verblijfhistorie', 'brphistorie']
]);

When(/^([a-zA-Z-]*) wordt gezocht met de volgende parameters$/, async function (endpoint, dataTable) {
Expand Down
11 changes: 7 additions & 4 deletions features/step_definitions/requestHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,21 @@ function createRequestBody(dataTable) {
return !param.naam.startsWith("header:");
})
.forEach(function(param) {
if (isArrayParameter(type, param)) {
if (param.naam === '' && param.waarde === '') {
// do nothing
}
else if (isArrayParameter(type, param)) {
requestBody[param.naam] = param.waarde === ''
? []
: param.waarde.split(',');
}
else if(param.naam === 'burgerservicenummer (als string)') {
else if (param.naam === 'burgerservicenummer (als string)') {
requestBody['burgerservicenummer'] = param.waarde;
}
else if(param.naam === 'fields (als string)') {
else if (param.naam === 'fields (als string)') {
requestBody['fields'] = param.waarde;
}
else if(param.waarde === '(131 maal aNummer)') {
else if (param.waarde === '(131 maal aNummer)') {
requestBody[param.naam] = [];
for(let count=0; count<=131; count++) {
requestBody[param.naam].push('aNummer');
Expand Down