Skip to content

Commit

Permalink
chore: fix test and types in server (#23693)
Browse files Browse the repository at this point in the history
* update types

* fix test
  • Loading branch information
lmiller1990 authored Sep 8, 2022
1 parent 3841292 commit 1aa9793
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/launcher/lib/browsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export function launch (
debuggingPort: number,
args: string[] = [],
defaultBrowserEnv = {},
): LaunchedBrowser {
) {
debug('launching browser %o', { browser, url })

if (!browser.path) {
Expand Down
6 changes: 3 additions & 3 deletions packages/server/lib/browsers/firefox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,12 +531,12 @@ export async function open (browser: Browser, url: string, options: BrowserLaunc

debug('launch in firefox', { url, args: launchOptions.args })

const browserInstance = await launch(browser, 'about:blank', remotePort, launchOptions.args, {
const browserInstance = launch(browser, 'about:blank', remotePort, launchOptions.args, {
// sets headless resolution to 1280x720 by default
// user can overwrite this default with these env vars or --height, --width arguments
MOZ_HEADLESS_WIDTH: '1280',
MOZ_HEADLESS_HEIGHT: '721',
}) as unknown as BrowserInstance
})

try {
browserCriClient = await firefoxUtil.setup({ automation, extensions: launchOptions.extensions, url, foxdriverPort, marionettePort, remotePort, onError: options.onError, options })
Expand All @@ -561,7 +561,7 @@ export async function open (browser: Browser, url: string, options: BrowserLaunc

debug('closing firefox')

originalBrowserKill.apply(browserInstance, args)
return originalBrowserKill.apply(browserInstance, args)
}
} catch (err) {
errors.throwErr('FIREFOX_COULD_NOT_CONNECT', err)
Expand Down
2 changes: 1 addition & 1 deletion packages/server/test/unit/browsers/firefox_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ describe('lib/browsers/firefox', () => {

sinon.stub(plugins, 'has')
sinon.stub(plugins, 'execute')
sinon.stub(launch, 'launch').resolves(this.browserInstance)
sinon.stub(launch, 'launch').returns(this.browserInstance)
sinon.stub(utils, 'writeExtension').resolves('/path/to/ext')
sinon.spy(FirefoxProfile.prototype, 'setPreference')
sinon.spy(FirefoxProfile.prototype, 'updatePreferences')
Expand Down

5 comments on commit 1aa9793

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1aa9793 Sep 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.7.1/linux-x64/develop-1aa979341ab3791ee20b74d709c64ca5a5574888/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1aa9793 Sep 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.7.1/linux-arm64/develop-1aa979341ab3791ee20b74d709c64ca5a5574888/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1aa9793 Sep 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.7.1/darwin-x64/develop-1aa979341ab3791ee20b74d709c64ca5a5574888/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1aa9793 Sep 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.7.1/darwin-arm64/develop-1aa979341ab3791ee20b74d709c64ca5a5574888/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 1aa9793 Sep 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/10.7.1/win32-x64/develop-1aa979341ab3791ee20b74d709c64ca5a5574888/cypress.tgz

Please sign in to comment.