gemini-teamcity
Advanced tools
Comparing version 1.0.0 to 1.0.1
var _console = require('console'); | ||
function getTestName(eventData) { | ||
var fullName = eventData.suite.fullName.trim(); | ||
var stateName = eventData.suite.name.trim(); | ||
return (fullName.replace(new RegExp(' ' + stateName + '$'), '.' + stateName) + '.' + | ||
return (eventData.suite.fullName.trim() + '.' + | ||
eventData.state.name.trim() + '.' + | ||
eventData.browserId.replace(/ /g, '')) | ||
@@ -9,0 +7,0 @@ .replace(/ /g, '_'); |
{ | ||
"name": "gemini-teamcity", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Plugin for Gemini which enables reporting test results to TeamCity.", | ||
@@ -5,0 +5,0 @@ "main": "lib/plugin.js", |
@@ -58,5 +58,7 @@ var sinon = require('sinon'); | ||
browserId: 'chrome', | ||
state: { | ||
name: 'state' | ||
}, | ||
suite: { | ||
name: 'state', | ||
fullName: 'suite state' | ||
fullName: 'suite' | ||
} | ||
@@ -72,3 +74,3 @@ }; | ||
// // Deprecated fileds. TODO: remove before next release | ||
// suiteName: suite.name, | ||
// suiteName: state.name, | ||
// suitePath: suite.path, | ||
@@ -101,3 +103,3 @@ // suiteId: suite.id | ||
it('should trim the suite name from spaces', function () { | ||
eventData.suite.fullName = ' suite state '; | ||
eventData.suite.fullName = ' suite '; | ||
@@ -110,3 +112,3 @@ runner.beginState(eventData); | ||
it('should trim the state name from spaces', function () { | ||
eventData.suite.name = ' state '; | ||
eventData.state.name = ' state '; | ||
@@ -128,4 +130,4 @@ runner.beginState(eventData); | ||
eventData.browserId = 'chrome 41'; | ||
eventData.suite.fullName = ' root suite state number two '; | ||
eventData.suite.name = ' state number two'; | ||
eventData.suite.fullName = ' root suite '; | ||
eventData.state.name = ' state number two'; | ||
@@ -136,12 +138,2 @@ runner.beginState(eventData); | ||
}); | ||
it('should separate state name with a dot', function() { | ||
eventData.suite.fullName = 'foo bar bar'; | ||
eventData.suite.name = 'bar'; | ||
runner.beginState(eventData); | ||
expect(_console.log.args[0][0]).to.contain('\'foo_bar.bar.chrome\''); | ||
}); | ||
}); | ||
@@ -165,3 +157,3 @@ | ||
it('should trim the suite name from spaces', function () { | ||
eventData.suite.fullName = ' suite state '; | ||
eventData.suite.fullName = ' suite '; | ||
@@ -174,3 +166,3 @@ runner.skipState(eventData); | ||
it('should trim the state name from spaces', function () { | ||
eventData.suite.name = ' state '; | ||
eventData.state.name = ' state '; | ||
@@ -192,4 +184,4 @@ runner.skipState(eventData); | ||
eventData.browserId = 'chrome 41'; | ||
eventData.suite.fullName = ' root suite state number two '; | ||
eventData.suite.name = ' state number two'; | ||
eventData.suite.fullName = ' root suite '; | ||
eventData.state.name = ' state number two'; | ||
@@ -200,11 +192,2 @@ runner.skipState(eventData); | ||
}); | ||
it('should separate state name with a dot', function() { | ||
eventData.suite.fullName = 'foo bar bar'; | ||
eventData.suite.name = 'bar'; | ||
runner.skipState(eventData); | ||
expect(_console.log.args[0][0]).to.contain('\'foo_bar.bar.chrome\''); | ||
}); | ||
}); | ||
@@ -247,11 +230,2 @@ | ||
}); | ||
it('should separate state name with a dot', function() { | ||
eventData.suite.fullName = 'foo bar bar'; | ||
eventData.suite.name = 'bar'; | ||
runner.error(eventData); | ||
expect(_console.log.args[0][0]).to.contain('\'foo_bar.bar.chrome\''); | ||
}); | ||
}); | ||
@@ -285,3 +259,3 @@ | ||
it('should trim the suite name from spaces', function () { | ||
eventData.suite.fullName = ' suite state '; | ||
eventData.suite.fullName = ' suite '; | ||
@@ -294,3 +268,3 @@ runner.endTest(eventData); | ||
it('should trim the state name from spaces', function () { | ||
eventData.suite.name = ' state '; | ||
eventData.state.name = ' state '; | ||
@@ -312,4 +286,4 @@ runner.endTest(eventData); | ||
eventData.browserId = 'chrome 41'; | ||
eventData.suite.fullName = ' root suite state number two '; | ||
eventData.suite.name = ' state number two'; | ||
eventData.suite.fullName = ' root suite '; | ||
eventData.state.name = ' state number two'; | ||
@@ -320,14 +294,4 @@ runner.endTest(eventData); | ||
}); | ||
it('should separate state name with a dot', function() { | ||
eventData.suite.fullName = 'foo bar bar'; | ||
eventData.suite.name = 'bar'; | ||
runner.endTest(eventData); | ||
expect(_console.log.args[0][0]).to.contain('\'foo_bar.bar.chrome\''); | ||
}); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
101677
246