Skip to content

Commit 0aa73c4

Browse files
breaking: remove logic around min supported browsers (#30462)
* remove logic around min supported browsers BREAKING: remove logic around min supported browsers * changelog entry * forgot to save some changed files * update broken tests * remove another test testing unsupported browsers * Add back logic for browser validator * return if validator is undefined * update called browser * fix failing tests * fix logic of unsupported showing * add parens
1 parent 575b9b7 commit 0aa73c4

File tree

21 files changed

+81
-396
lines changed

21 files changed

+81
-396
lines changed

cli/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ _Released 12/3/2024 (PENDING)_
77

88
- Removed support for Node.js 16 and Node.js 21. Addresses [#29930](https://github.com/cypress-io/cypress/issues/29930).
99
- 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).
10+
- 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).
1011
- 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).
1112
- 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).
1213
- 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).

cli/types/cypress.d.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,7 @@ declare namespace Cypress {
118118
*/
119119
warning?: string
120120
/**
121-
* The minimum majorVersion of this browser supported by Cypress.
122-
*/
123-
minSupportedVersion?: number
124-
/**
125-
* If `true`, this browser is too old to be supported by Cypress.
121+
* If `true`, this browser version is not supported in Cypress.
126122
*/
127123
unsupportedVersion?: boolean
128124
}

packages/app/src/settings/project/ConfigCode.cy.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ describe('<ConfigCode />', () => {
190190
browser.displayName && cy.contains(`displayName: '${browser.displayName}',`)
191191
browser.version && cy.contains(`version: '${browser.version}',`)
192192
browser.path && cy.contains(`path: '${browser.path}',`)
193-
browser.minSupportedVersion && cy.contains(`minSupportedVersion: ${browser.minSupportedVersion},`)
194193
browser.majorVersion && cy.contains(`majorVersion: ${browser.majorVersion},`)
195194
})
196195
} else {

packages/errors/__snapshot-html__/UNSUPPORTED_BROWSER_VERSION.html

-38
This file was deleted.

packages/errors/src/errors.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1416,6 +1416,7 @@ export const AllCypressErrors = {
14161416
14171417
https://on.cypress.io/component-testing`
14181418
},
1419+
14191420
UNSUPPORTED_BROWSER_VERSION: (errorMsg: string) => {
14201421
return errTemplate`${fmt.off(errorMsg)}`
14211422
},

packages/frontend-shared/cypress/fixtures/config.json

-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"displayName": "Chrome",
2424
"version": "97.0.4692.71",
2525
"path": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
26-
"minSupportedVersion": 64,
2726
"majorVersion": 97
2827
},
2928
{
@@ -33,7 +32,6 @@
3332
"displayName": "Firefox",
3433
"version": "95.0.2",
3534
"path": "/Applications/Firefox.app/Contents/MacOS/firefox",
36-
"minSupportedVersion": 86,
3735
"majorVersion": 95
3836
},
3937
{

packages/frontend-shared/cypress/support/mock-graphql/longBrowsersList.ts

+6-8
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ export const longBrowsersList = [
8484
displayName: 'Edge Beta',
8585
family: 'chromium',
8686
channel: 'beta',
87-
version: 'unsupported',
87+
version: '85.0.309.71',
8888
path: '/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta',
89-
majorVersion: '79',
89+
majorVersion: '85',
9090
isFocusSupported: true,
9191
isVersionSupported: false,
9292
disabled: false,
@@ -126,9 +126,8 @@ export const longBrowsersList = [
126126
version: '69.0.1',
127127
path: '/Applications/Firefox/Contents/MacOS/Firefox',
128128
majorVersion: '69',
129-
unsupportedVersion: true,
130129
isFocusSupported: true,
131-
isVersionSupported: false,
130+
isVersionSupported: true,
132131
disabled: true,
133132
},
134133
{
@@ -140,9 +139,8 @@ export const longBrowsersList = [
140139
version: '75.0.1',
141140
path: '/Applications/Firefox/Contents/MacOS/Firefox',
142141
majorVersion: '75',
143-
unsupportedVersion: true,
144142
isFocusSupported: true,
145-
isVersionSupported: false,
143+
isVersionSupported: true,
146144
disabled: true,
147145
},
148146
{
@@ -169,7 +167,7 @@ export const longBrowsersList = [
169167
path: '/Applications/Firefox Nightly/Contents/MacOS/Firefox Nightly',
170168
majorVersion: '69',
171169
isFocusSupported: false,
172-
isVersionSupported: false,
170+
isVersionSupported: true,
173171
disabled: true,
174172
},
175173
{
@@ -182,7 +180,7 @@ export const longBrowsersList = [
182180
path: '/Applications/Fake Browser/Contents/MacOS/Fake Browser',
183181
majorVersion: '79',
184182
isFocusSupported: false,
185-
isVersionSupported: false,
183+
isVersionSupported: true,
186184
disabled: true,
187185
},
188186
] as const

packages/frontend-shared/src/gql-components/HeaderBarContent.cy.tsx

-5
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
5353
})
5454

5555
cy.contains('Unsupported browser').should('be.visible')
56-
57-
/*
58-
TODO: fix flaky test https://github.com/cypress-io/cypress/issues/23436
59-
cy.percySnapshot('unsupported browser tooltip')
60-
*/
6156
})
6257

6358
describe('breadcrumbs', () => {

packages/frontend-shared/src/gql-components/topnav/VerticalBrowserListItems.vue

+6-11
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
'cursor-pointer': !browser.disabled && browser.isVersionSupported
1212
}"
1313
data-cy="top-nav-browser-list-item"
14-
1514
:data-browser-id="browser.id"
1615
@click="handleBrowserChoice(browser)"
1716
>
@@ -24,7 +23,7 @@
2423
<div class="grow">
2524
<div>
2625
<button
27-
class="font-medium box-border focus:outline-none"
26+
class="box-border font-medium focus:outline-none"
2827
:class="{
2928
'text-indigo-500 group-hover:text-indigo-700': !browser.isSelected && !browser.disabled && browser.isVersionSupported,
3029
'text-jade-700': browser.isSelected,
@@ -39,19 +38,15 @@
3938
"
4039
>
4140
{{ t('topNav.version') }} {{ browser.majorVersion }}
42-
<span v-if="browser.version === 'unsupported'">
43-
({{ t('topNav.versionUnsupported') }})
41+
<span v-if="!browser.isVersionSupported">
42+
(Unsupported)
4443
</span>
4544
</div>
4645
</div>
4746
</div>
4847
<div>
49-
<div
50-
class="flex h-full items-center align-middle"
51-
>
52-
<template
53-
v-if="browser.isSelected"
54-
>
48+
<div class="flex items-center h-full align-middle">
49+
<template v-if="browser.isSelected">
5550
<div data-cy="top-nav-browser-list-selected-item">
5651
<i-cy-circle-check_x24 class="h-[24px] w-[24px] icon-dark-jade-100 icon-light-jade-500" />
5752
</div>
@@ -65,7 +60,7 @@
6560
/>
6661
<template #popper>
6762
<div class="text-center p-2 text-gray-300 text-[14px] leading-[20px]">
68-
<div class="font-medium text-white mb-2">
63+
<div class="mb-2 font-medium text-white">
6964
Unsupported browser
7065
</div>
7166
{{ browser.warning }}

packages/frontend-shared/src/locales/en-US.json

-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@
316316
"topNav": {
317317
"released": "Released",
318318
"version": "Version",
319-
"versionUnsupported": "Unsupported",
320319
"installed": "Installed",
321320
"latest": "Latest",
322321
"seeAllReleases": "See all releases",

packages/launcher/__snapshots__/browsers_spec.ts.js

-11
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ exports['browsers returns the expected list of browsers 1'] = [
1010
'chrome',
1111
'google-chrome-stable',
1212
],
13-
'minSupportedVersion': 64,
1413
},
1514
{
1615
'name': 'chromium',
@@ -22,7 +21,6 @@ exports['browsers returns the expected list of browsers 1'] = [
2221
'chromium-browser',
2322
'chromium',
2423
],
25-
'minSupportedVersion': 64,
2624
},
2725
{
2826
'name': 'chrome',
@@ -31,7 +29,6 @@ exports['browsers returns the expected list of browsers 1'] = [
3129
'displayName': 'Chrome Beta',
3230
'versionRegex': {},
3331
'binary': 'google-chrome-beta',
34-
'minSupportedVersion': 64,
3532
},
3633
{
3734
'name': 'chrome',
@@ -40,7 +37,6 @@ exports['browsers returns the expected list of browsers 1'] = [
4037
'displayName': 'Canary',
4138
'versionRegex': {},
4239
'binary': 'google-chrome-canary',
43-
'minSupportedVersion': 64,
4440
},
4541
{
4642
'name': 'firefox',
@@ -49,7 +45,6 @@ exports['browsers returns the expected list of browsers 1'] = [
4945
'displayName': 'Firefox',
5046
'versionRegex': {},
5147
'binary': 'firefox',
52-
'minSupportedVersion': 86,
5348
},
5449
{
5550
'name': 'firefox',
@@ -61,7 +56,6 @@ exports['browsers returns the expected list of browsers 1'] = [
6156
'firefox-developer-edition',
6257
'firefox',
6358
],
64-
'minSupportedVersion': 86,
6559
},
6660
{
6761
'name': 'firefox',
@@ -73,7 +67,6 @@ exports['browsers returns the expected list of browsers 1'] = [
7367
'firefox-nightly',
7468
'firefox-trunk',
7569
],
76-
'minSupportedVersion': 86,
7770
},
7871
{
7972
'name': 'edge',
@@ -85,7 +78,6 @@ exports['browsers returns the expected list of browsers 1'] = [
8578
'edge',
8679
'microsoft-edge',
8780
],
88-
'minSupportedVersion': 79,
8981
},
9082
{
9183
'name': 'edge',
@@ -97,7 +89,6 @@ exports['browsers returns the expected list of browsers 1'] = [
9789
'edge-canary',
9890
'microsoft-edge-canary',
9991
],
100-
'minSupportedVersion': 79,
10192
},
10293
{
10394
'name': 'edge',
@@ -109,7 +100,6 @@ exports['browsers returns the expected list of browsers 1'] = [
109100
'edge-beta',
110101
'microsoft-edge-beta',
111102
],
112-
'minSupportedVersion': 79,
113103
},
114104
{
115105
'name': 'edge',
@@ -121,6 +111,5 @@ exports['browsers returns the expected list of browsers 1'] = [
121111
'edge-dev',
122112
'microsoft-edge-dev',
123113
],
124-
'minSupportedVersion': 79,
125114
},
126115
]

packages/launcher/__snapshots__/darwin_spec.ts.js

-11
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
1010
'chrome',
1111
'google-chrome-stable',
1212
],
13-
'minSupportedVersion': 64,
1413
'path': '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
1514
'version': 'someVersion',
1615
'findAppParams': {
@@ -30,7 +29,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
3029
'chromium-browser',
3130
'chromium',
3231
],
33-
'minSupportedVersion': 64,
3432
'path': '/Applications/Chromium.app/Contents/MacOS/Chromium',
3533
'version': 'someVersion',
3634
'findAppParams': {
@@ -47,7 +45,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
4745
'displayName': 'Chrome Beta',
4846
'versionRegex': {},
4947
'binary': 'google-chrome-beta',
50-
'minSupportedVersion': 64,
5148
'path': '/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta',
5249
'version': 'someVersion',
5350
'findAppParams': {
@@ -64,7 +61,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
6461
'displayName': 'Canary',
6562
'versionRegex': {},
6663
'binary': 'google-chrome-canary',
67-
'minSupportedVersion': 64,
6864
'path': '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary',
6965
'version': 'someVersion',
7066
'findAppParams': {
@@ -81,7 +77,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
8177
'displayName': 'Firefox',
8278
'versionRegex': {},
8379
'binary': 'firefox',
84-
'minSupportedVersion': 86,
8580
'path': '/Applications/Firefox.app/Contents/MacOS/firefox',
8681
'version': 'someVersion',
8782
'findAppParams': {
@@ -101,7 +96,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
10196
'firefox-developer-edition',
10297
'firefox',
10398
],
104-
'minSupportedVersion': 86,
10599
'path': '/Applications/Firefox Developer Edition.app/Contents/MacOS/firefox',
106100
'version': 'someVersion',
107101
'findAppParams': {
@@ -121,7 +115,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
121115
'firefox-nightly',
122116
'firefox-trunk',
123117
],
124-
'minSupportedVersion': 86,
125118
'path': '/Applications/Firefox Nightly.app/Contents/MacOS/firefox',
126119
'version': 'someVersion',
127120
'findAppParams': {
@@ -141,7 +134,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
141134
'edge',
142135
'microsoft-edge',
143136
],
144-
'minSupportedVersion': 79,
145137
'path': '/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge',
146138
'version': 'someVersion',
147139
'findAppParams': {
@@ -161,7 +153,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
161153
'edge-canary',
162154
'microsoft-edge-canary',
163155
],
164-
'minSupportedVersion': 79,
165156
'path': '/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary',
166157
'version': 'someVersion',
167158
'findAppParams': {
@@ -181,7 +172,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
181172
'edge-beta',
182173
'microsoft-edge-beta',
183174
],
184-
'minSupportedVersion': 79,
185175
'path': '/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta',
186176
'version': 'someVersion',
187177
'findAppParams': {
@@ -201,7 +191,6 @@ exports['darwin browser detection detects browsers as expected 1'] = [
201191
'edge-dev',
202192
'microsoft-edge-dev',
203193
],
204-
'minSupportedVersion': 79,
205194
'path': '/Applications/Microsoft Edge Dev.app/Contents/MacOS/Microsoft Edge Dev',
206195
'version': 'someVersion',
207196
'findAppParams': {

0 commit comments

Comments
 (0)