@nightwatch/browserstack
Advanced tools
Comparing version 3.4.1 to 3.4.2
{ | ||
"name": "@nightwatch/browserstack", | ||
"version": "3.4.1", | ||
"version": "3.4.2", | ||
"description": "Nightwatch plugin for integration with browserstack.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -287,3 +287,3 @@ const os = require('os'); | ||
const provider = helper.getCloudProvider(testFileReport.host); | ||
testData.integrations[provider] = helper.getIntegrationsObject(testFileReport.sessionCapabilities, testFileReport.sessionId); | ||
testData.integrations[provider] = helper.getIntegrationsObject(testFileReport.sessionCapabilities, testFileReport.sessionId, testFileReport.host); | ||
const uploadData = { | ||
@@ -382,3 +382,3 @@ event_type: 'TestRunFinished' | ||
const provider = helper.getCloudProvider(testFileReport.host); | ||
testData.integrations[provider] = helper.getIntegrationsObject(testFileReport.sessionCapabilities, testFileReport.sessionId); | ||
testData.integrations[provider] = helper.getIntegrationsObject(testFileReport.sessionCapabilities, testFileReport.sessionId, testFileReport.host); | ||
} | ||
@@ -390,3 +390,3 @@ | ||
const provider = helper.getCloudProvider(testFileReport.host); | ||
testData.integrations[provider] = helper.getIntegrationsObject(testFileReport.sessionCapabilities, testFileReport.sessionId); | ||
testData.integrations[provider] = helper.getIntegrationsObject(testFileReport.sessionCapabilities, testFileReport.sessionId, testFileReport.host); | ||
} | ||
@@ -454,3 +454,3 @@ | ||
const provider = helper.getCloudProvider(currentSessionCapabilities.host); | ||
testData.integrations[provider] = helper.getIntegrationsObject(sessionCapabilities, currentSessionCapabilities.sessionId); | ||
testData.integrations[provider] = helper.getIntegrationsObject(sessionCapabilities, currentSessionCapabilities.sessionId, currentSessionCapabilities.host); | ||
} else { | ||
@@ -457,0 +457,0 @@ Logger.debug('Failed to upload integrations data'); |
@@ -603,3 +603,21 @@ const os = require('os'); | ||
exports.getIntegrationsObject = (capabilities, sessionId) => { | ||
exports.getObservabilityLinkedProductName = (caps, hostname) => { | ||
let product = undefined; | ||
if (hostname) { | ||
if (hostname.includes('browserstack.com') && !hostname.includes('hub-ft')) { | ||
if (this.isUndefined(caps.browserName)) { | ||
product = 'app-automate'; | ||
} else { | ||
product = 'automate'; | ||
} | ||
} else if (hostname.includes('browserstack-ats.com') || hostname.includes('hub-ft')) { | ||
product = 'turboscale'; | ||
} | ||
} | ||
return product; | ||
}; | ||
exports.getIntegrationsObject = (capabilities, sessionId, hostname) => { | ||
return { | ||
@@ -610,3 +628,4 @@ capabilities: capabilities, | ||
browser_version: capabilities.browserVersion, | ||
platform: capabilities.platformName | ||
platform: capabilities.platformName, | ||
product: this.getObservabilityLinkedProductName(capabilities, hostname) | ||
}; | ||
@@ -613,0 +632,0 @@ }; |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
107954
2653
1