forked from DevExpress/testcafe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix error messages when can't find firefox & chrome (closes DevExpres…
…s#3534) (DevExpress#3540) * Fix error messages when can't find firefox & chrome * Fix tests on Node 6
- Loading branch information
1 parent
132724e
commit 0122e74
Showing
23 changed files
with
139 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { getBrowserInfo } from 'testcafe-browser-tools'; | ||
import getMaximizedHeadlessWindowSize from '../../utils/get-maximized-headless-window-size'; | ||
|
||
export default { | ||
openedBrowsers: {}, | ||
|
||
isMultiBrowser: false, | ||
|
||
_getConfig () { | ||
throw new Error('Not implemented'); | ||
}, | ||
|
||
_getBrowserName () { | ||
return this.providerName.replace(':', ''); | ||
}, | ||
|
||
async isValidBrowserName (browserName) { | ||
const config = await this._getConfig(browserName); | ||
const browserInfo = await getBrowserInfo(config.path || this._getBrowserName()); | ||
|
||
return !!browserInfo; | ||
}, | ||
|
||
async isLocalBrowser () { | ||
return true; | ||
}, | ||
|
||
isHeadlessBrowser (browserId) { | ||
return this.openedBrowsers[browserId].config.headless; | ||
}, | ||
|
||
async maximizeWindow (browserId) { | ||
const maximumSize = getMaximizedHeadlessWindowSize(); | ||
|
||
await this.resizeWindow(browserId, maximumSize.width, maximumSize.height, maximumSize.width, maximumSize.height); | ||
} | ||
}; |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/browser/provider/built-in/chrome/cdp.js → ...provider/built-in/dedicated/chrome/cdp.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...er/built-in/chrome/create-temp-profile.js → ...n/dedicated/chrome/create-temp-profile.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../provider/built-in/chrome/local-chrome.js → ...built-in/dedicated/chrome/local-chrome.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...owser/provider/built-in/firefox/config.js → ...ider/built-in/dedicated/firefox/config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...r/built-in/firefox/create-temp-profile.js → .../dedicated/firefox/create-temp-profile.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...rovider/built-in/firefox/local-firefox.js → ...ilt-in/dedicated/firefox/local-firefox.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.