From c35a018800b87c594e280de66431387ab20453f5 Mon Sep 17 00:00:00 2001 From: Emmett Butler Date: Fri, 12 Aug 2016 14:46:56 -0700 Subject: [PATCH] support a testNamesByUrl configuration property that allows per-url test naming --- src/Job.js | 2 +- src/TestRunner.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Job.js b/src/Job.js index 2f395ec..16d1bdb 100644 --- a/src/Job.js +++ b/src/Job.js @@ -48,7 +48,7 @@ module.exports = function (grunt) { this.build = runner.build; this.public = browser.public || runner.public || "team"; this.tags = browser.tags || runner.tags; - this.testName = browser.name || runner.testName; + this.testName = runner.testNamesByUrl[this.url] || browser.name || runner.testName; this.sauceConfig = runner.sauceConfig; this.tunneled = runner.tunneled; this.tunnelId = runner.tunnelId; diff --git a/src/TestRunner.js b/src/TestRunner.js index 8d81d2f..926df37 100644 --- a/src/TestRunner.js +++ b/src/TestRunner.js @@ -38,6 +38,7 @@ module.exports = function (grunt) { this.urls = properties.url || properties.urls; this.maxRetries = properties.maxRetries; this.onProgress = onProgress; + this.testNamesByUrl = properties.testNamesByUrl || {}; if (properties['max-duration']) { // max-duration is actually a sauce selenium capability