Commit Graph

542 Commits

Author SHA1 Message Date
Bill Glesias
d39eee3776 chore: patch dtslint to work until we can find a replacement (#32383) 2025-08-28 17:18:34 -04:00
Jennifer Shehane
90310ae7f9 feat: extend Cypress.Keyboard.Keys and cy.press to support (almost) all keyboard keys (#31496)
* feat: extend Cypress.Keyboard.Keys and cy.press to support all keyboard keys

* Update cli/types/cypress.d.ts

* reference urls for codepoints

* type defs for expanded keys; tests

* changelog

* rm modifier keys temporarily - see WIP @ feat/key-press-modifier-keys

* Add pr link to changelog

* reduce repetition with key codes; remove unsupported capslock keycode

* only "key" special function keys in Cypress.Keyboard.Keys - otherwise, support any single character even if multiple codepoints

* do not refocus on f6 - f6 behavior keyup is indeterminate, so do not assert in that special case

* clean up keyboard key types, clean up duplicate def from merge

* various cleanup - wip - need multi-codepoint fix

* support multi-codepoint characters

* properly dispatch each part of a multipart utf-8 character

* fix import

* fix dtslint

* tscheck

* fix spacing

* Apply suggestions from code review

* changelog

* changelog

* ensure input actions are released in bidi; add test for keypress and input events for firefox

* fix keypress & input events in chrome

* consistent debug

* rm debug logging from input fixture

* some typos, changelog version

* fix toSupportedKey guard fn to properly reject non-strings

* add Space as named key, remove warnings re legacy firefox

* fix space

* support single-digit number keys

* remove support for F-keys

* add test cmd to types pkg

* rm failing vitest project config

* fix changelog

* clean up types a bit for single digit numbers

* more updates

---------

Co-authored-by: Cacie Prins <cacie@cypress.io>
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
2025-08-28 10:31:49 -04:00
Bill Glesias
a3924071c1 Merge branch 'develop' into merge_develop_15 2025-08-05 16:23:25 -04:00
Jennifer Shehane
788dfd1c0b chore: bump firefox version we test against to 141 (#32078)
* chore: bump firefox version we test against to 141

* account for unspecified sameSite which is now available in firefox 140

* fix expected error string for invalid cookie

* override FORCE_FIREFOX_CDP firefox 141

* fix cdp override in ff 141+

* maybe fix cookeie system tests? seem to time out locally

* set family as well as name

* fix system tests fore ff 141

* fix ff deprecation

* rm erroneous err param

* assume firefox is modern in cookies driver e2e test

* Update system-tests/lib/system-tests.ts

* we do still run tests against firefox 134

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Cacie Prins <cacie@cypress.io>
2025-08-05 13:00:30 -04:00
Jennifer Shehane
4215983252 breaking: Move getSelector and reset to private methods on ElementSelector API (#32098)
* breaking: Move getSelector, getSelectorPriority, and reset to private methods on ElementSelector API

BREAKING: Move getSelector, getSelectorPriority, and reset to private methods on ElementSelector API

* Update getSelectorPriority back to public method

* Update error message + changelog for removed method

* mention this PR in changelog
2025-07-29 16:21:54 -04:00
Jennifer Shehane
850989e1b4 feat: Rename SelectorPlayground API to ElementSelector API (#31889)
* feat: Rename SelectorPriority API to ElementSelector API

BREAKING: Rename SelectorPriority API to ElementSelector API

* bump unique-selector + remove restriction on type of prop

* rename file + remove test

* rename and add types to files

* save file

* fix types

* Add error when Cypress.SelectorPlayground is called to suggest renaming

* Add better description of ElementSelector API

* Error on invalid selector priority types

* changelog entry

* Update types to match exact type of selectorPriority

* remove semicolon

* Add feature description for separate feature

* remove the other semicolon

* Update types to use official cypress types

* Add other issue that this PR resolves.

* add name to selector priority

* alphabetize strings in selectorPriority types
2025-06-26 11:08:12 -04:00
Jennifer Shehane
a43873832a merge develop 2025-05-14 09:59:16 -04:00
Tim Griesser
8f8bb60878 fix: Update cy.press signature to be Chainable (#31698)
* Update cy.press signature to be Chainable

Since it's added via `Commands.add`, I believe `cy.press` should have a return type of `Chainable<null>` rather than `void`

* Update first_spec.cy.js

Updated test for chainable

* use addAll rather than add to avoid type check

* fix unit test

* Add cli entry

* update changelog

---------

Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2025-05-14 09:52:28 -04:00
Jennifer Shehane
10c6656ed6 misc: Remove migration UI, warnings, and errors for changes pre-Cypress 10 (v15) (#31629)
* begin removing migration code

* remove migration query

* add back actions

* remove more migration references

* more migration removals

* remove call to migration

* remove gqp-Migration file

* updates to remove migration

* update type

* remove a lot more migration code - especially errors

* Remove other errors/warnins for versions before 10.x

* update error snapshots

* fix some tests

* index on remove-migration: 49fa75ab78 Merge branch 'remove-migration' of https://github.com/cypress-io/cypress into remove-migration

* index on remove-migration: 49fa75ab78 Merge branch 'remove-migration' of https://github.com/cypress-io/cypress into remove-migration

* index on remove-migration: 49fa75ab78 Merge branch 'remove-migration' of https://github.com/cypress-io/cypress into remove-migration

* remove more system tests and references

* fix call to refreshMetaState which was lost at initialization

* rearrange some system tests to not be dependent on migration

* update welcome version test

* fix wording of messaging

* skip irrelevant test

* fix failing assertion

* remove tests around cypress-plugin-retries

* Remove test from config_spec

* Remove screenshot from snapshot

* fix tests + remove more migration projects

* remove + update system tests

* remove + update system tests

* remove some invalid dev-server: start errors

* remove references and tests around pluginsFile which was removed

* remove some more invalid config examples

* Add changelog entry

* fix changelog link

* fix unit test

* index on remove-migration: 490ddb134c Merge branch 'release/15.0.0' into remove-migration

* index on remove-migration: 490ddb134c Merge branch 'release/15.0.0' into remove-migration

* index on remove-migration: 490ddb134c Merge branch 'release/15.0.0' into remove-migration

* run all binary/windows tests on this branch

* Update packages/scaffold-config/test/unit/detect.spec.ts

Co-authored-by: Bill Glesias <bglesias@gmail.com>

* Update packages/scaffold-config/test/unit/detect.spec.ts

Co-authored-by: Bill Glesias <bglesias@gmail.com>

---------

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
2025-05-12 13:17:32 -04:00
Jennifer Shehane
a621b422f3 Merge branch 'develop' into release/15.0.0 2025-05-05 09:36:42 -04:00
Jennifer Shehane
f58aabd320 breaking: Remove deprecated cy.stub(obj, method, fn) signature (#31548)
* breaking: Remove deprecated cy.stub(obj, method, fn) signature

BREAKING: Remove deprecated cy.stub(obj, method, fn) signature

* remove the code that supports 3 args of cy.stub

* changelog entry

* remove test for support of 3 arg signature

* link issue in changelog
2025-05-02 13:43:52 -04:00
Adam Stone-Lord
a5ba8c497c internal: (studio) initialize cloud studio asynchronously (#31469)
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Matt Schile <mschile@cypress.io>
2025-04-29 09:37:44 -04:00
Bill Glesias
346e80110a chore: merge develop into cypress release 15 branch (#31464)
* dependency: upgrade mocha to 7.2.0 (#31423)

* dependency: upgrade mocha to 7.2.0

* changelog entry

* remove the it.only from the mocha patch changelog that is triggering our stop-only check from passing

* skip patches folder with stop-only check

* remove extra bracket

* Update protocol_spec to reflect new mocha line number for error stack trace

* chore: updating v8 snapshot cache (#31424)

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>

* chore: updating v8 snapshot cache (#31425)

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>

* chore: updating v8 snapshot cache (#31426)

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>

* chore: migrates plugin system test to a v3 extension (#31434)

* chore: Update Chrome (stable) to 135.0.7049.52 (#31428)

* chore: Update Chrome (stable) to 135.0.7049.52

* empty commit

---------

Co-authored-by: cypress-bot[bot] <41898282+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>

* chore: bump Firefox to 137 (#31431)

* chore: bump Firefox to 137

* use 137 version? weird.

* just kidding, major version only has 1 zero after it................

* dependency: update server to mocha 7.2.0 (#31432)

* dependency: update server to mocha 7.2.0

* Add PR to changelog

* chore: updating v8 snapshot cache (#31437)

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>

* chore: updating v8 snapshot cache (#31438)

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>

* chore: updating v8 snapshot cache (#31439)

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>

* chore: Update Chrome (beta) to 136.0.7103.17 (#31448)

* chore: Update Chrome (beta) to 136.0.7103.17

* empty commit

---------

Co-authored-by: cypress-bot[bot] <41898282+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>

* refactor: lifts toPosix to its own file, removes circular dependency between stack_utils and source_map_utils (#30983)

* refactor: lifts toPosix to remove circular dependency between stack_utils and source_map_utils

* camelCase to snake_case

* rm duplicated file

* internal: (studio) make the protocol database accessible to studio (#31443)

* internal: (studio) make the protocol database accessible to studio

* PR comment

* chore(deps): update dependency patch-package to v8 (#31451)

* chore(deps): update dependency patch-package to v8

* empty commit

* add types to handle json-stable-stringify dep change

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>

* chore: fix deprecation warnings and refactor react reporter to use functional components and hooks (#31284)

* chore: fix deprecation warnings and refactor react reporter to use functional components with hooks

* chore: update code to reflect feedback from code review

* fix issues with scrollIntoView() on updated component and refactor isOpen logic in collapsible to not attempt to sync state

* fix issues with tests after refactor

* see if event registration fixes windows flake

* chore: update snap-shot-core patch package file to match version (#31449)

* chore: update snap-shot-core patch package file to match version

* update circle cache

* experiment with removing .md from yarnclean

* add .md back to yarnclean

* bust circle cache

* remove .md files being cleaned from yarn to get around patch-package issue

* print size of cache

* try out the size of the .md

* remove md from yarnclean

* UPdate to version without removal of markdown files

* chore: updating v8 snapshot cache (#31460)

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>

* chore: updating v8 snapshot cache (#31462)

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>

* chore: updating v8 snapshot cache (#31461)

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>

* feat: cy.press() (#31398)

* wip - cy.press() command

* cy command for dispatching key press/down/up events

* unit tests and failure cases for cy.press()

* Cypress.Keyboard.Keys definition; fix command log message

* add keys to the internal keyboard type

* auto-focus in cdp

* ensure aut iframe is focused before dispatching key events in bidi browsers

* update tests for cdp focus

* fixed tests for bidi

* lint

* fix type ref in .d.ts

* linting

* skip press() driver test in ff below v135

* try all contexts for frame before failing due to missing/invalid context id

* ensure error is error before accessing props

* skip press driver test in webkit

* changelog

* debug automation middleware invocation for firefox flake

* debug

* cache update

* use bidi automation middleware from connectToNewSpec rather than constructor

* more comprehensive logging

* debug socket base, additional debug in automation

* install firefox automation middleware on setup as well as connectToNewSpec

* unit tests for firefox-utils

* proper calledWith

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>

* docs: update contributing requirements for corepack (#31463)

* chore: remove `du` check (#31465)

* chore: use different args for `du` in win

* rm du command for build

* chore: release 14.3.0 (#31467)

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: cypress-bot[bot] <41898282+cypress-bot[bot]@users.noreply.github.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
2025-04-08 14:46:30 -04:00
Cacie Prins
cfdeb7af14 feat: cy.press() (#31398)
* wip - cy.press() command

* cy command for dispatching key press/down/up events

* unit tests and failure cases for cy.press()

* Cypress.Keyboard.Keys definition; fix command log message

* add keys to the internal keyboard type

* auto-focus in cdp

* ensure aut iframe is focused before dispatching key events in bidi browsers

* update tests for cdp focus

* fixed tests for bidi

* lint

* fix type ref in .d.ts

* linting

* skip press() driver test in ff below v135

* try all contexts for frame before failing due to missing/invalid context id

* ensure error is error before accessing props

* skip press driver test in webkit

* changelog

* debug automation middleware invocation for firefox flake

* debug

* cache update

* use bidi automation middleware from connectToNewSpec rather than constructor

* more comprehensive logging

* debug socket base, additional debug in automation

* install firefox automation middleware on setup as well as connectToNewSpec

* unit tests for firefox-utils

* proper calledWith

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2025-04-08 09:23:18 -04:00
Ryan Manuel
0daf7e639f chore: support studio lifecycle in protocol (#31239)
* update url with studio params

* updates

* spec updates

* adding tests

* updating changelog

* skip adding visit log during start

* update url support

* cy origin tests

* fix tests

* updates

* update origin test

* chore: support studio lifecycle in protocol

* merge changes

* fix types

* fix tests

* fix tests

* fix tests

* fix more tests

* fix more tests

* fix more tests

* fix test

* fix bugs

* fix tests

* attempt to fix test

* further fixes

* improve cloud studio enablement

* refactoring

* remove new dom link

* fix last test

* Update packages/app/cypress/e2e/studio/studio.cy.ts

* Update packages/server/lib/project-base.ts

* Update packages/proxy/lib/http/request-middleware.ts

Co-authored-by: Matt Schile <mschile@cypress.io>

* PR comments

* fix build

* fix build

* update

* Update packages/server/lib/project-base.ts

Co-authored-by: Matt Schile <mschile@cypress.io>

* fix unit test

* rework save logic

---------

Co-authored-by: Matthew Schile <mschile@cypress.io>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2025-03-13 20:30:29 -05:00
Jennifer Shehane
667e319638 feat: Add Cypress.stop types to document its availability more publicly (#31225)
* misc: Add types for Cypress.stop

* Add changelog entry

* fix title of section in changelog
2025-03-07 12:43:12 -05:00
Jennifer Shehane
0d50a5d52f chore: Update more driver tests from js to ts (#31169)
* Convert sessions.cy.js file

* convert utils to ts

* update some more types

* update eq call

* fix test
2025-02-26 20:26:10 -05:00
Jennifer Shehane
1e7b596698 misc: Add some missing types + Convert js driver/query tests to ts (#31154)
* misc: Add some missing types + Convert js driver/query tests to ts

* changelog entry

* reuse partial

* Update cli/CHANGELOG.md

* Update call to querySelector to assign an identifier when checking for null
2025-02-24 13:21:53 -05:00
Jennifer Shehane
5bf42734b9 misc: update a few cypress types + convert internal driver tests to TypeScript (#31055)
* misc: update a few cypress types + convert internal driver tests to TypeScript

* Update packages/driver/cypress/e2e/commands/actions/scroll.cy.ts

* add changelog entry

* bump circle cache?

* More type fixes

* fix some more

* Make the values numbers

* Update cli/CHANGELOG.md

Co-authored-by: Bill Glesias <bglesias@gmail.com>

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
2025-02-17 13:06:40 -05:00
Cacie Prins
0547d65a2a breaking: no longer inject document.domain by default (#30770)
* remove experimentalSkipDomainInjection, add and deprecate injectDocumentDomain

* remove experimentalSkipDomainInjection, add injectDocumentDomain

* begin rethreading domain injection

* complete document domain transition

* move some cookie specs to separate test run

* origin and privileged commands with default docdom inject

* fix privileged channel when injecting document domain

* rm unnecessary .getOrigin abstraction in cors lib

* move remote-states in prep for refactor Replace Conditional with Polymorphism

* refactor remote states to strategy pattern

* cookie commands work as expected w cross origin bridge on different origins

* some origin tests updated

* run tests with document domain enabled

* run tests actually

* use correct config, swap conditional

* check-ts

* inject documetn domain for webkit tests

* do not exec injectDocumetnDomain in parallel

* fix ServerBase construction in tests to include cfg now

* pass cfg to ServerBase

* improved integration tests

* remove document domain checks for all server integration specs - will add injectDocumentDomain cases

* tests for injecting document domain when configured to

* square away server integration tests

* ensure cookies are set correctly, potentially

* errors pkg snapshots

* fix config tests

* fixing config tests

* somewhat improves tests for cors policies in packages/network

* fix ts err in server-base

* enable injectDocumentDomain for cy in cy tests

* fix Policy type ref

* refactor cypress-schematic ct spec to be less prone to timeouts

* run vite-dev-server tests with injectDocumentDomain

* rm document domain assertion from page_loading system test

* add system tests that test with injectDocumentDomain and others that test with cy.origin

* fix results_spec snapshot

* update experimentalSkipDomainInjection system test

* different behavior for certain net_stubbing tests based on injectDocumentDomain or not

* fix ts

* extract origin key logic from remote states, for now

* move server-base and response-middleware over to new pattern

* WIP - reentry

* fix build, remove console.log

* check-ts

* fix spec frame injection

* remove injection for localhost

* mostly fix vite-dev-server app integration tests

* fix codeframe in certain cases in chrome

* drop internal stack frames from stacks intended for determining code frame data

* some improvements to vite ct error codeframes

* fix proxy unit tests to use document domain injection util class

* rm .only

* fix all vite ct error specs

* rm console.log

* slight refactor to util class to make easier to test

* fix refactor - missing rename in files.js

* several tests do not set testingtype in config, so just check against component instead of checking for e2e

* revert changes to getInvocationDetails to see if that breaks tests

* re-enable stack stripping in invocation details for chrome

* new snapshots with more accurate invocation details

* test for same-site cross-origin cookie behavior

* ignore window.top ts errors

* revert forcing injectDocumentDomain in vite-dev-server cy config

* fix normalized whitespace for firefox "loading_failed" error

* always trim trailing wsp from stack before appending additional content

* force normalization of whitespace to three \n when adding additional stack details

* normalize wsp between stack and additional stack to "\n  \n" in firefox

* remove stack_utils attempt at normalizing wsp

* various cleanup: remove commented console logs, add more detailed comments

* add on links to error messages

* remove experimentalSkipDomainInjection from exported type defs

* Update system-tests/test/experimental_skip_domain_injection_spec.ts

Co-authored-by: Bill Glesias <bglesias@gmail.com>

* Update packages/driver/cypress/e2e/e2e/origin/cookie_misc.cy.ts

Co-authored-by: Bill Glesias <bglesias@gmail.com>

* no need to coerce a boolean value to a booleanc

* export base config from primary cypress config in driver for use in inject-document-domain test subset

* lift experimentalSkipDomainInjection breaking option to root

* rollback config/options changes

* rm invalid comment

* use hostname instead of origin to create cookie from automation cookie

* clarify stack regex in results_spec

* lint

* take a stab at the changelog entries for this

* Update cli/CHANGELOG.md

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* Update cli/CHANGELOG.md

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* reenable locally-failing test

* changelog

* snapshot updatesfor experimental skip domain injection err msg

* remove packageManager declaration in package.json

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2025-01-06 13:48:43 -05:00
Jennifer Shehane
636bed9cf7 merge develop 2024-12-02 09:42:47 -05:00
Bill Glesias
15c5761eb6 breaking: make JustInTimeCompile GA from experimentalJustInTimeCompile and default to true (#30641)
* pull support for JIT from vite since it doesn't have an affect for end users or performance (webpack only) [run ci]

rebase this

* remove the experimentalJIT flag and make it GA (default still false) [run ci]

* enable justInTimeCompile by default [run ci]

* chore: bump cache [run ci]
2024-11-21 15:25:59 -05:00
Alex Schwartz
82f45c51d6 feat: added ability to specify the default browser in cypress config (#30517) 2024-11-14 12:49:32 -07:00
Bill Glesias
c695f5fa16 breaking: remove support for @vue/cli-serivce from Cypress Component Testing [run ci] (#30585) 2024-11-12 14:13:36 -05:00
Matt Schile
249da654bd breaking: remove Svelte 3 support (#30572) 2024-11-08 22:10:47 -07:00
Bill Glesias
37b944f9b4 breaking: remove support for create react app for component testing as it is no longer maintained [run ci] (#30558) 2024-11-07 18:02:04 -05:00
Bill Glesias
bc39cb1103 breaking: remove nuxt2 support from Cypress Component Testing [run ci] (#30499) 2024-11-03 16:07:41 -05:00
Jennifer Shehane
0aa73c44d5 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
2024-11-01 11:04:00 -04:00
Jennifer Shehane
e18e66ae0e breaking: Remove experimentalFetchPolyfill flag (#30466)
* remove experimentalFetchPolyfill

BREAKING: remove experimentalFetchPolyfill

* Add changelog entry
2024-10-28 15:07:25 -04:00
Jennifer Shehane
93e53837a4 breaking: remove log:memory:pressure and firefox:force:gc APIs (#30331)
* remove foxdriver and force:gc/log:memory:pressure APIs

* Add changelog entry

* remove patched foxdriver file

* define types/spec FoundSpec without ref to Cypress namespace

* args

* chore: update unit test to still throw firefox cannot connect error if CDP fails to connect instead of the rtrying socket, which is no longer used when connecting to firefox

* Remove firefox-memory system test

---------

Co-authored-by: Cacie Prins <cacie@cypress.io>
Co-authored-by: AtofStryker <bglesias@gmail.com>
2024-10-03 15:11:36 -04:00
Bill Glesias
57f6110d29 feat: implement JIT component experiment (#30049)
* feat: implement JIT component experiment [run ci]

* don't update the dev server unnecessarily if the run is cancelled [run ci]

* fix system test flake

* Update cli/types/cypress.d.ts

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* Update system-tests/projects/experimental-JIT/webpack/cypress/support/component-index.html

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* Update system-tests/projects/experimental-JIT/vite/cypress/support/component-index.html

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* chore: ignore node_modules for webpack dev server

* be sure to end span when throwing error

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2024-08-22 10:56:55 -04:00
Scott McGinness
4ccdd860ea misc: Add generic types to net-stubbing for use in intercept and wait (#29508)
* misc: Add generic types to net-stubbing for use in intercept and wait

* misc: Add changelog entry (#29507)

* misc: Revert to `any` for Interception type of multiple waits (#29507)

The nested types were apparently not supported (as written) before TypeScript ~4.1.Remove them in favour of just using `Interception<any, any>` in this overload of `wait`.

* misc: Move changelog entry (#29507)

---------

Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-06-03 17:25:54 -04:00
Akshat Rajvanshi
45cff01df7 misc: ensure 'its' function type excludes null and undefined (#28872) (#28904)
* refactor: ensure 'its' function type excludes null and undefined (#28872)

This fix addresses an issue where the 'its' function could return null or undefined, causing unexpected behavior in certain scenarios. The change introduces a more robust type check to ensure that the returned value is always non-null and non-undefined.

* resolve linting issues related to TypeScript types

* Update changelog

* resolved lint errors

* Update cli/types/cypress.d.ts

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* Update cli/types/cypress.d.ts

* move to correct changelog entry

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
2024-04-23 12:38:02 -04:00
Nikita Barsukov
ede4a6fd60 chore: fix incorrect description of cy.clear command (#29339) 2024-04-17 10:26:42 -04:00
Ethan Setnik
d794f932fe docs: Add link to chromeWebSecurity read more (#29146)
* docs: Add link to chromeWebSecurity read more

* Update cli/types/cypress.d.ts

Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>

---------

Co-authored-by: Jennifer Shehane <shehane.jennifer@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-04-03 13:15:15 -04:00
Teo Anastasiadis
3e5fabce2c fix: Boolean and null literals should be considered valid request bodies (#28835)
* fix(types): RequestBody type should be able to accept booleans and null values, which are all valid JSON literals

* refactor: boolean literals are valid JSON objects. Null values should also be considered valid when explicitly passed to the request function.

* refactor: body is explicitly defined when passed as positional argument or when supplied through the options object

* test: JSON literals should be parsed as valid JSON and set json=true

* docs: issue reference

* fix: boolean and null literal should be send to request promise as strings

* docs: fixes #28789 -- added issue reference

* test: tests proper conversion of JSON literals to strings.

* docs: added isssue reference

* docs: fixes #28789 -- changelog entry

* refactor: change isValidJsonObj to isValidBody

Co-authored-by: Bill Glesias <bglesias@gmail.com>

* refactor: change isValidJsonObj to isValidBody

Co-authored-by: Bill Glesias <bglesias@gmail.com>

* refactor: use lodash utils

Co-authored-by: Bill Glesias <bglesias@gmail.com>

* Update cli/CHANGELOG.md

Co-authored-by: Bill Glesias <bglesias@gmail.com>

* docs: moved entry to 13.6.5

* docs: fixed changelog entry

* Update CHANGELOG.md

---------

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
2024-02-23 16:11:18 -05:00
Damien Sorel
a85f4897fe fix: incorrect typing of "dom.getContainsSelector" (#28339)
* fix: incorrect typing of "dom.getContainsSelector"

- add missing "options" parameter

* added type test

* fix changelog

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Matt Schile <mschile@cypress.io>
2024-02-05 13:56:11 -06:00
Jon Hermansen
099c4f1b44 misc: Add missing properties to Cypress.spec type (#28005)
* chore: Add missing properties to Cypress.spec type

* Integrate PR suggestions

* Make some fields optional to hopefully fix the build

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2024-01-17 14:53:06 -05:00
Jennifer Shehane
c6333ab03f misc: Update docs.cypress.io links to on.cypress.io (#28623)
* Update docs.cypress.io links to on.cypress.io

* misc: fix typo in link

* Update changelog

* update error snapshot
2024-01-05 09:14:17 -05:00
Sharmila Jesupaul
9f8dc10a08 dependency: remove @types/node as a dependency of cli (#28475)
* dependency: declare @types/node as a peerdep and allow >=16

Instead of pushing a pinned version of of types/node as a dependency on all consumer packages, allow any version of types/node that is supported by Cypress. It looks like cypress supports node v16 and up, so I set the peerdep semver to match that.

* Revert "dependency: declare @types/node as a peerdep and allow >=16"

This reverts commit 338fb8491e.

* dependency: remove @types/node as a dependency of cli

* Add changelog entry

---------

Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2024-01-02 13:16:56 -05:00
Chris Breiding
06b5ca280c misc: Ensure cypress tab is active before any command runs (#28334) 2023-11-16 13:09:35 -05:00
Chris Breiding
934f2157b3 chore: add after:browser:launch node event (#28180) 2023-11-06 17:32:39 -05:00
Tanmay Mohapatra
becb893f07 docs: Fix config option example typo in tooltip (#28174)
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
2023-11-01 11:14:40 -04:00
Bill Glesias
201e9f366e feat: experimental retries (#27930)
* chore: set up feature/test-burn-in feature branch

* feat: add burnIn Configuration option (currently a no-op) (#27377)

* feat: add the burnIn Configuration to the config package. Option
currently is a no-op

* chore: make burn in experimental

* chore: set experimentalBurnIn to false by default

* feat: add new experimental retries configuration (#27412)

* feat: implement the experimental retries configuration options to pair
with test burn in

* [run ci]

* fix cache invalidation [run ci]

* fix snapshot added in v13 for module api to include test burn in experimentalflag

* chore: fix merge conflict

* chore: add burnInTestAction capability (#27768)

* add burnInTestAction capability

* feat: add burn in capability for cloud

* chore: fix snapshot for record_spec

* feat: implement experimental retries (#27826)

* chore: format the retries/runner snapshot files to make diff easier

* feat: implement experimentalRetries strategies 'detect-flake-and-pass-on-threshold' and 'detect-flake-but-always-fail'. This should not be a breaking change, though it does modify mocha and the test object even when the experiment is not configured. This is to exercise the system and make sure things still work as expected even when we go GA. Test updates will follow in following commits.

* chore: update snapshots from system tests and cy-in-cy tests that now have the cypress test metadata property _cypressTestStatusInfo. tests have been added in the fail-with-[before|after]each specs to visually see the suite being skipped when developing.

* chore: add cy-in-cy tests to verify reporter behavior for pass/fail tests, as well as new mocha snapshots to verify attempts. New tests were needed for this as the 'retries' option in testConfigOverrides currently is and will be invalid for experiment and will function as an override. tests run in the cy-in-cy tests are using globally configured experimentalRetries for the given tested project, which showcases the different behavior between attempts/retries and pass/fail status.

* chore: add unit test like driver test to verify the test object in mocha is decorated/handled properly in calculateTestStatus

* chore: add sanity system tests to verify console reporter output for experimental retries logic. Currently there is a bug in the reporter where the logged status doesnt wait for the aftereach to complete, which impacts the total exitCode and printed status.

* fix: aftereach console output. make sure to fail the test in the appropriate spot in runner.ts and not prematurely, which in turn updates the snapshots for cy-in-cy as the fail event comes later."

* chore: address comments from code review

* fix: make sure hook failures print outer status + attempts when the error is the hook itself.

* chore: improve types within calculateTestStatus inside mocha.ts

* Revert "feat: add burnIn Configuration option (currently a no-op) (#27377)"

This reverts commit c428443079.

* Revert "chore: add burnInTestAction capability (#27768)"

This reverts commit ae3df1a505.

* chore: run snapshot and binary jobs against experimental retries feature branch

* chore: add changelog entry (wip)

* Revert "fix snapshot added in v13 for module api to include test burn in experimentalflag"

This reverts commit bb5046c91e.

* Fix system tests

* Clear CircleCI cache

* Normalize retries config for test execution

* Fixed some unit tests

* update snapshots for newer test metadata

* Fix cy-in-cy snapshots

* update snapshots

* bump cache version

* chore: ensure legacy retry overrides work; reject exp. retries overrides (#28045)

* update changelog

* flip if statement in experimental retries option validation

* refactor invalid experimental retry override for more useful error msg

* revert testConfigOverrides snapshot

* update snapshots for test override sys test

* Update packages/config/src/validation.ts

Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>

* succinct changelog entry; links to docs for details

* testConfigOverride system test snapshots

* Update .github/workflows/update_v8_snapshot_cache.yml

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* Update cli/CHANGELOG.md

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* Update packages/driver/src/cypress.ts

Co-authored-by: Ryan Manuel <ryanm@cypress.io>

* updating cache-version

* improve typescript usage when appending experimental retry options to experiments in Experimenets.vue

* Revert "improve typescript usage when appending experimental retry options to experiments in Experimenets.vue"

This reverts commit b459aba882.

* refactor test config override validation for experimental retry subkeys

* account for error throw differences in browsers in system tests

* bump circle cache

* bump circle cache again

---------

Co-authored-by: astone123 <adams@cypress.io>
Co-authored-by: mabela416 <mabel@cypress.io>
Co-authored-by: Muaz Othman <muaz@cypress.io>
Co-authored-by: Muaz Othman <muazweb@gmail.com>
Co-authored-by: Cacie Prins <cacie@cypress.io>
Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Matthew Schile <mschile@cypress.io>
2023-10-26 14:06:14 -04:00
Jim Hays
34c8b1f884 refactor: Spellcheck (#27964)
Co-authored-by: Matthew Schile <mschile@cypress.io>
2023-10-11 10:06:10 -04:00
Chris Breiding
cbf266c05e fix: Include run.stats.skipped in results (#27695)
Co-authored-by: Matt Schile <mschile@cypress.io>
2023-08-30 15:30:23 -04:00
Bill Glesias
1c6a2e130e BREAKING: add breaking changes/deprecations to cypress dependencies, such as typescript and node that may affect users moving forward on v13 (#27642) 2023-08-25 10:10:02 -04:00
Ryan Manuel
bb7b7c0657 Merge branch 'develop' into release/13.0.0 2023-08-25 09:02:04 -05:00
rewento
4288634e0b fix: Properly type Cypress and Chai globals as properties of the global object (#27540)
* 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>
2023-08-24 11:22:04 -04:00
Matt Schile
c1a8004924 chore: added support for --runner-ui and --no-runner-ui cli options (#27582) 2023-08-18 16:32:53 -06:00