From 63d7d489b1a88b2f4013800527eadf2e70e7524f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stano=20Pe=C5=A5ko?= Date: Mon, 31 Aug 2020 20:36:58 +0200 Subject: [PATCH] Replace 'forceNoColor' parameter with 'color' --- NewmanPostman/newmantask.ts | 6 +++--- NewmanPostman/task.json | 15 ++++++++++----- README.md | 1 - 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/NewmanPostman/newmantask.ts b/NewmanPostman/newmantask.ts index 4d912c9..c555020 100644 --- a/NewmanPostman/newmantask.ts +++ b/NewmanPostman/newmantask.ts @@ -27,8 +27,8 @@ function GetToolRunner(collectionToRun: string) { let unicodeDisabled = tl.getBoolInput('unicodeDisabled'); newman.argIf(unicodeDisabled, ['--disable-unicode']); - let forceNoColor = tl.getBoolInput('forceNoColor'); - newman.argIf(forceNoColor, ['--no-color']); + let color = tl.getInput('color'); + newman.argIf((typeof color != 'undefined') && ((color == 'on') || (color == 'off')), ['--color', color]); let reporterHtmlTemplate = tl.getPathInput('reporterHtmlTemplate', false, true); newman.argIf(typeof reporterHtmlTemplate != 'undefined' && tl.filePathSupplied('reporterHtmlTemplate'), ['--reporter-html-template', reporterHtmlTemplate]); @@ -93,7 +93,7 @@ function GetToolRunner(collectionToRun: string) { let folder = tl.getInput('folder'); if(typeof folder != 'undefined' && folder) { - const splitted = folder.split(","); + const splitted = folder.split(","); splitted.forEach(folder => { newman.arg(['--folder', folder.trim()]); }); diff --git a/NewmanPostman/task.json b/NewmanPostman/task.json index b3d2741..d33cd40 100644 --- a/NewmanPostman/task.json +++ b/NewmanPostman/task.json @@ -181,12 +181,17 @@ "groupName": "output" }, { - "name": "forceNoColor", - "type": "boolean", - "label": "No color", - "defaultValue": false, + "name": "color", + "type": "radio", + "label": "Colored Output", + "defaultValue": "auto", + "options": { + "auto": "Auto", + "on": "On", + "off": "Off" + }, "required": false, - "helpMarkDown": "Turn off usage of color in terminal output.", + "helpMarkDown": "Enable or disable colored CLI output.", "groupName": "output" }, { diff --git a/README.md b/README.md index ff51d8b..4145c02 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,6 @@ Realize that this will then NOT fail your pipeline because your tests failed. Th Following command line options are **not supported**: - `-x`,`--suppress-exit-code` -- `-color` - `--ssl-client-passphrase` - None of the [CLI option](https://github.com/postmanlabs/newman#cli-reporter-options)