Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking: remove logic around min supported browsers #30462

Merged
merged 18 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ _Released 12/3/2024 (PENDING)_

- Removed support for Node.js 16 and Node.js 21. Addresses [#29930](https://github.com/cypress-io/cypress/issues/29930).
- Prebuilt binaries for Linux are no longer compatible with Linux distributions based on glibc <2.28, for example: Ubuntu 14-18, RHEL 7, CentOS 7, Amazon Linux 2. Addresses [#29601](https://github.com/cypress-io/cypress/issues/29601).
- Cypress now only officially supports the latest 3 major versions of Chrome, Firefox, and Edge - older browser versions may still work, but we recommend keeping your browsers up to date to ensure compatibility with Cypress. A warning will no longer be displayed on browser selection in the Launchpad for any 'unsupported' browser versions. Additionally, the undocumented `minSupportedVersion` property has been removed from `Cypress.browser`. Addressed in [#30462](https://github.com/cypress-io/cypress/pull/30462).
- The `delayMs` option of `cy.intercept()` has been removed. This option was deprecated in Cypress 6.4.0. Please use the `delay` option instead. Addressed in [#30463](https://github.com/cypress-io/cypress/pull/30463).
- The `experimentalFetchPolyfill` configuration option was removed. This option was deprecated in Cypress 6.0.0. We recommend using `cy.intercept()` for handling fetch requests. Addressed in [#30466](https://github.com/cypress-io/cypress/pull/30466).
- We removed yielding the second argument of `before:browser:launch` as an array of browser arguments. This behavior has been deprecated since Cypress 4.0.0. Addressed in [#30460](https://github.com/cypress-io/cypress/pull/30460).
Expand Down
6 changes: 1 addition & 5 deletions cli/types/cypress.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,7 @@ declare namespace Cypress {
*/
warning?: string
/**
* The minimum majorVersion of this browser supported by Cypress.
*/
minSupportedVersion?: number
/**
* If `true`, this browser is too old to be supported by Cypress.
* If `true`, this browser version is not supported in Cypress.
*/
unsupportedVersion?: boolean
}
Expand Down
1 change: 0 additions & 1 deletion packages/app/src/settings/project/ConfigCode.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ describe('<ConfigCode />', () => {
browser.displayName && cy.contains(`displayName: '${browser.displayName}',`)
browser.version && cy.contains(`version: '${browser.version}',`)
browser.path && cy.contains(`path: '${browser.path}',`)
browser.minSupportedVersion && cy.contains(`minSupportedVersion: ${browser.minSupportedVersion},`)
browser.majorVersion && cy.contains(`majorVersion: ${browser.majorVersion},`)
})
} else {
Expand Down
38 changes: 0 additions & 38 deletions packages/errors/__snapshot-html__/UNSUPPORTED_BROWSER_VERSION.html

This file was deleted.

1 change: 1 addition & 0 deletions packages/errors/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,7 @@ export const AllCypressErrors = {

https://on.cypress.io/component-testing`
},

UNSUPPORTED_BROWSER_VERSION: (errorMsg: string) => {
return errTemplate`${fmt.off(errorMsg)}`
},
Expand Down
2 changes: 0 additions & 2 deletions packages/frontend-shared/cypress/fixtures/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"displayName": "Chrome",
"version": "97.0.4692.71",
"path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
"minSupportedVersion": 64,
"majorVersion": 97
},
{
Expand All @@ -33,7 +32,6 @@
"displayName": "Firefox",
"version": "95.0.2",
"path": "/Applications/Firefox.app/Contents/MacOS/firefox",
"minSupportedVersion": 86,
"majorVersion": 95
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ export const longBrowsersList = [
displayName: 'Edge Beta',
family: 'chromium',
channel: 'beta',
version: 'unsupported',
version: '85.0.309.71',
path: '/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta',
majorVersion: '79',
majorVersion: '85',
isFocusSupported: true,
isVersionSupported: false,
disabled: false,
Expand Down Expand Up @@ -126,9 +126,8 @@ export const longBrowsersList = [
version: '69.0.1',
path: '/Applications/Firefox/Contents/MacOS/Firefox',
majorVersion: '69',
unsupportedVersion: true,
isFocusSupported: true,
isVersionSupported: false,
isVersionSupported: true,
disabled: true,
},
{
Expand All @@ -140,9 +139,8 @@ export const longBrowsersList = [
version: '75.0.1',
path: '/Applications/Firefox/Contents/MacOS/Firefox',
majorVersion: '75',
unsupportedVersion: true,
isFocusSupported: true,
isVersionSupported: false,
isVersionSupported: true,
disabled: true,
},
{
Expand All @@ -169,7 +167,7 @@ export const longBrowsersList = [
path: '/Applications/Firefox Nightly/Contents/MacOS/Firefox Nightly',
majorVersion: '69',
isFocusSupported: false,
isVersionSupported: false,
isVersionSupported: true,
disabled: true,
},
{
Expand All @@ -182,7 +180,7 @@ export const longBrowsersList = [
path: '/Applications/Fake Browser/Contents/MacOS/Fake Browser',
majorVersion: '79',
isFocusSupported: false,
isVersionSupported: false,
isVersionSupported: true,
disabled: true,
},
] as const
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
})

cy.contains('Unsupported browser').should('be.visible')

/*
TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23436
cy.percySnapshot('unsupported browser tooltip')
*/
})

describe('breadcrumbs', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
'cursor-pointer': !browser.disabled && browser.isVersionSupported
}"
data-cy="top-nav-browser-list-item"

:data-browser-id="browser.id"
@click="handleBrowserChoice(browser)"
>
Expand All @@ -24,7 +23,7 @@
<div class="grow">
<div>
<button
class="font-medium box-border focus:outline-none"
class="box-border font-medium focus:outline-none"
:class="{
'text-indigo-500 group-hover:text-indigo-700': !browser.isSelected && !browser.disabled && browser.isVersionSupported,
'text-jade-700': browser.isSelected,
Expand All @@ -39,19 +38,15 @@
"
>
{{ t('topNav.version') }} {{ browser.majorVersion }}
<span v-if="browser.version === 'unsupported'">
({{ t('topNav.versionUnsupported') }})
<span v-if="!browser.isVersionSupported">
(Unsupported)
</span>
</div>
</div>
</div>
<div>
<div
class="flex h-full items-center align-middle"
>
<template
v-if="browser.isSelected"
>
<div class="flex items-center h-full align-middle">
<template v-if="browser.isSelected">
<div data-cy="top-nav-browser-list-selected-item">
<i-cy-circle-check_x24 class="h-[24px] w-[24px] icon-dark-jade-100 icon-light-jade-500" />
</div>
Expand All @@ -65,7 +60,7 @@
/>
<template #popper>
<div class="text-center p-2 text-gray-300 text-[14px] leading-[20px]">
<div class="font-medium text-white mb-2">
<div class="mb-2 font-medium text-white">
Unsupported browser
</div>
{{ browser.warning }}
Expand Down
1 change: 0 additions & 1 deletion packages/frontend-shared/src/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@
"topNav": {
"released": "Released",
"version": "Version",
"versionUnsupported": "Unsupported",
"installed": "Installed",
"latest": "Latest",
"seeAllReleases": "See all releases",
Expand Down
11 changes: 0 additions & 11 deletions packages/launcher/__snapshots__/browsers_spec.ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ exports['browsers returns the expected list of browsers 1'] = [
'chrome',
'google-chrome-stable',
],
'minSupportedVersion': 64,
},
{
'name': 'chromium',
Expand All @@ -22,7 +21,6 @@ exports['browsers returns the expected list of browsers 1'] = [
'chromium-browser',
'chromium',
],
'minSupportedVersion': 64,
},
{
'name': 'chrome',
Expand All @@ -31,7 +29,6 @@ exports['browsers returns the expected list of browsers 1'] = [
'displayName': 'Chrome Beta',
'versionRegex': {},
'binary': 'google-chrome-beta',
'minSupportedVersion': 64,
},
{
'name': 'chrome',
Expand All @@ -40,7 +37,6 @@ exports['browsers returns the expected list of browsers 1'] = [
'displayName': 'Canary',
'versionRegex': {},
'binary': 'google-chrome-canary',
'minSupportedVersion': 64,
},
{
'name': 'firefox',
Expand All @@ -49,7 +45,6 @@ exports['browsers returns the expected list of browsers 1'] = [
'displayName': 'Firefox',
'versionRegex': {},
'binary': 'firefox',
'minSupportedVersion': 86,
},
{
'name': 'firefox',
Expand All @@ -61,7 +56,6 @@ exports['browsers returns the expected list of browsers 1'] = [
'firefox-developer-edition',
'firefox',
],
'minSupportedVersion': 86,
},
{
'name': 'firefox',
Expand All @@ -73,7 +67,6 @@ exports['browsers returns the expected list of browsers 1'] = [
'firefox-nightly',
'firefox-trunk',
],
'minSupportedVersion': 86,
},
{
'name': 'edge',
Expand All @@ -85,7 +78,6 @@ exports['browsers returns the expected list of browsers 1'] = [
'edge',
'microsoft-edge',
],
'minSupportedVersion': 79,
},
{
'name': 'edge',
Expand All @@ -97,7 +89,6 @@ exports['browsers returns the expected list of browsers 1'] = [
'edge-canary',
'microsoft-edge-canary',
],
'minSupportedVersion': 79,
},
{
'name': 'edge',
Expand All @@ -109,7 +100,6 @@ exports['browsers returns the expected list of browsers 1'] = [
'edge-beta',
'microsoft-edge-beta',
],
'minSupportedVersion': 79,
},
{
'name': 'edge',
Expand All @@ -121,6 +111,5 @@ exports['browsers returns the expected list of browsers 1'] = [
'edge-dev',
'microsoft-edge-dev',
],
'minSupportedVersion': 79,
},
]
11 changes: 0 additions & 11 deletions packages/launcher/__snapshots__/darwin_spec.ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
'chrome',
'google-chrome-stable',
],
'minSupportedVersion': 64,
'path': '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
'version': 'someVersion',
'findAppParams': {
Expand All @@ -30,7 +29,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
'chromium-browser',
'chromium',
],
'minSupportedVersion': 64,
'path': '/Applications/Chromium.app/Contents/MacOS/Chromium',
'version': 'someVersion',
'findAppParams': {
Expand All @@ -47,7 +45,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
'displayName': 'Chrome Beta',
'versionRegex': {},
'binary': 'google-chrome-beta',
'minSupportedVersion': 64,
'path': '/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta',
'version': 'someVersion',
'findAppParams': {
Expand All @@ -64,7 +61,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
'displayName': 'Canary',
'versionRegex': {},
'binary': 'google-chrome-canary',
'minSupportedVersion': 64,
'path': '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary',
'version': 'someVersion',
'findAppParams': {
Expand All @@ -81,7 +77,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
'displayName': 'Firefox',
'versionRegex': {},
'binary': 'firefox',
'minSupportedVersion': 86,
'path': '/Applications/Firefox.app/Contents/MacOS/firefox',
'version': 'someVersion',
'findAppParams': {
Expand All @@ -101,7 +96,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
'firefox-developer-edition',
'firefox',
],
'minSupportedVersion': 86,
'path': '/Applications/Firefox Developer Edition.app/Contents/MacOS/firefox',
'version': 'someVersion',
'findAppParams': {
Expand All @@ -121,7 +115,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
'firefox-nightly',
'firefox-trunk',
],
'minSupportedVersion': 86,
'path': '/Applications/Firefox Nightly.app/Contents/MacOS/firefox',
'version': 'someVersion',
'findAppParams': {
Expand All @@ -141,7 +134,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
'edge',
'microsoft-edge',
],
'minSupportedVersion': 79,
'path': '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge',
'version': 'someVersion',
'findAppParams': {
Expand All @@ -161,7 +153,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
'edge-canary',
'microsoft-edge-canary',
],
'minSupportedVersion': 79,
'path': '/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary',
'version': 'someVersion',
'findAppParams': {
Expand All @@ -181,7 +172,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
'edge-beta',
'microsoft-edge-beta',
],
'minSupportedVersion': 79,
'path': '/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta',
'version': 'someVersion',
'findAppParams': {
Expand All @@ -201,7 +191,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
'edge-dev',
'microsoft-edge-dev',
],
'minSupportedVersion': 79,
'path': '/Applications/Microsoft Edge Dev.app/Contents/MacOS/Microsoft Edge Dev',
'version': 'someVersion',
'findAppParams': {
Expand Down
Loading