Commit Graph

5713 Commits

Author SHA1 Message Date
Bill Glesias ce1dfc36e9 Merge branch 'develop' into feature/simulated-top-cookie-handling 2022-09-18 23:22:22 -04:00
Bill Glesias f356065ec4 feat: patch fetch and xhr inside cy.origin to get resourceType and credential Level (#23822)
* chore: modify xhr-fetch-requests to handle onload and prep for use in patches tests

* feat: add patches for fetch and xmlhttprequest

* chore: short circuit fetch and xmlHttpRequests if conditions aren't met

* chore: refactor xmlHttpRequest and fetch patches into individual files and add some basic types

* chore: fix typo
2022-09-18 23:22:12 -04:00
Bill Glesias 0c265638ce feat: add resource type header to CDP, extension, and electron (#23821)
* 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)
2022-09-18 22:28:32 -04:00
Adam Stone 466be9f1f0 fix: force Webpack to emit assets on error (#23844)
Co-authored-by: Zachary Williams <ZachJW34@gmail.com>
Co-authored-by: Stokes Player <stokes@cypress.io>
2022-09-16 16:43:07 -04:00
Emily Rohrbough a1faac76fd Merge branch 'develop' into sessions-instrument-panel 2022-09-16 11:04:56 -05:00
Emily Rohrbough 8f402854f5 Update packages/server/lib/experiments.ts
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2022-09-16 10:35:37 -05:00
Emily Rohrbough 4004d851b9 Merge branch 'develop' into cache-sessions-server 2022-09-16 10:35:12 -05:00
Lachlan Miller b9fec60604 fix(server): use correct property for spec name in CLI (#23794)
* use correct property in CLI

* use longer spec name everywhere in report

* snapshots
2022-09-16 16:39:28 +10:00
Stokes Player 314a0b2e0d feat: add cohorts for A/B testing in Specs List Banners (#23735) 2022-09-15 22:20:30 -04:00
Emily Rohrbough f49884fc46 Matts PR that just merged removed these tests 2022-09-15 13:52:38 -05:00
Emily Rohrbough 344ee2145e Merge branch 'develop' into cache-sessions-server 2022-09-15 13:08:47 -05:00
Emily Rohrbough ec9539c284 fix test 2022-09-15 13:02:07 -05:00
Emily Rohrbough ce0bcdb1ff Merge branch 'develop' into sessions-instrument-panel 2022-09-15 12:45:47 -05:00
Matt Henkes 6ee305ba41 feat: Allow cy.visit to visit cross origin sites. (#23297)
* 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>
2022-09-15 12:28:27 -05:00
Emily Rohrbough c0278fc9ae Merge branch 'develop' into cache-sessions-server 2022-09-15 10:11:43 -05:00
Zach Bloomquist 12406c4e26 chore: use a file for cache versioning and not env (#23811)
Co-authored-by: Rachel <Raquel.rudermano@gmail.com>
2022-09-15 14:59:18 +00:00
Emily Rohrbough 4e22b4b587 apply pr feedback 2022-09-14 15:35:58 -05:00
Emily Rohrbough 1b566fc4cc Merge branch 'develop' into sessions-instrument-panel
# Conflicts:
#	packages/reporter/src/sessions/sessions.tsx
2022-09-14 15:22:33 -05:00
Emily Rohrbough 81f24cb2ea and this was removed / unused 2022-09-14 15:15:11 -05:00
Emily Rohrbough df456e0efc whoops 2022-09-14 15:14:27 -05:00
Emily Rohrbough 07e56612d3 fix types 2022-09-14 12:52:34 -05:00
Emily Rohrbough 1e4a50c055 fix tests 2022-09-14 12:16:53 -05:00
Emily Rohrbough 821150517d Merge branch 'develop' into cache-sessions-server
# Conflicts:
#	packages/app/src/runner/event-manager.ts
#	packages/runner/src/studio/studio-recorder.js
#	packages/types/src/driver.ts
2022-09-14 11:49:59 -05:00
Emily Rohrbough ec73258db6 Merge branch 'cache-sessions-server' of https://github.com/cypress-io/cypress into cache-sessions-server 2022-09-14 11:45:10 -05:00
Emily Rohrbough 5ce5f38b98 rename for clarity per feedback 2022-09-14 11:44:27 -05:00
Emily Rohrbough 880c9b7731 Update packages/app/src/runner/event-manager.ts
Co-authored-by: Matt Schile <mschile@cypress.io>
2022-09-14 10:01:30 -05:00
Emily Rohrbough 1fc740eb3f Update packages/app/src/runner/event-manager.ts
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2022-09-14 10:01:24 -05:00
Adam Stone fada0be117 chore: fix flake for experimentalStudio config error test (#23800) 2022-09-13 15:14:27 -04:00
Rachel 1190c3ef0a chore: various flaky + a11y improvements (#23745)
Co-authored-by: Mark Noonan <mark@cypress.io>
2022-09-13 12:02:17 -07:00
Emily Rohrbough 75a9f96a30 chore: destroy source maps consumers when spec finishes (#23708)
Co-authored-by: Blue F <blue@cypress.io>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
2022-09-13 09:10:35 -05:00
Mark Noonan 25a47aa5db fix: only adjust autoscrolling in interactive mode (#23053)
Co-authored-by: Lachlan Miller <lachlan.miller.1990@outlook.com>
2022-09-13 09:17:23 -04:00
Zach Bloomquist 566a1a208c feat: gate WebKit behind experimentalWebKitSupport in prod (#23711) 2022-09-13 01:56:13 +00:00
amehta265 f07a49b861 chore: updated styling for configuration files (#23781) 2022-09-12 18:04:50 -04:00
Tyler Biethman 405e7f7ccb chore(webkit): update error stack parsing and related system tests (#23730)
* chore(webkit): update error stack parsing and related system tests

* Adding better comment

* Putting column back. Indexing at 1.

* Let's wait for WebKit fixes to land for this

* Using default name/location values already used in stack enhancing logic

* Incorrect bracket in regex

* Trying without location, as the fake location causes more problems downstream.

* Loosening regex around locations in stack replacement

* Defaulting location sans row/column

* Parsing stack lines for reporter with unique regex

* D'oh

* Making the validation against '<unknown>' more specific

* Don't want a capture group here

* Updating spec_isolation system tests

* Consolidating regex pattern to errors package

* Can just keep this global now

* Simplifying regex. Removing lineAndColumn numbers from unknown locations.

* Updating system test stack regex

* Getting better baseline

* Revert "Updating system test stack regex"

This reverts commit 2b91eff369.

* Forking normalization for webkit to track down diffs

* Ensure line or column are set before rendering in enhanced stack

* Need to be a little more flexible

* Tweaking leading newline detection

* Trying out new composed regex

* Few more tweaks for multiple leading newlines and file locations without function name

* Updating remainderOfStack pattern with proper escaping

* Cleaning up comments

* Filtering native code from absolute path logic

* Rebuild CI after outage
2022-09-12 15:40:12 -05:00
Mark Noonan 282e6c07b3 fix: login/utm param bug fixes and test coverage (#23787) 2022-09-12 16:38:37 -04:00
Adam Stone 7c6c231322 fix: force forward slash to backslash on Windows in spec search input (#23776) 2022-09-12 15:07:58 -04:00
Mike Plummer 043ab9ae92 fix: Update name of debug logger (#23780) 2022-09-12 13:25:42 -05:00
amehta265 d2d16265fc chore: Error config files should be collapsed during onboarding (#23756) 2022-09-12 11:26:59 -04:00
rockindahizzy 232173b145 fix: Add polyfill for Chrome V65+ (#23689)
* fix: Add polyfill for Chrome V65+

* Improve targets def

* Improvement to keep bundle size down https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#modernpolyfills

* Add version to browser-version to integration test driver against min chrome version

* Polyfill all modules & add all supported browser's min versions

* Add flag to prevent a legacy chunk being created for all assets. This dramatically reduces bundle size
2022-09-12 11:11:34 +10:00
Lachlan Miller d8d0ae5787 chore: skip flaky test for now (#23742)
* chore: fixing flake

* comment out flaky test

* revert

* add link to issue [skip ci]
2022-09-12 10:20:48 +10:00
Emily Rohrbough 499c0d1566 perf: pull log attributes from test instead of storing log attrs multiple times (#23738) 2022-09-09 16:38:13 -05:00
Bill Glesias b28bbcf56f feat: add MaybeSimulateSecHeaders code to prevent 403 issues with google (#23720) 2022-09-09 16:38:02 -04:00
Rachel 406eb069a6 fix: issue-7715 (#23575)
Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>
2022-09-09 11:36:19 -07:00
Bill Glesias afb8e67a0b fix: also set electron user agent through CDP. see #23597 (#23721) 2022-09-09 13:21:43 -04:00
Lachlan Miller 23d52af3a2 chore: update eventemitter2 and vite deps (#23740) 2022-09-09 08:14:41 -05:00
Emily Rohrbough e32e3638df fix: suite-level-only configuration does not throw when config is restored (#23646) 2022-09-08 21:19:04 -05:00
Emily Rohrbough 0f00d4ca60 perf: remove stale runnables obj (#23737) 2022-09-08 17:19:13 -05:00
Mike Plummer 9abbbe61af feat: Banner Analytics (#23691)
Co-authored-by: astone123 <adams@cypress.io>
2022-09-08 16:37:09 -05:00
Emily Rohrbough 8552e505ea perf: only collect logs when reporter should show logs (#23729) 2022-09-08 15:12:13 -05:00
Blue F 28b68af003 fix: Prevent assertion text from osscilating when it has a trailing space (#23727) 2022-09-08 10:04:08 -07:00