Skip to content

Commit

Permalink
update browser type usage
Browse files Browse the repository at this point in the history
  • Loading branch information
flotwig committed Jan 31, 2020
1 parent 84f816f commit 06e1170
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
7 changes: 5 additions & 2 deletions packages/launcher/lib/browsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,27 @@ export const browsers: Browser[] = [
{
name: 'firefox',
family: 'firefox',
channel: 'stable',
displayName: 'Firefox',
info: firefoxInfo,
versionRegex: /Firefox (\S+)/,
profile: true,
binary: 'firefox',
},
{
name: 'firefoxDeveloperEdition',
name: 'firefox',
family: 'firefox',
channel: 'dev',
displayName: 'Firefox Developer Edition',
info: firefoxInfo,
versionRegex: /Firefox Developer Edition (\S+)/,
profile: true,
binary: 'firefox-developer-edition',
},
{
name: 'firefoxNightly',
name: 'firefox',
family: 'firefox',
channel: 'nightly',
displayName: 'Firefox Nightly',
info: firefoxInfo,
versionRegex: /Firefox Nightly (\S+)/,
Expand Down
2 changes: 1 addition & 1 deletion packages/server/lib/modes/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,7 @@ module.exports = {
browser,
})

if ((browser.family !== 'chrome' && browser.family !== 'electron') && !options.config.chromeWebSecurity) {
if (browser.family !== 'chromium' && !options.config.chromeWebSecurity) {
console.log()
errors.warning('CHROME_WEB_SECURITY_NOT_SUPPORTED', browser.family)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/server/lib/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class Project extends EE {
// attach warning message if user has "chromeWebSecurity: false" for unsupported browser
if (cfg.chromeWebSecurity === false) {
_.chain(cfg.browsers)
.filter((browser) => !(browser.family === 'chrome' || browser.family === 'electron'))
.filter((browser) => browser.family !== 'chromium')
.each((browser) => browser.warning = errors.getMsgByType('CHROME_WEB_SECURITY_NOT_SUPPORTED', browser.name))
.value()
}
Expand Down
1 change: 1 addition & 0 deletions packages/server/test/unit/browsers/browsers_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ describe "lib/browsers/index", ->
context ".isBrowserFamily", ->
it "allows only known browsers", ->
expect(browsers.isBrowserFamily("chromium")).to.be.true
expect(browsers.isBrowserFamily("firefox")).to.be.true
expect(browsers.isBrowserFamily("chrome")).to.be.false
expect(browsers.isBrowserFamily("electron")).to.be.false
expect(browsers.isBrowserFamily("my-favorite-browser")).to.be.false
Expand Down
4 changes: 2 additions & 2 deletions packages/server/test/unit/project_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ describe('lib/project', () => {

it('attaches warning to non-chrome browsers when chromeWebSecurity:false', function () {
Object.assign(this.config, {
browsers: [{ family: 'chrome', name: 'Canary' }, { family: 'some-other-family', name: 'some-other-name' }],
browsers: [{ family: 'chromium', name: 'Canary' }, { family: 'some-other-family', name: 'some-other-name' }],
chromeWebSecurity: false,
})

Expand All @@ -297,7 +297,7 @@ describe('lib/project', () => {
expect(config.chromeWebSecurity).eq(false)
expect(config.browsers).deep.eq([
{
family: 'chrome',
family: 'chromium',
name: 'Canary',
},
{
Expand Down

1 comment on commit 06e1170

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 06e1170 Jan 31, 2020

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.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/3.8.4/linux-x64/circle-issue-1096-firefox-support-06e117074bc85700b3a28d288152fac44a064d9c-240974/cypress.zip
npm install https://cdn.cypress.io/beta/npm/3.8.4/circle-issue-1096-firefox-support-06e117074bc85700b3a28d288152fac44a064d9c-240961/cypress.tgz

Please sign in to comment.