-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix getting sessionId; Bump version (v1.7.1) (#68)
- Loading branch information
1 parent
f224788
commit 58f55a9
Showing
7 changed files
with
70 additions
and
25 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,40 @@ | ||
import * as ERROR_MESSAGES from '../templates/error-messages'; | ||
|
||
|
||
export default class BaseBackend { | ||
constructor (reportWarning) { | ||
this.reportWarning = reportWarning; | ||
} | ||
|
||
async getBrowsersList () { | ||
throw new Error('Not implemented'); | ||
throw new Error(ERROR_MESSAGES.API_METHOD_NOT_IMPLEMENTED()); | ||
} | ||
|
||
async openBrowser (/*id, pageUrl, capabilities*/) { | ||
throw new Error('Not implemented'); | ||
throw new Error(ERROR_MESSAGES.API_METHOD_NOT_IMPLEMENTED()); | ||
} | ||
|
||
async closeBrowser (/*id*/) { | ||
throw new Error('Not implemented'); | ||
throw new Error(ERROR_MESSAGES.API_METHOD_NOT_IMPLEMENTED()); | ||
} | ||
|
||
async takeScreenshot (/*id, path*/) { | ||
throw new Error('Not implemented'); | ||
throw new Error(ERROR_MESSAGES.API_METHOD_NOT_IMPLEMENTED()); | ||
} | ||
|
||
async resizeWindow (/*id, width, height, currentWidth, currentHeight*/) { | ||
throw new Error('Not implemented'); | ||
throw new Error(ERROR_MESSAGES.API_METHOD_NOT_IMPLEMENTED()); | ||
} | ||
|
||
async maximizeWindow (/*id*/) { | ||
throw new Error('Not implemented'); | ||
throw new Error(ERROR_MESSAGES.API_METHOD_NOT_IMPLEMENTED()); | ||
} | ||
|
||
async reportJobResult (/*id, jobStatus, jobData, possibleStatuses*/) { | ||
throw new Error('Not implemented'); | ||
throw new Error(ERROR_MESSAGES.API_METHOD_NOT_IMPLEMENTED()); | ||
} | ||
|
||
getSessionUrl (/*id*/) { | ||
throw new Error('Not implemented'); | ||
throw new Error(ERROR_MESSAGES.API_METHOD_NOT_IMPLEMENTED()); | ||
} | ||
} |
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,17 @@ | ||
import dedent from 'dedent'; | ||
|
||
|
||
export const BROWSERSTACK_AUTHENTICATION_FAILED = () => 'Authentication failed. Please assign the correct username and access key to the BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY environment variables.'; | ||
export const API_METHOD_NOT_IMPLEMENTED = () => 'The API method is not implemented'; | ||
|
||
export const REMOTE_API_REQUEST_FAILED = ({ status, apiResponse }) => dedent ` | ||
API error ${status}: | ||
${apiResponse} | ||
`; | ||
|
||
export const SESSION_ID_NOT_FOUND = ({ sessionInfoDump }) => dedent ` | ||
Unable to find a session ID in the following session information: | ||
${sessionInfoDump} | ||
`; |
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