* feat: add X-Cypress-Request header in extension
* feat: add X-Cypress-Request header in CDP
* feat: add X-Cypress-Request header in electron
* feat: add ExtractRequestedWithAndCredentialsIfApplicable middleware stub to remove the newly added x-cypress-request header
* chore: change defaultHeaders variable name to requestModifications to more accurately reflect usage
* chore: condense ExtractIsAUTFrameHeader and ExtractRequestedWithAndCredentialsIfApplicable into ExtractCypressMetadataHeaders middleware
* test: add anti assertion for x-cypress-request and remove setting request verbage (as it does nothing yet)
* Initial async changes
* Small fixes and test updates.
* updating tests
* Fixes for cookie login tests
* remove the onlys
* Most tests passing
* Fix driver tests?
* fix firefox test?
* fix unit tests
* fix tests??
* a better check
* fix integration tests
* minor cleanup
* Comment out tyler fix for 10.0 origin issue
* also fix integration tests
* remove fixmes
* Adding Retries for cookie actions. May break other error tests.
* Address (some) PR comments
* update to warn about cross origin command AUT in assertions
* Fix type errors
* Move document.cookie patch to injection
* Adding iframe patching.
* forward errors prior to attaching
* Add error message when using visit to visit a cross origin site with the onLoad or onBeforeLoad options.
* Attempt to fix test errors.
* more fixes, but not all
* use the origin policy
* Fix types
* more fixes
* consider chromeWebSecurity when checking if you can communicate with the AUT
* firefox
* prevent hangs if before unload happens after on load.
* Fix some ToDos
* code cleanup
* remove quotes
* Code review changes
* more cr changes
* fix tests possibly
* for realz this time
* roll back change
* Fix some flake
* Fix flakey xhr test hopefully.
* oops, forgot communicator changes. need those.
* modify error message to not lose the original error
* read config right derp
* simpler check
* no unused vars
* don't put config on window
* Make isRunnerAbleToCommunicateWithTheAUT a util function instead of attaching it to cypress.
* fix a race condition maybe
* clear document when window is cross origin... we'll see if this breaks anything.
* Retry if querying against the wrong AUT
* use timeout
* Don't print the retrying string unless you're retrying due to command aut origin mismatch
* try handling undefined document
* Code review updates. What could go wrong??
* Apply suggestions from code review
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* minor fixes
* try aut location and move the async state collection.
* fix flake around the loading message, probably
* Fix system tests and some flake around redirect counts.
* Improve error handler prior to attaching.
* Code review suggestions
* use a generated ID when promisifying post message
* clean up promise helper
* skip xhr test until issue is resolved.
* Apply suggestions from code review
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
* use state directly
* Apply suggestions from code review
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* Update packages/driver/src/cypress/error_messages.ts
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
* chore: wire up Cypress Studio (#23413)
* wip
* wip
* wip - spike
* more wip [skip ci]
* update style
* fix ts
* move types around
* extract types
* lint
* fixing tests
* fix component test
* skip some tests
* do not error on experimentalStudio flag
* add studio controls placeholder
* fixing tests
* revert
* revert changes
* rename store
* rename method
* remove comment
* refactor
* correctly feature flag studio
* simplify code
* simplify code
* lift check into useEventManager
* correctly hide create studio prompt based on flag;
* remove superfulous css
* rename variables
* fix bugs
* wip
* unskip tests
* unskip more tests
* fix a bug in the assertion API
* fix bug in assertions [skip ci]
* wip - bugs [skip ci]
* feat: add experimentalStudio flag back (#23506)
Co-authored-by: astone123 <adams@cypress.io>
* chore: Add Studio UI to Cypress 10 (#23537)
* wip
* wip
* wip - spike
* more wip [skip ci]
* update style
* fix ts
* move types around
* extract types
* lint
* fixing tests
* fix component test
* skip some tests
* do not error on experimentalStudio flag
* add studio controls placeholder
* fixing tests
* revert
* revert changes
* rename store
* rename method
* remove comment
* refactor
* correctly feature flag studio
* chore: wip add barebones studio modals
* simplify code
* simplify code
* lift check into useEventManager
* correctly hide create studio prompt based on flag;
* remove superfulous css
* chore: style studio toolbar
* chore: misc feedback
* chore: remove studio store prop
* chore: studio URL prompt and other changes
* update component
* chore: UI styling and remove studio init modal
* chore: revert unnecessary changes
* chore: fix types
* chore: fix some tests, minor refactor (#23545)
* fix test
* fix test
* add noHelp link to StandardModal
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
* test: studio e2e tests (#23546)
* add basic e2e test
* add some e2e tests for studio and a note on limitations
* additional spec
* add more tests, refactor helper
* fix bug in studio
* remove test code
* chore: UI feedback
* fix race condition
* update tests
* rename test
* improve types in reporter
* remove dead code
* improve tests
* merge tests into one spec
* chore: Cap instruction modal width; exit studio mode when new spec is chosen
* chore: Only render studio error when test has failed; add test for studioEnabled
* correctly check if command is studio or not
* improve specs and hopefully reduce flake
* communicate studio state from app->reporter
* receive studio save state validity from app
* fix test
* improve test coverage
* fix external link
Co-authored-by: astone123 <adams@cypress.io>
* detect playwright-webkit browser
* fix: use stdio for CDP instead of TCP (#14348)
* wip: begin launchin webkit
* run mode works w webkit in 10.0
* reset previous cdp changes
* run driver webkit tests
* always detect webkit in non-prod
* fix version detection
* actually run new job
* cleanup
* fix run
* try caching pw binary
* npx install pw binary
* install-deps
* add experimentalSessionAndOrigin wk tests
* wk experimentalSessionAndOrigin tests
* browser icon
* fix some tests
* reset browsers.ts change
* fix more tests
* fix even more tests, skip driver CI for now
* comma
* fix server-unit-test
* fix websockets_spec
* refactor wkautomation to initialize self from static async method
* fix(proxy/prerequests): fix duplicate key behavior, fallthrough
* Apply suggestions from code review
Co-authored-by: Blue F <blue@cypress.io>
* simpler name for StackMap
* fix proxy-logging spec, some xhr specs
* fix last xhr test
* update testConfigOverrides
* skip webcam.cy.js
* reenable driver tests
* ci?
* Suggestions from code review
* skip remaining failures which won't be fixed here
* fix/skip a couple tests
* fix tests
* skip crashy specs
* skip hidden suites
* Scoping down range of skipped type tests
* Scoping down click test skips
* Updating webkit contenteditable selection handling and associated test
* Adding additional mouse event filtering when disabled. Validated by opening playwright-webkit outside of cypress and validating logged events when enabled/disabled.
* Updating click 'mouseout coords' tests to account for default style changes
* Updating a few more click 'mouse state' tests
* Getting all click tests passing with no webkit skips. Fixing _most_ type tests, selection focus is troublesome.
* Updating cross-origin type action test
* Tweaking coords for CI rendering
* Adding workaround for webkit default input selection.
* Webkit -> WebKit
* Adding logic and test for handling capture-phase focus event selections
* Type errors tests now passing
* Adding a couple more WebKit keyboard/mouse tweaks
* Couple more tweaks for special_chars tests.
* Updating contenteditable beforeinput event tests
* Making WebKit checks more consistent
* Don't expose webkit in public types
* Adding comments and doing a little cleanup
* PR updates
* Simplifying workaround for webkit focus selection
* Removing unnecessary test
* Revert "Removing unnecessary test"
This reverts commit 2c522935ec.
* Revert "Simplifying workaround for webkit focus selection"
This reverts commit 47d1155219.
* Removing comment that is no longer applicable
* Simplifying selection logic that is now functional for all supported browsers
Co-authored-by: Zach Bloomquist <git@chary.us>
Co-authored-by: Zach Bloomquist <github@chary.us>
Co-authored-by: Blue F <blue@cypress.io>
* revive logic to run CT in a single tab
* add feature flag: experimentalSingleTabRunMode
* remove log
* reset browser state between tests
* document single tab run mode experiment;
* add system test for experimental run mode
* fix snapshots
* use more simple project for testing
* additional guard;
* fix test
* Apply suggestions from code review
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
* destroy aut after each spec
* update snapshot
* fix types
* add experiment flag error
* add warning when using experimental flag with e2e
* build binaries for experimentalSingleTabRunMode feature
* build binaries take 2
* make error message more open ended
* destroy AUT later in run mode lifecycle
* add additional assertion around experimental flag
* simplify error
* remove test code from production code
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
* fix: escape backslashes in downloadFolder for Firefox on Windows
* fix import of doubleEscape in packages/server/lib/browsers/firefox.ts
Co-authored-by: Bill Glesias <bglesias@gmail.com>
* don't run ls command on Windows
* Revert "don't run ls command on Windows"
This reverts commit deec721b06.
* chore: add unit test to verify double escape behavior
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Rachel <rachel@cypress.io>
* Minimal fix, hacky repro
* Convert getRouteForRequest into a generator function
* Create separate test for reproducing the original issue
* Remove TODO, check .done property instead of .value
* Improve readability
Co-authored-by: Eiríkur Fannar Torfason <eirikur.torfason@gmail.com>
Co-authored-by: Tyler Biethman <tbiethman@users.noreply.github.com>
* feat: add modify obstructive user agent code for electron to strip electron and cypress out of the UA string.
* fix user agent destructuring error within unit tests
* remove explicit CDP command and opt for _setUserAgent. add test to not override passed in user agent via config
* add get user agent method to electron and update tests
* move user agent override in electron under experimentalModifyObstructiveThirdPartyCode over experimentalSessionAndOrigin
* move position of setting user agent to browser launch, hopefully fixing issues in CI with parallelization between parent/child processes
* update stale documentation and remove no longer necessary stub of getUserAgent
* add user agent to get user agent debug log
Co-authored-by: Matt Schile <mschile@gmail.com>
* fix(config): allow "additionalIgnorePattern" to be an array of string
Also set default value to "[]", to prevent issue when running E2E tests.
* chore(test): set "additionalIgnorePattern: undefined" for Cypress-in-Cypress config
* chore: update snapshots
* chore: update types for additionalIgnorePattern
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
* Adding prototype before-quit handler to handle async teardown.
* Getting binary builds
* Let's try this then
* Working the async changes backwards, hope I got them all. Unit tests will be a disaster currently.
* Actually getting build artifacts for testing
* Moving logic to server interactive/run
* fix: Fix some tests
* fix: Revert changes to circle config
* fix: Fix some tests
* fix: Fix more tests
* fix: Remove dead code comment
* fix: Fix ProjectDataSource tests
* fix: Add comment prefix
* fix: Remove comment and unnecessary async
* fix: Build Mac binary
* Reverting run changes
* Addressing PR comments. Cleaning up a few naming quibbles I had.
* Addressing TODO regarding onLoadError watcher cleanup.
* Correcting catch
* Fighting some unref errors on these catches
* Reverting making this private en lieu of binding
* Should have left these as instances, whoops
* Removing unnecessary test that was previously skipped
* Adding a couple cheap unit tests for the new interactive mode behavior
Co-authored-by: Tyler Biethman <tbiethman@gmail.com>
Co-authored-by: Tyler Biethman <tbiethman@users.noreply.github.com>
* fix: use graceful-fs always, warn in development on sync calls
* skip prop linting in some dirs
* eslint rules
* use AST-based lint rule instead
* comment
* ignore existsSync
* run without nextTick
* remove dev warning code
* fix order
* register TS first
* fix tests
* fix test
* cover new call site
* fix new test
* fix: Don't glob project path in supportFile lookup
* Updating unit tests around supportFile 'isFolder'
* Adding unit test to validate the projectRoot isn't globbed
* Adding system test to validate successful run
* This is more accurate
* Updating snapshot to reflect now missing absolute path from the supportFile value
* Adding e2 launchpad test
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
* fix: properly run multiple specs in run and headed mode on linux and windows
* fix: properly run multiple specs in run and headed mode on linux and windows
* Update test
* Update test
* Fix issue with running headed in linux and windows
* Improve test
* Update packages/server/lib/browsers/browser-cri-client.ts
* PR comments
* PR comments
* Fix test failure due to refactor
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
Co-authored-by: Matt Henkes <mjhenkes@gmail.com>