-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: allow users to pass true to videoCompression config and only a… #26810
Merged
Merged
Changes from 5 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
11e723d
chore: allow users to pass true to videoCompression config and only a…
AtofStryker 5f1e071
run ci
AtofStryker 3b49bd3
Merge branch 'develop' of github.com:cypress-io/cypress into chore/up…
AtofStryker 2826f16
chore: allow zero to be option for CRF as we will coerve it to false …
AtofStryker 7805081
Update cli/CHANGELOG.md
AtofStryker 0b9100c
chore: update videoCompression types
AtofStryker 476b4d2
Merge branch 'chore/update_video_compression_defaults' of github.com:…
AtofStryker 99a8cf2
chore: update changelog
AtofStryker d919367
Update cli/CHANGELOG.md
AtofStryker d6cc771
Update cli/types/cypress.d.ts
AtofStryker 7341310
Update packages/config/src/validation.ts
AtofStryker 6943671
chore: update config snapshots
AtofStryker fb38288
Update packages/config/test/validation.spec.ts
AtofStryker b653921
chore: add system test on videoCompression=true coersion
AtofStryker c0fe652
Merge branch 'chore/update_video_compression_defaults' of github.com:…
AtofStryker 53a07c9
chore: document 0 as being false and not a valid CRF option for cypre…
AtofStryker 554177a
Merge branch 'develop' into chore/update_video_compression_defaults
AtofStryker 0292aa5
chore: fix types
AtofStryker 09bad26
Merge branch 'chore/update_video_compression_defaults' of github.com:…
AtofStryker 7b3bde9
chore: fix types
AtofStryker bd7e247
Merge branch 'develop' of github.com:cypress-io/cypress into chore/up…
AtofStryker 2eb4885
chore: fix change to log as feature and not bugfix
AtofStryker e86dcb1
chore: fix server side unit tests
AtofStryker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
exports['missing https protocol'] = { | ||
"key": "clientCertificates[0].url", | ||
"value": "http://url.com", | ||
"type": "an https protocol" | ||
'key': 'clientCertificates[0].url', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the husky hook did it I swear 😅 |
||
'value': 'http://url.com', | ||
'type': 'an https protocol', | ||
} | ||
|
||
exports['invalid url'] = { | ||
"key": "clientCertificates[0].url", | ||
"value": "not *", | ||
"type": "a valid URL" | ||
'key': 'clientCertificates[0].url', | ||
'value': 'not *', | ||
'type': 'a valid URL', | ||
} | ||
|
||
exports['undefined browsers'] = ` | ||
|
@@ -19,208 +19,220 @@ Expected at least one browser | |
` | ||
|
||
exports['browsers list with a string'] = { | ||
"key": "name", | ||
"value": "foo", | ||
"type": "a non-empty string", | ||
"list": "browsers" | ||
'key': 'name', | ||
'value': 'foo', | ||
'type': 'a non-empty string', | ||
'list': 'browsers', | ||
} | ||
|
||
exports['invalid retry value'] = { | ||
"key": "mockConfigKey", | ||
"value": "1", | ||
"type": "a positive number or null or an object with keys \"openMode\" and \"runMode\" with values of numbers or nulls" | ||
'key': 'mockConfigKey', | ||
'value': '1', | ||
'type': 'a positive number or null or an object with keys "openMode" and "runMode" with values of numbers or nulls', | ||
} | ||
|
||
exports['invalid retry object'] = { | ||
"key": "mockConfigKey", | ||
"value": { | ||
"fakeMode": 1 | ||
'key': 'mockConfigKey', | ||
'value': { | ||
'fakeMode': 1, | ||
}, | ||
"type": "a positive number or null or an object with keys \"openMode\" and \"runMode\" with values of numbers or nulls" | ||
'type': 'a positive number or null or an object with keys "openMode" and "runMode" with values of numbers or nulls', | ||
} | ||
|
||
exports['not qualified url'] = { | ||
"key": "mockConfigKey", | ||
"value": "url.com", | ||
"type": "a fully qualified URL (starting with `http://` or `https://`)" | ||
'key': 'mockConfigKey', | ||
'value': 'url.com', | ||
'type': 'a fully qualified URL (starting with `http://` or `https://`)', | ||
} | ||
|
||
exports['empty string'] = { | ||
"key": "mockConfigKey", | ||
"value": "", | ||
"type": "a fully qualified URL (starting with `http://` or `https://`)" | ||
'key': 'mockConfigKey', | ||
'value': '', | ||
'type': 'a fully qualified URL (starting with `http://` or `https://`)', | ||
} | ||
|
||
exports['not string or array'] = { | ||
"key": "mockConfigKey", | ||
"value": null, | ||
"type": "a string or an array of strings" | ||
'key': 'mockConfigKey', | ||
'value': null, | ||
'type': 'a string or an array of strings', | ||
} | ||
|
||
exports['array of non-strings'] = { | ||
"key": "mockConfigKey", | ||
"value": [ | ||
'key': 'mockConfigKey', | ||
'value': [ | ||
1, | ||
2, | ||
3 | ||
3, | ||
], | ||
"type": "a string or an array of strings" | ||
'type': 'a string or an array of strings', | ||
} | ||
|
||
exports['not one of the strings error message'] = { | ||
"key": "test", | ||
"value": "nope", | ||
"type": "one of these values: \"foo\", \"bar\"" | ||
'key': 'test', | ||
'value': 'nope', | ||
'type': 'one of these values: "foo", "bar"', | ||
} | ||
|
||
exports['number instead of string'] = { | ||
"key": "test", | ||
"value": 42, | ||
"type": "one of these values: \"foo\", \"bar\"" | ||
'key': 'test', | ||
'value': 42, | ||
'type': 'one of these values: "foo", "bar"', | ||
} | ||
|
||
exports['null instead of string'] = { | ||
"key": "test", | ||
"value": null, | ||
"type": "one of these values: \"foo\", \"bar\"" | ||
'key': 'test', | ||
'value': null, | ||
'type': 'one of these values: "foo", "bar"', | ||
} | ||
|
||
exports['not one of the numbers error message'] = { | ||
"key": "test", | ||
"value": 4, | ||
"type": "one of these values: 1, 2, 3" | ||
'key': 'test', | ||
'value': 4, | ||
'type': 'one of these values: 1, 2, 3', | ||
} | ||
|
||
exports['string instead of a number'] = { | ||
"key": "test", | ||
"value": "foo", | ||
"type": "one of these values: 1, 2, 3" | ||
'key': 'test', | ||
'value': 'foo', | ||
'type': 'one of these values: 1, 2, 3', | ||
} | ||
|
||
exports['null instead of a number'] = { | ||
"key": "test", | ||
"value": null, | ||
"type": "one of these values: 1, 2, 3" | ||
'key': 'test', | ||
'value': null, | ||
'type': 'one of these values: 1, 2, 3', | ||
} | ||
|
||
exports['config/src/validation .isValidClientCertificatesSet returns error message for certs not passed as an array array 1'] = { | ||
"key": "mockConfigKey", | ||
"value": "1", | ||
"type": "a positive number or null or an object with keys \"openMode\" and \"runMode\" with values of numbers or nulls" | ||
'key': 'mockConfigKey', | ||
'value': '1', | ||
'type': 'a positive number or null or an object with keys "openMode" and "runMode" with values of numbers or nulls', | ||
} | ||
|
||
exports['config/src/validation .isValidClientCertificatesSet returns error message for certs object without url 1'] = { | ||
"key": "clientCertificates[0].url", | ||
"type": "a URL matcher" | ||
'key': 'clientCertificates[0].url', | ||
'type': 'a URL matcher', | ||
} | ||
|
||
exports['config/src/validation .isValidBrowser passes valid browsers and forms error messages for invalid ones isValidBrowser 1'] = { | ||
"name": "isValidBrowser", | ||
"behavior": [ | ||
'name': 'isValidBrowser', | ||
'behavior': [ | ||
{ | ||
"given": { | ||
"name": "Chrome", | ||
"displayName": "Chrome Browser", | ||
"family": "chromium", | ||
"path": "/path/to/chrome", | ||
"version": "1.2.3", | ||
"majorVersion": 1 | ||
'given': { | ||
'name': 'Chrome', | ||
'displayName': 'Chrome Browser', | ||
'family': 'chromium', | ||
'path': '/path/to/chrome', | ||
'version': '1.2.3', | ||
'majorVersion': 1, | ||
}, | ||
"expect": true | ||
'expect': true, | ||
}, | ||
{ | ||
"given": { | ||
"name": "FF", | ||
"displayName": "Firefox", | ||
"family": "firefox", | ||
"path": "/path/to/firefox", | ||
"version": "1.2.3", | ||
"majorVersion": "1" | ||
'given': { | ||
'name': 'FF', | ||
'displayName': 'Firefox', | ||
'family': 'firefox', | ||
'path': '/path/to/firefox', | ||
'version': '1.2.3', | ||
'majorVersion': '1', | ||
}, | ||
"expect": true | ||
'expect': true, | ||
}, | ||
{ | ||
"given": { | ||
"name": "Electron", | ||
"displayName": "Electron", | ||
"family": "chromium", | ||
"path": "", | ||
"version": "99.101.3", | ||
"majorVersion": 99 | ||
'given': { | ||
'name': 'Electron', | ||
'displayName': 'Electron', | ||
'family': 'chromium', | ||
'path': '', | ||
'version': '99.101.3', | ||
'majorVersion': 99, | ||
}, | ||
"expect": true | ||
'expect': true, | ||
}, | ||
{ | ||
"given": { | ||
"name": "No display name", | ||
"family": "chromium" | ||
'given': { | ||
'name': 'No display name', | ||
'family': 'chromium', | ||
}, | ||
"expect": { | ||
"key": "displayName", | ||
"value": { | ||
"name": "No display name", | ||
"family": "chromium" | ||
'expect': { | ||
'key': 'displayName', | ||
'value': { | ||
'name': 'No display name', | ||
'family': 'chromium', | ||
}, | ||
"type": "a non-empty string" | ||
} | ||
'type': 'a non-empty string', | ||
}, | ||
}, | ||
{ | ||
"given": { | ||
"name": "bad family", | ||
"displayName": "Bad family browser", | ||
"family": "unknown family" | ||
'given': { | ||
'name': 'bad family', | ||
'displayName': 'Bad family browser', | ||
'family': 'unknown family', | ||
}, | ||
"expect": { | ||
"key": "family", | ||
"value": { | ||
"name": "bad family", | ||
"displayName": "Bad family browser", | ||
"family": "unknown family" | ||
'expect': { | ||
'key': 'family', | ||
'value': { | ||
'name': 'bad family', | ||
'displayName': 'Bad family browser', | ||
'family': 'unknown family', | ||
}, | ||
"type": "either chromium, firefox or webkit" | ||
} | ||
} | ||
] | ||
'type': 'either chromium, firefox or webkit', | ||
}, | ||
}, | ||
], | ||
} | ||
|
||
exports['config/src/validation .isPlainObject returns error message when value is a not an object 1'] = { | ||
"key": "mockConfigKey", | ||
"value": 1, | ||
"type": "a plain object" | ||
'key': 'mockConfigKey', | ||
'value': 1, | ||
'type': 'a plain object', | ||
} | ||
|
||
exports['config/src/validation .isNumber returns error message when value is a not a number 1'] = { | ||
"key": "mockConfigKey", | ||
"value": "string", | ||
"type": "a number" | ||
'key': 'mockConfigKey', | ||
'value': 'string', | ||
'type': 'a number', | ||
} | ||
|
||
exports['config/src/validation .isNumberOrFalse returns error message when value is a not number or false 1'] = { | ||
"key": "mockConfigKey", | ||
"value": null, | ||
"type": "a number or false" | ||
'key': 'mockConfigKey', | ||
'value': null, | ||
'type': 'a number or false', | ||
} | ||
|
||
exports['config/src/validation .isBoolean returns error message when value is a not a string 1'] = { | ||
"key": "mockConfigKey", | ||
"value": 1, | ||
"type": "a string" | ||
'key': 'mockConfigKey', | ||
'value': 1, | ||
'type': 'a string', | ||
} | ||
|
||
exports['config/src/validation .isString returns error message when value is a not a string 1'] = { | ||
"key": "mockConfigKey", | ||
"value": 1, | ||
"type": "a string" | ||
'key': 'mockConfigKey', | ||
'value': 1, | ||
'type': 'a string', | ||
} | ||
|
||
exports['config/src/validation .isArray returns error message when value is a non-array 1'] = { | ||
"key": "mockConfigKey", | ||
"value": 1, | ||
"type": "an array" | ||
'key': 'mockConfigKey', | ||
'value': 1, | ||
'type': 'an array', | ||
} | ||
|
||
exports['config/src/validation .isStringOrFalse returns error message when value is neither string nor false 1'] = { | ||
"key": "mockConfigKey", | ||
"value": null, | ||
"type": "a string or false" | ||
'key': 'mockConfigKey', | ||
'value': null, | ||
'type': 'a string or false', | ||
} | ||
|
||
exports['invalid lower bound'] = { | ||
'key': 'test', | ||
'value': -1, | ||
'type': 'a valid CRF number between 0 & 51 (inclusively) or a boolean', | ||
} | ||
|
||
exports['invalid upper bound'] = { | ||
'key': 'test', | ||
'value': 52, | ||
'type': 'a valid CRF number between 0 & 51 (inclusively) or a boolean', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in 53a07c9