flotwig / cypress-log-to-output

A Cypress plugin that sends all logs that occur in the browser to stdout in the terminal.
146 stars 19 forks source link

Support Chrome 76 #4

Closed arsduo closed 5 years ago

arsduo commented 5 years ago

In Chrome 76, browser doesn't contain a family element:

{ name: 'chrome',
  displayName: 'Chrome',
  version: '76.0.3809.132',
  path: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
  majorVersion: '76',
  isHeadless: false,
  isHeaded: true }

This PR updates the library's check for whether we're using Chrome to support either browser.family or browser.name.

Fixes https://github.com/flotwig/cypress-log-to-output/issues/3.

tylerdavis commented 5 years ago

Would love to see this merged

flotwig commented 5 years ago

browser.family was added in Cypress 3.2.0, the latest version of Cypress is 3.4.1, so that's why it's not working right for you. This change is fine once it's updated to account for all browsers though.