File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11language : node_js
22node_js :
33 - stable
4- - ' 0.10 '
4+ - ' 4 '
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ npm install testcafe-browser-provider-browserstack
1212## Usage
1313Before using this plugin, save the BrowserStack username and access key to environment variables ` BROWSERSTACK_USERNAME ` and ` BROWSERSTACK_ACCESS_KEY ` .
1414
15+ Project name and build name will be displayed in BrowserStack if you set the environment variables ` BROWSERSTACK_PROJECT_NAME ` and ` BROWSERSTACK_BUILD_ID ` .
16+
1517You can determine the available browser aliases by running
1618```
1719testcafe -b browserstack
Original file line number Diff line number Diff line change 33 "version" : " 1.1.1" ,
44 "description" : " browserstack TestCafe browser provider plugin." ,
55 "repository" : " https://github.com/DevExpress/testcafe-browser-provider-browserstack" ,
6+ "engines" : {
7+ "node" : " >=4.0.0"
8+ },
69 "homepage" : " https://github.com/DevExpress/testcafe-browser-provider-browserstack" ,
710 "author" : {
811 "name" : " Andrey Belym" ,
Original file line number Diff line number Diff line change 1- import { stringify as makeQueryString } from 'querystring' ;
21import Promise from 'pinkie' ;
32import request from 'request-promise' ;
43import parseCapabilities from 'desired-capabilities' ;
@@ -7,6 +6,9 @@ import jimp from 'jimp';
76import OS from 'os-family' ;
87import nodeUrl from 'url' ;
98
9+ const BUILD_ID = process . env [ 'BROWSERSTACK_BUILD_ID' ] ;
10+ const PROJECT_NAME = process . env [ 'BROWSERSTACK_PROJECT_NAME' ] ;
11+
1012const TESTS_TIMEOUT = process . env [ 'BROWSERSTACK_TEST_TIMEOUT' ] || 1800 ;
1113const BROWSERSTACK_CONNECTOR_DELAY = 10000 ;
1214
@@ -122,15 +124,18 @@ function doRequest (apiPath, params) {
122124
123125 var url = apiPath . url ;
124126
125- if ( params )
126- url += '?' + makeQueryString ( params ) ;
127-
128127 var opts = {
129128 auth : {
130129 user : process . env [ 'BROWSERSTACK_USERNAME' ] ,
131130 pass : process . env [ 'BROWSERSTACK_ACCESS_KEY' ] ,
132131 } ,
133132
133+ qs : Object . assign ( { } ,
134+ BUILD_ID && { build : BUILD_ID } ,
135+ PROJECT_NAME && { project : PROJECT_NAME } ,
136+ params
137+ ) ,
138+
134139 method : apiPath . method || 'GET' ,
135140 json : ! apiPath . binaryStream
136141 } ;
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ describe('Browser names', function () {
2929 'ie@11.0:Windows 8.1' ,
3030 'edge@14.0:Windows 10' ,
3131 'iPhone 6@8.3' ,
32- 'iPhone SE@10.0 ' ,
33- 'iPad Pro (9.7 inch)@10.0 ' ,
32+ 'iPhone SE@10.3 ' ,
33+ 'iPad Pro (9.7 inch)@10.3 ' ,
3434 'Google Nexus 5@5.0'
3535 ] ) ;
3636 } ) ;
You can’t perform that action at this time.
0 commit comments