diff --git a/commands/serve/lib/engine.js b/commands/serve/lib/engine.js index 1fbfadac5..4805f5f83 100644 --- a/commands/serve/lib/engine.js +++ b/commands/serve/lib/engine.js @@ -31,7 +31,7 @@ const useEngine = ({ ACCEPT_EULA = false, cwd = path.resolve(__dirname, '../'), if (ACCEPT_EULA !== true) { throw new Error('Need to accept EULA in order to start engine container'); } - console.error('Starting engine container...', cwd); + console.error('Starting engine container...'); const f = (files || []).reduce((acc, curr) => [...acc, '-f', curr], []); process.env.ACCEPT_EULA = 'yes'; const stopEngine = async () => { diff --git a/scripts/start-mashup.js b/scripts/start-mashup.js index 6f50a12e2..79a33d887 100644 --- a/scripts/start-mashup.js +++ b/scripts/start-mashup.js @@ -65,7 +65,7 @@ if (engine) { }); }, stop: async () => { - await e(); + e && (await e()); }, }); } @@ -75,7 +75,7 @@ function cleanup() { return; } hasCleanedUp = true; - console.log('Stopping services'); + console.log('> Stopping services'); services.forEach(async (service) => { console.log(`${service.name}`); await service.stop(); @@ -83,16 +83,16 @@ function cleanup() { } async function run() { - console.log('Starting services'); + console.log('> Starting services'); try { - services.forEach(async (service) => { + for await (const service of services) { console.log(`${service.name}`); await service.start(); - }); - console.log('All up and running'); + } + console.log('> All up and running'); } catch (err) { - console.log(err); + console.error(`\x1b[31m${JSON.stringify(err)}\x1b[0m`); cleanup(); throw err; } diff --git a/test/mashup/visualize/life.int.js b/test/mashup/visualize/life.int.js index c48d02dac..c8023b6f1 100644 --- a/test/mashup/visualize/life.int.js +++ b/test/mashup/visualize/life.int.js @@ -32,6 +32,11 @@ describe('object lifecycle', () => { await waitForTextStatus('[data-tid="error-title"]', 'The calculation condition is not fulfilled'); }); + it('should render error when a hypercube contains a qError', async () => { + await page.click('button[data-phase="hypercube-error"]'); + await waitForTextStatus('[data-tid="error-title"]', 'Error'); + }); + it('should render when requirements are fulfilled', async () => { await page.click('button[data-phase="fulfill-requirements"]'); await waitForTextStatus('.rendered', 'Success!'); diff --git a/test/mashup/visualize/phases.js b/test/mashup/visualize/phases.js index f0b3e2285..0d3874910 100644 --- a/test/mashup/visualize/phases.js +++ b/test/mashup/visualize/phases.js @@ -22,6 +22,15 @@ const calcCond = { }, }; +const cubeError = { + ...baseProps, + qHyperCubeDef: { + qMode: 'S', + qMeasures: [{}], + qInterColumnSortOrder: [-2], + }, +}; + const fulfilled = { ...baseProps, qHyperCubeDef: { @@ -112,6 +121,12 @@ export default function phases({ app }) { obj.setProperties(calcCond); }, }, + { + name: 'Hypercube error', + action: () => { + obj.setProperties(cubeError); + }, + }, { name: 'Fulfill requirements', action: () => {