Skip to content

Commit

Permalink
Merge branch 'master' into feature/docker
Browse files Browse the repository at this point in the history
  • Loading branch information
nickevansuk authored Aug 11, 2023
2 parents 3894b52 + 0df6e81 commit 939063f
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/reference-implementation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
mode: ['random', 'controlled']
profile: ['all-features', 'single-seller', 'no-payment-reconciliation', 'no-auth', 'no-tax-calculation', 'prepayment-always-required']
profile: ['all-features', 'single-seller', 'no-payment-reconciliation', 'no-auth', 'no-tax-calculation', 'prepayment-always-required', 'facilityuse-has-slots']
flow: ['simple', 'approval']
include:
- mode: 'random'
Expand Down
8 changes: 8 additions & 0 deletions config/.example.facilityuse-has-slots.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"integrationTests": {
"bookableOpportunityTypesInScope": {
"IndividualFacilityUseSlot": false,
"FacilityUseSlot": true
}
}
}
4 changes: 2 additions & 2 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"additionalReporters": [],
"bookableOpportunityTypesInScope": {
"ScheduledSession": true,
"FacilityUseSlot": true,
"IndividualFacilityUseSlot": false,
"IndividualFacilityUseSlot": true,
"FacilityUseSlot": false,
"CourseInstance": false,
"CourseInstanceSubEvent": false,
"HeadlineEvent": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const BUTTON_SELECTORS = config.has('broker.loginPagesSelectors') ? config.get('
};
const CONSOLE_OUTPUT_LEVEL = config.has('consoleOutputLevel') ? config.get('consoleOutputLevel') : 'detailed';

const HEADLESS_AUTH = true;
const HEADLESS_AUTH = config.has('broker.headlessAuth') ? config.get('broker.headlessAuth') : true;

/** Directory for Validator remote JSON cache (https://github.com/openactive/data-model-validator#remotejsoncachepath) */
const VALIDATOR_TMP_DIR = './tmp';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,16 @@ class CertificationWriter {

get awardedTo() {
if (this.datasetJson) {
return this.datasetJson.bookingService || this.datasetJson.publisher && {
return this.datasetJson.bookingService?.name ? {
'@type': 'Organization',
name: this.datasetJson.bookingService.name,
url: this.datasetJson.bookingService.url,
softwareVersion: this.datasetJson.bookingService.softwareVersion,
} : (this.datasetJson.publisher && {
'@type': 'Organization',
name: this.datasetJson.publisher.name,
url: this.datasetJson.publisher.url,
};
});
}
return {};
}
Expand Down
2 changes: 1 addition & 1 deletion packages/openactive-integration-tests/test/reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class Reporter {
}
if (!validationResult?.valid) {
console.error(`\n${chalk.red(
'A valid conformance certificate could not be generated.\n\nIf you have not already done so, try simply running `npm start`, without specifying a specific test subset, to ensure that all tests are run for this feature configuration.',
'A valid conformance certificate could not be generated.\n\nIf you have not already done so, try simply running `npm start` without any parameters, to ensure that all tests are run for this feature configuration.',
)}`);
// Ensure that CI fails on validation error, without a stack trace
process.exitCode = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ const AUTHORIZE_SUCCESS_CLASS = 'openactive-test-callback-success';
* @param {Context} context
*/
async function addScreenshot(page, title, context) {
const image = await page.screenshot({
const imageBuffer = await page.screenshot({
encoding: 'base64',
}).toString();
});
const image = imageBuffer.toString();
const url = page.url();
context.screenshots.push({
title,
Expand Down

0 comments on commit 939063f

Please sign in to comment.