Skip to content

Commit

Permalink
Fix typo in TS defs (closes #1541) (#1542)
Browse files Browse the repository at this point in the history
* Fix typo in TS defs (closes #1541)

* Update comment about a BrowserStack issue
  • Loading branch information
AndreyBelym authored and AlexanderMoskovkin committed Jun 19, 2017
1 parent b9d3fea commit 4affbb2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
20 changes: 18 additions & 2 deletions test/functional/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,24 @@ function openRemoteBrowsers () {
};

var openBrowserPromises = browsersInfo.map(function (browserInfo) {
return connector.startBrowser(browserInfo.settings, browserInfo.connection.url, buildInfo,
isBrowserStack ? { openingTimeout: BROWSER_OPENING_TIMEOUT } : null);
if (!isBrowserStack || browserInfo.settings.alias !== 'chrome-osx') {
return connector.startBrowser(browserInfo.settings, browserInfo.connection.url, buildInfo,
isBrowserStack ? { openingTimeout: BROWSER_OPENING_TIMEOUT } : null);
}

// HACK: BrowserStack issue: an extension opens a new tab in Chrome during testing. The tab
// where the tests are run becames unfocused and the tests hang there. To aviod this we wait
// for 5 minutes to be sure that a new tab is opened by the extension and run tests after that.
// TODO: Remove the hack once the issue is fixed on BrowserStack.
return connector
.startBrowser(browserInfo.settings, 'about:blank', buildInfo, { openingTimeout: BROWSER_OPENING_TIMEOUT })
.then(browser => (new Promise(r => setTimeout(r, 5 * 60 * 1000))).then(() => browser))
.then(browser => {
return new Promise(resolve => {
connector.client.changeUrl(browser.id, { url: browserInfo.connection.url }, resolve);
})
.then(() => browser);
});
});

return Promise.all(openBrowserPromises);
Expand Down
2 changes: 1 addition & 1 deletion test/server/data/test-suites/typescript-defs/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const someUser = Role('http://localhost:3000/fixtures/api/es-next/roles/pages/lo
await t
.typeText('input[name="name"]', 'SomeUser')
.click('input[value="LogIn"]');
});
}, { preserveUrl: false });

fixture `AnonymousRole`
.page `http://localhost:3000/fixtures/api/es-next/roles/pages/index.html`;
Expand Down
2 changes: 1 addition & 1 deletion ts-defs/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ interface RoleOptions {
*
* This option is useful if you store session-related data (like session ID) in the URL.
*/
preseveUrl?: boolean;
preserveUrl?: boolean;
}


Expand Down

0 comments on commit 4affbb2

Please sign in to comment.