Skip to content

Commit

Permalink
release v1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
gcooney committed Nov 14, 2019
1 parent 9b62215 commit cdf6bcc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions lib/index.js
Expand Up @@ -117,18 +117,18 @@ function run() {
core.setOutput('plans_run', '' + finalExecutionResult.plan_execution_metrics.total);
core.setOutput('plans_passed', '' + finalExecutionResult.plan_execution_metrics.passed);
core.setOutput('plans_failed', '' + finalExecutionResult.plan_execution_metrics.failed);
core.setOutput('journeys_run', '' + finalExecutionResult.journey_execution_metrics.total);
core.setOutput('journeys_passed', '' + finalExecutionResult.journey_execution_metrics.passed);
core.setOutput('journeys_failed', '' + finalExecutionResult.journey_execution_metrics.failed);
core.setOutput('tests_run', '' + finalExecutionResult.journey_execution_metrics.total);
core.setOutput('tests_passed', '' + finalExecutionResult.journey_execution_metrics.passed);
core.setOutput('tests_failed', '' + finalExecutionResult.journey_execution_metrics.failed);
if (finalExecutionResult.journey_execution_metrics.failed === 0) {
core.debug('Deployment plans passed');
}
else if (continueOnPlanFailure) {
core.warning(`There were ${finalExecutionResult.journey_execution_metrics.failed} journey failures but the continueOnPlanFailure flag is set so the task has been marked as passing`);
core.warning(`There were ${finalExecutionResult.journey_execution_metrics.failed} test failures but the continueOnPlanFailure flag is set so the task has been marked as passing`);
// core.setNeutral(); Todo Set neutral when support is added to actions v2
}
else {
core.setFailed(`${finalExecutionResult.journey_execution_metrics.failed} mabl Journey(s) failed`);
core.setFailed(`${finalExecutionResult.journey_execution_metrics.failed} mabl test(s) failed`);
}
}
catch (err) {
Expand Down
12 changes: 6 additions & 6 deletions lib/table.js
Expand Up @@ -32,8 +32,8 @@ function prettyPrintExecution(execution) {
'mabl App Link:',
execution.plan.app_href,
]);
let journeyTable = new cli_table3_1.default({
head: ['Browser', 'Status', 'Journey Name', 'Duration', 'mabl App Link'],
let testTable = new cli_table3_1.default({
head: ['Browser', 'Status', 'Test Name', 'Duration', 'mabl App Link'],
style: {
head: [],
border: [],
Expand All @@ -42,17 +42,17 @@ function prettyPrintExecution(execution) {
wordWrap: true,
});
execution.journey_executions.forEach(jE => {
let journey = execution.journeys.find(journey => journey.id === jE.journey_id);
journeyTable.push([
let test = execution.journeys.find(test => test.id === jE.journey_id);
testTable.push([
jE.browser_type,
jE.success ? 'Passed' : 'Failed',
journey ? journey.name : jE.journey_id,
test ? test.name : jE.journey_id,
moment.utc(jE.stop_time - jE.start_time).format('HH:mm:ss'),
jE.app_href,
]);
});
outputTable(planTable);
outputTable(journeyTable);
outputTable(testTable);
}
exports.prettyPrintExecution = prettyPrintExecution;
function outputTable(table) {
Expand Down

0 comments on commit cdf6bcc

Please sign in to comment.