* Minor modifications to CLI types so that Cypress and Chai globals are correctly declared not only to be in the global scope but also to be in properties of globalThis, which they are. The change allows composers to explicitly access them through globalThis (e.g., 'globalThis.cy.mount', 'globalThis.expect'). The current typing prohibits this by incorrectly declaring that the objects in question are held in local variables of the global scope rather than in properties of globalThis.
* Reverted a change from previous commit
* fix: Properly type Cypress and Chai globals as properties of the global object
* fix: Properly type Cypress and Chai globals as properties of the global object
* fix: Properly type Cypress and Chai globals as properties of the global object
* update changelog
* fix changelog entry
* fix changelog entry
---------
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>
* feat: Selective CSP header directive stripping from HTTPResponse
- uses `stripCspDirectives` config option
* feat: Selective CSP header directive permission from HTTPResponse
- uses `experimentalCspAllowList` config option
* Address Review Comments:
- Add i18n for `experimentalCspAllowList`
- Remove PR link in changelog
- Fix docs link in changelog
- Remove extra typedef additions
- Update validation error message and snapshot
- Fix middleware negated conditional
* chore: refactor driver test into system tests to get better test
coverage on experimentalCspAllowList options
* Address Review Comments:
- Remove legacyOption for `experimentalCspAllowList`
- Update App desc for `experimentalCspAllowList` to include "Content-Security-Policy-Report-Only"
- Modify CHANGELOG wording
- Specify “never” overrideLevel
- Remove unused validator (+2 squashed commits)
- Add "Addresses" note in CHANGELOG to satisfy automation
- Set `canUpdateDuringTestTime` to `false` to prevent confusion
* chore: Add `frame-src` and `child-src` to conditional CSP directives
* chore: Rename `isSubsetOf` to `isArrayIncludingAny`
* chore: fix CLI linting types
* chore: fix server unit tests
* chore: fix system tests within firefox and webkit
* chore: add form-action test
* chore: update system test snapshots
* chore: skip tests in webkit due to form-action flakiness
* chore: Move 'sandbox' and 'navigate-to' into `unsupportedCSPDirectives`
- Add additional system tests
- Update snapshots and unit test
* chore: update system test snapshots
* chore: fix system tests
* chore: do not run csp tests within firefox or webkit due to flake issues in CI
* chore: attempt to increase intercept delay to avoid race condition
* chore: update new snapshots with video defaults work
* chore: update changelog
---------
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
* chore: allow users to pass true to videoCompression config and only allow valudes 1-51 inclusively to be passed in
* run ci
* chore: allow zero to be option for CRF as we will coerve it to false and skip compression to have a lossless video, which has the same effect
* Update cli/CHANGELOG.md
* chore: update videoCompression types
* chore: update changelog
* Update cli/CHANGELOG.md
* Update cli/types/cypress.d.ts
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
* Update packages/config/src/validation.ts
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
* chore: update config snapshots
* Update packages/config/test/validation.spec.ts
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
* chore: add system test on videoCompression=true coersion
* chore: document 0 as being false and not a valid CRF option for cypress video compression and make CRF valid values 1-51
* chore: fix types
* chore: fix types
* chore: fix change to log as feature and not bugfix
* chore: fix server side unit tests
---------
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
* feat: allow setCookie API to take a hostOnly option
* chore: add jsdoc/typescript description to render to users
* chore: add changelog entry
* [run ci]
* chore: fix types
* chore: fix cookie login tests
* chore: update e2e cookie system tests
* [run ci]
* chore: fix cookie command tests. localhost cookies are calculated as hostOnly, which is consistent with how cypress works today
* chore: fix system tests for cookies.
* [run ci]
* chore: fix system tests
* chore: skip hostOnly assertions in webkit (for now)
* [run ci]
* chore: add property definitions to setCookieOptions
* [run ci]
* chore: add comments to hostOnly prop in firefox when setting a cookie
* feat: set up experimentalUseDefaultDocumentDomain to disallow document.domain overwritting
* use default domain around experimentalUseDefaultDocumentDomain in main iframe and spec bridge iframes. Also adapt CORS policy to use same-origin if experimental flag is set
* run ci
* fix: add insertion of experimental flag where is was needed/missing
* chore: add system test to exercise experimental flag for expected behavior
* fix: fix issues with template updates to conform to squirrelly v7
* fix: update config tests to include new experimental flag
* run ci
* fix: trailing whitespace [run ci]
* chore: update snapshot
* run ci
* fix: update proxy unit tests to account for experimentalUseDefaultDocumentDomain
* run ci
* fix: Allow component tests with special characters in filepath (#25299)
feat: cut over experimental flag to take list of known problematic domains via string/glob pattern
run ci
chore: update system test and fix broken config
* fix: fix server unit and integration tests. integration tests should no longer use google to test against injection as we do not inject document.domain on google domains
* run ci
* run ci
* fix: server integration tests where google documents are expected to receive document.domain injection. Kept test same by changing URL
* run ci
* fix: update server test with mssing unupdated assertions
* run ci
* fix: turn off experimental flag by default while recommending sane defaults to users to configure
* run ci
* chore: fix typings [run ci]
* run ci
* chore: make experiment an e2e option only
* run ci
* chore: address comments in code review
* chore: rename experimentalUseDefaultDocumentDomain to experimentalSkipDomainInjection
* fix regression in shouldInjectionDocumentDomain utility function and add unit tests
* run ci
* chore: rename documentSuperDomainIfExists to superDomain [run ci]
* chore: address comments from code review
* chore: just pass opts through to policyForDomain
* run ci
Co-authored-by: Mike Plummer <mike-plummer@users.noreply.github.com>
* fix: Improve TypeScript support for custom queries
* Typo fix
* Fix TS more
* Move 'ensures' off of cy and onto Cypress
* Type fixes
* One missed replacement
* Test fixes
* Properly pass in to ensureRunnable
* Add .eslintignores to quiet down warnings
* Review feedback
* Update cli/types/cypress.d.ts
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
BREAKING CHANGE: Cookie commands now use the the hostname and not the superdomain for the domain by default. This may affect what cookies are returned/set/cleared by cookie commands.
* feat: re-enable Run All Specs (#24683)
* fix: disable query in run-mode
* feat: Run-all-specs-ui (#24738)
* wip run-all-specs-ui
* added component tests for specs-list, inline-specs-list, and run-all-specs
* updated tests for specslist, inlinespeclist, and runAllSpecs
* simplify test
* make prop with default value optional
* enable run all specs
* use named slot for clarify
* use Record type
* remove un-necessary dynamic component
* use group and hover to inline css
* fix tests
* fix tests and use snapshot for style testing
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
* fix typescript
* fix test
* build binary for run all specs
* fix: tweaks for Run All Specs (#24746)
* update ui [skip ci]
* change types to reflect run all specs is e2e only
* chore: separate run all specs components
* fix typescript error
* fix: run-all UI tweaks and keyboard nav (#24757)
Closes undefined
* fix UI test
* move listener and use i18n [skip ci] (#24761)
* fix: run-all-specs duplicate file-matching (#24763)
* chore: limit linting [skip ci]
* do not get separator until app is loaded
* fix test
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
Co-authored-by: amehta265 <65267668+amehta265@users.noreply.github.com>
* feat: Commands.addSelector, and migrate .get() to be a selector
* Fix for failed tests
* Last test fix
* More test fixes
* Self review changes
* Remove the concept of prevSubject from selectors entirely
* Rename addSelector to addQuery
* Quick fix for last commit
* Fix TS
* Fix merge from develop
* Add types and other review updates
* Increase timeout to try fixing flakiness
* Rename addQuery to _addQuery
* Fix typo in previous commit
* Fix TS
* Include AUT assertion in cy.get()
* Fix for previous commit
* Review feedback
* Minor test improvement
* Swifter failure on sizzle syntax error
* Better solution for refetching current subject in verifyUpcomingAssertions
* Command IDs now include their chainerId
* Revert "chore: Revert "feat: _addQuery() (#23665)" (#24022)"
This reverts commit f399994e9f.
* feat: move .contains() and .shadow() to be queries; remove cy.ng() (#23791)
* First stab at removing old .get() implementation
* Fix TS and a couple of tests
* Fix tests and TS
* Fix case-sensitivity for .contains()
* Stop TS complaining
* Rework cy-contains jquery expression
* Add comments, make ts happy
* Fix one test, review feedback
* Review updates
* Fix additional tests
* Fix accidental deletion of vital code
* One more try at getting logs right
* Fix race condition in cross-origin .contains
* Add commented out test to ensure .within() works properly with selectors
* Fix for sessions + query subject chaining
* Fix mixing .within() shadow DOM and .contains() in same chainer
* One more attempt at .within + .contains
* Fix rebase commits
* feat: addQuery Remaining Queries (#24203)
* First stab at removing old .get() implementation
* Fix TS and a couple of tests
* Fix tests and TS
* Fix case-sensitivity for .contains()
* Stop TS complaining
* Rework cy-contains jquery expression
* Add comments, make ts happy
* Fix one test, review feedback
* Review updates
* Fix additional tests
* Fix accidental deletion of vital code
* One more try at getting logs right
* Fix race condition in cross-origin .contains
* Add commented out test to ensure .within() works properly with selectors
* Fix for sessions + query subject chaining
* Fix mixing .within() shadow DOM and .contains() in same chainer
* One more attempt at .within + .contains
* Fix rebase commits
* Update many commands to be queries; improve log message around invalid subjects
* Update connectors, location, focused and window commands to queries
* Return noop to a command and not a query (to avoid implicit assertions)
* More test fixes
* Fix test failures
* Fix for weird-ass frontend-component test
* Error message improvements
* Fix for broken system test
* Update withinSubject to use subject chain
* Test clarifications
* Unbreak cypress-testing-library via withinState backwards compatibility
* Typo in last commit
* Improvement for assertion following failed traversal
* feat: Fix detached DOM errors for all Cypress commands (#24417)
* First stab at removing old .get() implementation
* Fix TS and a couple of tests
* Fix tests and TS
* Fix case-sensitivity for .contains()
* Stop TS complaining
* Rework cy-contains jquery expression
* Add comments, make ts happy
* Fix one test, review feedback
* Review updates
* Fix additional tests
* Fix accidental deletion of vital code
* One more try at getting logs right
* Fix race condition in cross-origin .contains
* Add commented out test to ensure .within() works properly with selectors
* Fix for sessions + query subject chaining
* Fix mixing .within() shadow DOM and .contains() in same chainer
* One more attempt at .within + .contains
* Fix rebase commits
* Update many commands to be queries; improve log message around invalid subjects
* Update connectors, location, focused and window commands to queries
* Return noop to a command and not a query (to avoid implicit assertions)
* More test fixes
* Fix test failures
* Fix for weird-ass frontend-component test
* Error message improvements
* Fix for broken system test
* Update withinSubject to use subject chain
* Test clarifications
* Unbreak cypress-testing-library via withinState backwards compatibility
* Typo in last commit
* Improvement for assertion following failed traversal
* WIP adding query support to
* More work on actionability + detached dom
* Fix TS, rename _addQuery to addQuery
* Another try to fix types
* Fix lint
* Fix for bad merge
* Fixes for a couple more tests
* Increase timeout 50ms -> 100ms on certain tests failing in CI
* Switch to new branch of cypress-testing-library
* Update lockfile
* Fix yarn.lock with latest version of forked testing-library
* More test fixes
* Fix TS again
* Increase test assertion timeout so it passes on slow browsers (webkit)
* Apply suggestions from code review
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Zach Bloomquist <git@chary.us>
* More review changes
* Fix selectFile tests based on updated error message
* Improve types and type comments for Commands.add
* Undo change to Commands.add types
* Update yarn lockfiles again
* Remove overwriteQuery from Cy12; .focused() now respects passed in timeout
* Update cli/types/cypress.d.ts
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
* Restore .uncheck() tests
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Zach Bloomquist <git@chary.us>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
* Fix for hanging driver test after merge
* Fix for app component test
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
Co-authored-by: Zach Bloomquist <git@chary.us>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
* fix: remove server and route commands
* This won't totally pass but it's a step in the right direction.
* Should be down to only two failing tests due to abort.
* fix the alias.<thing> api for intercept to be equivalent to route.
* adjust timeouts to reduce flake, ideally
* skip xhr abort tests
* More clean up
* Increase timeout
* trick next version
* fix unit tests probably
* yeah sure
* Apply suggestions from code review
Co-authored-by: Blue F <blue@cypress.io>
* remove addXhrLog
* Remove more usage of XHR stemming from proxy-logging
* Remove a couple of files that found their way back with the merge from release/12.0.0
* remove more server types
* increase timeouts again to prevent flake
Co-authored-by: Blue F <blue@cypress.io>
Co-authored-by: Zach Bloomquist <git@chary.us>