Skip to content
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: support done callback #19465

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Dec 22, 2021

User facing changelog

Additional details

The aim here is to allow done() to be executed from the switchToDomain function context. The catch here is that the switchToDomain function is executed on the spec bridge, which is missing the done function all together. When/if the function is invoked, an event is sent to the primary domain to invoke the done function. The goal here is to implement mostly core functionality of 'done' in cross domain.

This functionality currently supports calling done() from switchToDomain in both sync and async contexts. Errors can be passed in to done in the switchToDomain context. If done is called but not defined in the secondary domain, the error is correctly passed back to the primary domain.

There is still a lot to do that is outside the scope of this PR. Currently, cross domain stack traces are cryptic and debugging in the secondary domain isn't very obvious. More tests need to be added to verify some of the behavior on short circuited tests if done is called and the command queue isn't finished, which is likely appropriate for a 'cy-in-cy' test in the future. These test signatures will be stubbed out in the current multidomain_spec with a TODO comment as they will likely move in the future.

Update January 10th 2022

With #19577 being merged in, we have changed the implementation of switchToDomain to always take done as the second argument. It is now deterministic where a user intends to call done within their test, i.e. outside/inside the context of switchToDomain, solving a few issues we were running into with not knowing where done would be called, which would effect the secondary domain command queue. This method signature is subject to change in the future, and currently is solving the need of getting a basic implementation established for done in the secondary domain.

On an unrelated note, we were also running into issues with secondary domain html being cached by the browser. This caused issues when switchToDomain throws an error or does not have the opportunity to inject the spec bridge. The html without the injection would be cased, and served to a test where the injection was needed, ultimately resulting in a timeout on page load. To fix this, the spec bridge is always injected into the secondary domain when the switchToDomain context is used.

How has the user experience changed?

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • N/A Has a PR for user-facing changes been opened in cypress-documentation?
  • N/A Have API changes been updated in the type definitions?
  • Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 22, 2021

Thanks for taking the time to open a PR!

@AtofStryker AtofStryker linked an issue Dec 22, 2021 that may be closed by this pull request
@AtofStryker AtofStryker changed the base branch from chore/refactor-cross-domain-communications to issue-16777-refactor-cross-domain-communications December 22, 2021 21:42
@cypress
Copy link

cypress bot commented Dec 22, 2021



Test summary

19005 0 238 4Flakiness 1


Run details

Project cypress
Status Passed
Commit 7951892
Started Jan 11, 2022 5:06 PM
Ended Jan 11, 2022 5:18 PM
Duration 11:44 💡
OS Linux Debian - 10.10
Browser Multiple

View run in Cypress Dashboard ➡️


Flakiness

cypress/integration/commands/net_stubbing_spec.ts Flakiness
1 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@AtofStryker AtofStryker force-pushed the issue-19426-support-done-callback branch from 1fd3ab2 to 40e60bf Compare December 22, 2021 22:07
@AtofStryker AtofStryker force-pushed the issue-19426-support-done-callback branch 2 times, most recently from fa11d5e to b927eac Compare January 3, 2022 21:59
@AtofStryker AtofStryker self-assigned this Jan 4, 2022
@AtofStryker AtofStryker marked this pull request as ready for review January 4, 2022 15:00
packages/driver/src/cy/multidomain/index.ts Outdated Show resolved Hide resolved
packages/driver/src/multidomain/index.js Outdated Show resolved Hide resolved
Comment on lines 144 to 151
deferredDone.promise.then(({ crossDomainDoneCalled, error } = {
crossDomainDoneCalled: false,
error: undefined,
}) => {
if (crossDomainDoneCalled) {
done(error)
}
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for using a deferred? Couldn't we just invoke done directly from the done:called handler and it would achieve the same thing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b2def60

Base automatically changed from issue-16777-refactor-cross-domain-communications to issue-17253-remove-hardcoded-domain January 6, 2022 15:26
…occur 'i.e. done not defined' as well as errors being passed into done. Now executes eval functions as async and supports async switchToDomain function
… needs to remove the 'done:called' listener in the case of done being called in the primary domain. Also make sure the deferredDone promise is settled in the case done is provided but called in the primary domain
@AtofStryker AtofStryker force-pushed the issue-19426-support-done-callback branch from 98df202 to d04e496 Compare January 7, 2022 19:18
otherwise, the browser can cache the non-injected html and serve it for subsequent runs when it should injected into again
@AtofStryker
Copy link
Contributor Author

This is almost ready to go @chrisbreiding @mschile. There currently is a regression present in the commands/navigation/captures cross origin failures test where it looks like the cross domain script is being injected when the switchToDomain context is not used. I also need to update some server side unit tests, but once ready I will re request review!

@AtofStryker
Copy link
Contributor Author

This is almost ready to go @chrisbreiding @mschile. There currently is a regression present in the commands/navigation/captures cross origin failures test where it looks like the cross domain script is being injected when the switchToDomain context is not used. I also need to update some server side unit tests, but once ready I will re request review!

@chrisbreiding and I spoke and figured for now we will skip the cross origin failing test and address at a later date as it is getting a bit out of scope for this work.

… inject the multidomain script. Correct other tests to not pass argument shouldInject to ready:for:domain as wel no longer need it
Copy link
Contributor

@chrisbreiding chrisbreiding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outside of removing that comment, looks good!

@chrisbreiding chrisbreiding merged commit 39c5d1a into issue-17253-remove-hardcoded-domain Jan 11, 2022
@chrisbreiding chrisbreiding deleted the issue-19426-support-done-callback branch January 11, 2022 17:18
mschile added a commit that referenced this pull request Jan 17, 2022
commit 41030ff
Author: Bill Glesias <bglesias@gmail.com>
Date:   Thu Jan 13 16:29:52 2022 -0500

    address comments left in code review

commit 4356a78
Merge: 62486fb 2ee9893
Author: Bill Glesias <bglesias@gmail.com>
Date:   Wed Jan 12 10:57:43 2022 -0500

    Merge branch 'feature-multidomain' of github.com:cypress-io/cypress into issue-19545-fix-secondary-domain-command-state

commit 62486fb
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 16:26:44 2022 -0500

    add verification tests to make sure all logs stream in and there are no pending commands

commit 1593d70
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 16:26:22 2022 -0500

    refactor cleanup to async/await and update comments

commit aec4800
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 13:22:40 2022 -0500

    add lodash import to primary

commit e4921c2
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 13:05:43 2022 -0500

    add stubbed out tests for cy-in-cy and correct documentation

commit 336827f
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:55:26 2022 -0500

    remove redundant done commment in primary

commit 12e32f1
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:52:58 2022 -0500

    correct done test error name

commit ed360ae
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:48:03 2022 -0500

    update documentation within the multidomain primary

commit 7226f6e
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:45:31 2022 -0500

    remove unused log messages

commit 372df93
Merge: 89ff0bd 39c5d1a
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:32:11 2022 -0500

    Merge branch 'issue-17253-remove-hardcoded-domain' of github.com:cypress-io/cypress into logSerializationFixes

commit 39c5d1a
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:18:09 2022 -0500

    feat: support done callback (#19465)

    Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>

commit 7bce51a
Author: Chris Breiding <chrisbreiding@users.noreply.github.com>
Date:   Tue Jan 11 11:37:18 2022 -0500

    chore: Convert multi-domain file to TS and rename for consistency (#19601)

    * WIP: multi domain refactor event bus

    * refactor multidomain setup so cy/cypress are created once and not on every page load

    * use unique ids per origin for logs instead of trying to sync the counter

    * refactor postMessage/eventBus methods into the multidomain communicator to consolidate messaging logic. Add basic JSDocs to classes and methods within the communicator.

    * fix issue where event data being fed into the message listener is undefined

    * remove forgot about commented out code

    * use debug to log unexpected post messages

    * refactor and update types

    * move internal:window:load to internal types

    * accept data argument in switchToDomain and validate arguments

    * add experimentalMultiDomain flag and fail switchToDomain if not enabled

    * add types for switchToDomain

    * fix types

    * add experimental flag

    * remove comment

    * update config suite titles and snapshots

    * use message in error, update test for browser family

    * remove unnecessary return

    * convert src/multidomain/index.js to typescript

    * use consistent naming for multi-domain

    * remove some data

    * Multidomain -> MultiDomain

    * address PR feedback

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

commit 89ff0bd
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 11:03:14 2022 -0500

    clean up implementation of logChanged to make code more readable

commit d42bae3
Author: Bill Glesias <bglesias@gmail.com>
Date:   Mon Jan 10 18:18:55 2022 -0500

    command and log syncing should now work correctly

commit b6ca2f8
Author: Bill Glesias <bglesias@gmail.com>
Date:   Mon Jan 10 18:02:23 2022 -0500

    split out log:added log:changed and command:update into separate methods (still broken)

commit 7735c61
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 11:20:40 2022 -0500

    wrap cleanup code in finally block

commit 36956e6
Author: Bill Glesias <bglesias@gmail.com>
Date:   Thu Jan 6 16:53:07 2022 -0500

    allow logs to be deferrable to allow updates to stream in for commands
    that have just finished

commit b3276ec
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 11:19:48 2022 -0500

    use frame events to get frame tree instead of on prerequest

commit f59af60
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 10:06:16 2022 -0500

    remove unused reference

commit bf05812
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 10:05:11 2022 -0500

    move Page.enable so only chrome uses it

commit dfa3953
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 09:51:11 2022 -0500

    remove comment

    it's in another branch, but we're always injecting now

commit 127f893
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 09:50:22 2022 -0500

    remove aut iframe header before request is sent

commit 2471643
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 09:30:12 2022 -0500

    add/improve comments

commit 2bf3557
Author: Chris Breiding <chrisbreiding@users.noreply.github.com>
Date:   Fri Jan 7 12:51:21 2022 -0500

    chore: Finish switchToDomain implementation (#19577)

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

commit b45cf72
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 6 17:00:10 2022 -0500

    fix flakey downloads spec

commit 57d1150
Merge: e3f1eac a408b36
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 6 16:49:43 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit e3f1eac
Merge: 388bfa4 a42e601
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 6 14:18:55 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit 388bfa4
Author: Bill Glesias <bglesias@gmail.com>
Date:   Thu Jan 6 10:26:33 2022 -0500

    chore: refactor cross domain communications (#19430)

    Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>

commit 00dae70
Merge: 4f8ed47 ee6e105
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Jan 5 13:18:21 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit 4f8ed47
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Jan 5 09:51:58 2022 -0500

    update comment

commit 415e149
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 15:59:19 2022 -0500

    fix reference

commit 5cef955
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 14:59:50 2022 -0500

    revert window:load error wrapping

commit 3d28da1
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 14:51:33 2022 -0500

    fix type issue

commit 26e6cdf
Merge: c9c963d f2c6069
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 10:21:03 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit c9c963d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 10:14:43 2022 -0500

    don't signal stable if cross-origin w/o multi-domain api use

commit e2d7113
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 10:06:08 2022 -0500

    wrap errors from window:load handlers

commit ce03f5d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 16:45:24 2021 -0500

    fix failing on cross-origin error

commit abeb8ea
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 16:05:47 2021 -0500

    fix

commit 40fec59
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 15:05:32 2021 -0500

    fix confusing window:load handlers errors for cross-origin errors

commit d4fc457
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 15:05:01 2021 -0500

    fix tests and refactor a bit

commit d358f5d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 11:34:08 2021 -0500

    fix

commit 5bb2bcd
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 11:25:52 2021 -0500

    fix random cdp crash

commit a661fb7
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 11:25:39 2021 -0500

    refactor multiple events into single event

commit 9e86408
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 10:25:21 2021 -0500

    add timeout and fail if no switchToDomain after cross-domain navigation

commit 77335d4
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Dec 14 13:28:53 2021 -0500

    use cdp for adding is-aut header for chrome-like browsers

commit 16001aa
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 15:05:31 2021 -0500

    fix specs

commit 4d5822d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 14:15:12 2021 -0500

    chore: fix server unit tests running on mac by using actual tmp dir

commit f33abf6
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 11:25:05 2021 -0500

    add unit tests for adding aut frame header

commit 5ff39b6
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 10:40:02 2021 -0500

    mark frame request as is-aut instead of is-nested

commit e562423
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Fri Dec 10 15:07:37 2021 -0500

    only delay cross-domain requests for the AUT

commit cb342c0
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Fri Dec 10 15:06:06 2021 -0500

    fix proxy tests

commit 4c971d9
Merge: f61dc33 f716178
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 14:48:34 2021 -0500

    empty commit

commit f61dc33
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 14:42:44 2021 -0500

    chore: remove hard-coded domain for multi-domain

commit 673438e
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 13:29:57 2021 -0500

    fix typo from merge conflict

commit 0b2bad0
Merge: 80665f8 dacf0a5
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 13:01:02 2021 -0500

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 80665f8
Merge: d72dcb0 2c28961
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Nov 2 09:36:02 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit d72dcb0
Merge: 5efe34d c6d2918
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Nov 1 13:42:29 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 5efe34d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Nov 1 10:20:12 2021 -0400

    fix types and tests

commit 06312de
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Oct 21 11:25:34 2021 -0400

    create new signal for multidomain that doesn't abuse stability

commit 3b50afb
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 19 09:40:47 2021 -0400

    use this.debug

commit a700fab
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 19 09:34:46 2021 -0400

    use the domain

commit a311ba3
Merge: 00bb988 516100b
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 19 09:29:32 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 00bb988
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 5 12:24:19 2021 -0400

    remove anticipateMultidomain from rerun spec

commit 8d1c392
Merge: 516c919 8f11635
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 5 11:04:37 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 516c919
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 5 11:03:02 2021 -0400

    remove need for anticipateMultidomain

commit 75473c2
Merge: 0fb201a 9503b40
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Sep 29 09:14:42 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 0fb201a
Merge: aef4200 fb5ff06
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Sep 21 10:23:45 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit aef4200
Merge: a5e0ace cc66129
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Sep 16 09:20:57 2021 -0400

    Merge branch 'feature-multidomain' into issue-18043-multidomain-fix-rerun

commit a5e0ace
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Sep 14 09:36:36 2021 -0400

    chore: fix rerunning multidomain tests
mschile added a commit that referenced this pull request Jan 17, 2022
commit 4429a97
Author: Bill Glesias <bglesias@gmail.com>
Date:   Fri Jan 14 14:43:17 2022 -0500

    attempt at improving log types for Cypress.Log LogConfig

commit 8afea40
Author: Bill Glesias <bglesias@gmail.com>
Date:   Fri Jan 14 14:41:16 2022 -0500

    address code changes needed to address comments in code review

commit d9bcf32
Author: Bill Glesias <bglesias@gmail.com>
Date:   Fri Jan 14 10:54:33 2022 -0500

    address refactoring comments brought up in code review

commit 41030ff
Author: Bill Glesias <bglesias@gmail.com>
Date:   Thu Jan 13 16:29:52 2022 -0500

    address comments left in code review

commit 4356a78
Merge: 62486fb 2ee9893
Author: Bill Glesias <bglesias@gmail.com>
Date:   Wed Jan 12 10:57:43 2022 -0500

    Merge branch 'feature-multidomain' of github.com:cypress-io/cypress into issue-19545-fix-secondary-domain-command-state

commit 62486fb
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 16:26:44 2022 -0500

    add verification tests to make sure all logs stream in and there are no pending commands

commit 1593d70
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 16:26:22 2022 -0500

    refactor cleanup to async/await and update comments

commit aec4800
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 13:22:40 2022 -0500

    add lodash import to primary

commit e4921c2
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 13:05:43 2022 -0500

    add stubbed out tests for cy-in-cy and correct documentation

commit 336827f
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:55:26 2022 -0500

    remove redundant done commment in primary

commit 12e32f1
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:52:58 2022 -0500

    correct done test error name

commit ed360ae
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:48:03 2022 -0500

    update documentation within the multidomain primary

commit 7226f6e
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:45:31 2022 -0500

    remove unused log messages

commit 372df93
Merge: 89ff0bd 39c5d1a
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:32:11 2022 -0500

    Merge branch 'issue-17253-remove-hardcoded-domain' of github.com:cypress-io/cypress into logSerializationFixes

commit 39c5d1a
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:18:09 2022 -0500

    feat: support done callback (#19465)

    Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>

commit 7bce51a
Author: Chris Breiding <chrisbreiding@users.noreply.github.com>
Date:   Tue Jan 11 11:37:18 2022 -0500

    chore: Convert multi-domain file to TS and rename for consistency (#19601)

    * WIP: multi domain refactor event bus

    * refactor multidomain setup so cy/cypress are created once and not on every page load

    * use unique ids per origin for logs instead of trying to sync the counter

    * refactor postMessage/eventBus methods into the multidomain communicator to consolidate messaging logic. Add basic JSDocs to classes and methods within the communicator.

    * fix issue where event data being fed into the message listener is undefined

    * remove forgot about commented out code

    * use debug to log unexpected post messages

    * refactor and update types

    * move internal:window:load to internal types

    * accept data argument in switchToDomain and validate arguments

    * add experimentalMultiDomain flag and fail switchToDomain if not enabled

    * add types for switchToDomain

    * fix types

    * add experimental flag

    * remove comment

    * update config suite titles and snapshots

    * use message in error, update test for browser family

    * remove unnecessary return

    * convert src/multidomain/index.js to typescript

    * use consistent naming for multi-domain

    * remove some data

    * Multidomain -> MultiDomain

    * address PR feedback

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

commit 89ff0bd
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 11:03:14 2022 -0500

    clean up implementation of logChanged to make code more readable

commit d42bae3
Author: Bill Glesias <bglesias@gmail.com>
Date:   Mon Jan 10 18:18:55 2022 -0500

    command and log syncing should now work correctly

commit b6ca2f8
Author: Bill Glesias <bglesias@gmail.com>
Date:   Mon Jan 10 18:02:23 2022 -0500

    split out log:added log:changed and command:update into separate methods (still broken)

commit 7735c61
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 11:20:40 2022 -0500

    wrap cleanup code in finally block

commit 36956e6
Author: Bill Glesias <bglesias@gmail.com>
Date:   Thu Jan 6 16:53:07 2022 -0500

    allow logs to be deferrable to allow updates to stream in for commands
    that have just finished

commit b3276ec
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 11:19:48 2022 -0500

    use frame events to get frame tree instead of on prerequest

commit f59af60
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 10:06:16 2022 -0500

    remove unused reference

commit bf05812
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 10:05:11 2022 -0500

    move Page.enable so only chrome uses it

commit dfa3953
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 09:51:11 2022 -0500

    remove comment

    it's in another branch, but we're always injecting now

commit 127f893
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 09:50:22 2022 -0500

    remove aut iframe header before request is sent

commit 2471643
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 09:30:12 2022 -0500

    add/improve comments

commit 2bf3557
Author: Chris Breiding <chrisbreiding@users.noreply.github.com>
Date:   Fri Jan 7 12:51:21 2022 -0500

    chore: Finish switchToDomain implementation (#19577)

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

commit b45cf72
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 6 17:00:10 2022 -0500

    fix flakey downloads spec

commit 57d1150
Merge: e3f1eac a408b36
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 6 16:49:43 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit e3f1eac
Merge: 388bfa4 a42e601
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 6 14:18:55 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit 388bfa4
Author: Bill Glesias <bglesias@gmail.com>
Date:   Thu Jan 6 10:26:33 2022 -0500

    chore: refactor cross domain communications (#19430)

    Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>

commit 00dae70
Merge: 4f8ed47 ee6e105
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Jan 5 13:18:21 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit 4f8ed47
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Jan 5 09:51:58 2022 -0500

    update comment

commit 415e149
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 15:59:19 2022 -0500

    fix reference

commit 5cef955
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 14:59:50 2022 -0500

    revert window:load error wrapping

commit 3d28da1
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 14:51:33 2022 -0500

    fix type issue

commit 26e6cdf
Merge: c9c963d f2c6069
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 10:21:03 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit c9c963d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 10:14:43 2022 -0500

    don't signal stable if cross-origin w/o multi-domain api use

commit e2d7113
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 10:06:08 2022 -0500

    wrap errors from window:load handlers

commit ce03f5d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 16:45:24 2021 -0500

    fix failing on cross-origin error

commit abeb8ea
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 16:05:47 2021 -0500

    fix

commit 40fec59
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 15:05:32 2021 -0500

    fix confusing window:load handlers errors for cross-origin errors

commit d4fc457
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 15:05:01 2021 -0500

    fix tests and refactor a bit

commit d358f5d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 11:34:08 2021 -0500

    fix

commit 5bb2bcd
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 11:25:52 2021 -0500

    fix random cdp crash

commit a661fb7
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 11:25:39 2021 -0500

    refactor multiple events into single event

commit 9e86408
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 10:25:21 2021 -0500

    add timeout and fail if no switchToDomain after cross-domain navigation

commit 77335d4
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Dec 14 13:28:53 2021 -0500

    use cdp for adding is-aut header for chrome-like browsers

commit 16001aa
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 15:05:31 2021 -0500

    fix specs

commit 4d5822d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 14:15:12 2021 -0500

    chore: fix server unit tests running on mac by using actual tmp dir

commit f33abf6
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 11:25:05 2021 -0500

    add unit tests for adding aut frame header

commit 5ff39b6
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 10:40:02 2021 -0500

    mark frame request as is-aut instead of is-nested

commit e562423
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Fri Dec 10 15:07:37 2021 -0500

    only delay cross-domain requests for the AUT

commit cb342c0
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Fri Dec 10 15:06:06 2021 -0500

    fix proxy tests

commit 4c971d9
Merge: f61dc33 f716178
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 14:48:34 2021 -0500

    empty commit

commit f61dc33
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 14:42:44 2021 -0500

    chore: remove hard-coded domain for multi-domain

commit 673438e
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 13:29:57 2021 -0500

    fix typo from merge conflict

commit 0b2bad0
Merge: 80665f8 dacf0a5
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 13:01:02 2021 -0500

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 80665f8
Merge: d72dcb0 2c28961
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Nov 2 09:36:02 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit d72dcb0
Merge: 5efe34d c6d2918
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Nov 1 13:42:29 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 5efe34d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Nov 1 10:20:12 2021 -0400

    fix types and tests

commit 06312de
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Oct 21 11:25:34 2021 -0400

    create new signal for multidomain that doesn't abuse stability

commit 3b50afb
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 19 09:40:47 2021 -0400

    use this.debug

commit a700fab
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 19 09:34:46 2021 -0400

    use the domain

commit a311ba3
Merge: 00bb988 516100b
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 19 09:29:32 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 00bb988
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 5 12:24:19 2021 -0400

    remove anticipateMultidomain from rerun spec

commit 8d1c392
Merge: 516c919 8f11635
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 5 11:04:37 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 516c919
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 5 11:03:02 2021 -0400

    remove need for anticipateMultidomain

commit 75473c2
Merge: 0fb201a 9503b40
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Sep 29 09:14:42 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 0fb201a
Merge: aef4200 fb5ff06
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Sep 21 10:23:45 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit aef4200
Merge: a5e0ace cc66129
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Sep 16 09:20:57 2021 -0400

    Merge branch 'feature-multidomain' into issue-18043-multidomain-fix-rerun

commit a5e0ace
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Sep 14 09:36:36 2021 -0400

    chore: fix rerunning multidomain tests
mschile added a commit that referenced this pull request Jan 17, 2022
commit 0ef738b
Author: Bill Glesias <bglesias@gmail.com>
Date:   Fri Jan 14 18:28:43 2022 -0500

    make sure we have a reference to the changed log before trying to destructure object

commit 20a2922
Author: Bill Glesias <bglesias@gmail.com>
Date:   Fri Jan 14 18:17:56 2022 -0500

    refactor onLogChanged conditional to be more readable

commit aca778c
Author: Bill Glesias <bglesias@gmail.com>
Date:   Fri Jan 14 18:14:05 2022 -0500

    change command:update to command:end

commit 4429a97
Author: Bill Glesias <bglesias@gmail.com>
Date:   Fri Jan 14 14:43:17 2022 -0500

    attempt at improving log types for Cypress.Log LogConfig

commit 8afea40
Author: Bill Glesias <bglesias@gmail.com>
Date:   Fri Jan 14 14:41:16 2022 -0500

    address code changes needed to address comments in code review

commit d9bcf32
Author: Bill Glesias <bglesias@gmail.com>
Date:   Fri Jan 14 10:54:33 2022 -0500

    address refactoring comments brought up in code review

commit 41030ff
Author: Bill Glesias <bglesias@gmail.com>
Date:   Thu Jan 13 16:29:52 2022 -0500

    address comments left in code review

commit 4356a78
Merge: 62486fb 2ee9893
Author: Bill Glesias <bglesias@gmail.com>
Date:   Wed Jan 12 10:57:43 2022 -0500

    Merge branch 'feature-multidomain' of github.com:cypress-io/cypress into issue-19545-fix-secondary-domain-command-state

commit 62486fb
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 16:26:44 2022 -0500

    add verification tests to make sure all logs stream in and there are no pending commands

commit 1593d70
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 16:26:22 2022 -0500

    refactor cleanup to async/await and update comments

commit aec4800
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 13:22:40 2022 -0500

    add lodash import to primary

commit e4921c2
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 13:05:43 2022 -0500

    add stubbed out tests for cy-in-cy and correct documentation

commit 336827f
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:55:26 2022 -0500

    remove redundant done commment in primary

commit 12e32f1
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:52:58 2022 -0500

    correct done test error name

commit ed360ae
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:48:03 2022 -0500

    update documentation within the multidomain primary

commit 7226f6e
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:45:31 2022 -0500

    remove unused log messages

commit 372df93
Merge: 89ff0bd 39c5d1a
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:32:11 2022 -0500

    Merge branch 'issue-17253-remove-hardcoded-domain' of github.com:cypress-io/cypress into logSerializationFixes

commit 39c5d1a
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:18:09 2022 -0500

    feat: support done callback (#19465)

    Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>

commit 7bce51a
Author: Chris Breiding <chrisbreiding@users.noreply.github.com>
Date:   Tue Jan 11 11:37:18 2022 -0500

    chore: Convert multi-domain file to TS and rename for consistency (#19601)

    * WIP: multi domain refactor event bus

    * refactor multidomain setup so cy/cypress are created once and not on every page load

    * use unique ids per origin for logs instead of trying to sync the counter

    * refactor postMessage/eventBus methods into the multidomain communicator to consolidate messaging logic. Add basic JSDocs to classes and methods within the communicator.

    * fix issue where event data being fed into the message listener is undefined

    * remove forgot about commented out code

    * use debug to log unexpected post messages

    * refactor and update types

    * move internal:window:load to internal types

    * accept data argument in switchToDomain and validate arguments

    * add experimentalMultiDomain flag and fail switchToDomain if not enabled

    * add types for switchToDomain

    * fix types

    * add experimental flag

    * remove comment

    * update config suite titles and snapshots

    * use message in error, update test for browser family

    * remove unnecessary return

    * convert src/multidomain/index.js to typescript

    * use consistent naming for multi-domain

    * remove some data

    * Multidomain -> MultiDomain

    * address PR feedback

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

commit 89ff0bd
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 11:03:14 2022 -0500

    clean up implementation of logChanged to make code more readable

commit d42bae3
Author: Bill Glesias <bglesias@gmail.com>
Date:   Mon Jan 10 18:18:55 2022 -0500

    command and log syncing should now work correctly

commit b6ca2f8
Author: Bill Glesias <bglesias@gmail.com>
Date:   Mon Jan 10 18:02:23 2022 -0500

    split out log:added log:changed and command:update into separate methods (still broken)

commit 7735c61
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 11:20:40 2022 -0500

    wrap cleanup code in finally block

commit 36956e6
Author: Bill Glesias <bglesias@gmail.com>
Date:   Thu Jan 6 16:53:07 2022 -0500

    allow logs to be deferrable to allow updates to stream in for commands
    that have just finished

commit b3276ec
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 11:19:48 2022 -0500

    use frame events to get frame tree instead of on prerequest

commit f59af60
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 10:06:16 2022 -0500

    remove unused reference

commit bf05812
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 10:05:11 2022 -0500

    move Page.enable so only chrome uses it

commit dfa3953
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 09:51:11 2022 -0500

    remove comment

    it's in another branch, but we're always injecting now

commit 127f893
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 09:50:22 2022 -0500

    remove aut iframe header before request is sent

commit 2471643
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 09:30:12 2022 -0500

    add/improve comments

commit 2bf3557
Author: Chris Breiding <chrisbreiding@users.noreply.github.com>
Date:   Fri Jan 7 12:51:21 2022 -0500

    chore: Finish switchToDomain implementation (#19577)

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

commit b45cf72
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 6 17:00:10 2022 -0500

    fix flakey downloads spec

commit 57d1150
Merge: e3f1eac a408b36
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 6 16:49:43 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit e3f1eac
Merge: 388bfa4 a42e601
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 6 14:18:55 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit 388bfa4
Author: Bill Glesias <bglesias@gmail.com>
Date:   Thu Jan 6 10:26:33 2022 -0500

    chore: refactor cross domain communications (#19430)

    Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>

commit 00dae70
Merge: 4f8ed47 ee6e105
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Jan 5 13:18:21 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit 4f8ed47
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Jan 5 09:51:58 2022 -0500

    update comment

commit 415e149
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 15:59:19 2022 -0500

    fix reference

commit 5cef955
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 14:59:50 2022 -0500

    revert window:load error wrapping

commit 3d28da1
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 14:51:33 2022 -0500

    fix type issue

commit 26e6cdf
Merge: c9c963d f2c6069
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 10:21:03 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit c9c963d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 10:14:43 2022 -0500

    don't signal stable if cross-origin w/o multi-domain api use

commit e2d7113
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 10:06:08 2022 -0500

    wrap errors from window:load handlers

commit ce03f5d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 16:45:24 2021 -0500

    fix failing on cross-origin error

commit abeb8ea
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 16:05:47 2021 -0500

    fix

commit 40fec59
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 15:05:32 2021 -0500

    fix confusing window:load handlers errors for cross-origin errors

commit d4fc457
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 15:05:01 2021 -0500

    fix tests and refactor a bit

commit d358f5d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 11:34:08 2021 -0500

    fix

commit 5bb2bcd
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 11:25:52 2021 -0500

    fix random cdp crash

commit a661fb7
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 11:25:39 2021 -0500

    refactor multiple events into single event

commit 9e86408
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 10:25:21 2021 -0500

    add timeout and fail if no switchToDomain after cross-domain navigation

commit 77335d4
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Dec 14 13:28:53 2021 -0500

    use cdp for adding is-aut header for chrome-like browsers

commit 16001aa
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 15:05:31 2021 -0500

    fix specs

commit 4d5822d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 14:15:12 2021 -0500

    chore: fix server unit tests running on mac by using actual tmp dir

commit f33abf6
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 11:25:05 2021 -0500

    add unit tests for adding aut frame header

commit 5ff39b6
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 10:40:02 2021 -0500

    mark frame request as is-aut instead of is-nested

commit e562423
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Fri Dec 10 15:07:37 2021 -0500

    only delay cross-domain requests for the AUT

commit cb342c0
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Fri Dec 10 15:06:06 2021 -0500

    fix proxy tests

commit 4c971d9
Merge: f61dc33 f716178
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 14:48:34 2021 -0500

    empty commit

commit f61dc33
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 14:42:44 2021 -0500

    chore: remove hard-coded domain for multi-domain

commit 673438e
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 13:29:57 2021 -0500

    fix typo from merge conflict

commit 0b2bad0
Merge: 80665f8 dacf0a5
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 13:01:02 2021 -0500

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 80665f8
Merge: d72dcb0 2c28961
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Nov 2 09:36:02 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit d72dcb0
Merge: 5efe34d c6d2918
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Nov 1 13:42:29 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 5efe34d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Nov 1 10:20:12 2021 -0400

    fix types and tests

commit 06312de
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Oct 21 11:25:34 2021 -0400

    create new signal for multidomain that doesn't abuse stability

commit 3b50afb
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 19 09:40:47 2021 -0400

    use this.debug

commit a700fab
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 19 09:34:46 2021 -0400

    use the domain

commit a311ba3
Merge: 00bb988 516100b
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 19 09:29:32 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 00bb988
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 5 12:24:19 2021 -0400

    remove anticipateMultidomain from rerun spec

commit 8d1c392
Merge: 516c919 8f11635
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 5 11:04:37 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 516c919
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 5 11:03:02 2021 -0400

    remove need for anticipateMultidomain

commit 75473c2
Merge: 0fb201a 9503b40
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Sep 29 09:14:42 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 0fb201a
Merge: aef4200 fb5ff06
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Sep 21 10:23:45 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit aef4200
Merge: a5e0ace cc66129
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Sep 16 09:20:57 2021 -0400

    Merge branch 'feature-multidomain' into issue-18043-multidomain-fix-rerun

commit a5e0ace
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Sep 14 09:36:36 2021 -0400

    chore: fix rerunning multidomain tests
mschile added a commit that referenced this pull request Jan 17, 2022
commit 0ef738b
Author: Bill Glesias <bglesias@gmail.com>
Date:   Fri Jan 14 18:28:43 2022 -0500

    make sure we have a reference to the changed log before trying to destructure object

commit 20a2922
Author: Bill Glesias <bglesias@gmail.com>
Date:   Fri Jan 14 18:17:56 2022 -0500

    refactor onLogChanged conditional to be more readable

commit aca778c
Author: Bill Glesias <bglesias@gmail.com>
Date:   Fri Jan 14 18:14:05 2022 -0500

    change command:update to command:end

commit 4429a97
Author: Bill Glesias <bglesias@gmail.com>
Date:   Fri Jan 14 14:43:17 2022 -0500

    attempt at improving log types for Cypress.Log LogConfig

commit 8afea40
Author: Bill Glesias <bglesias@gmail.com>
Date:   Fri Jan 14 14:41:16 2022 -0500

    address code changes needed to address comments in code review

commit d9bcf32
Author: Bill Glesias <bglesias@gmail.com>
Date:   Fri Jan 14 10:54:33 2022 -0500

    address refactoring comments brought up in code review

commit 41030ff
Author: Bill Glesias <bglesias@gmail.com>
Date:   Thu Jan 13 16:29:52 2022 -0500

    address comments left in code review

commit 4356a78
Merge: 62486fb 2ee9893
Author: Bill Glesias <bglesias@gmail.com>
Date:   Wed Jan 12 10:57:43 2022 -0500

    Merge branch 'feature-multidomain' of github.com:cypress-io/cypress into issue-19545-fix-secondary-domain-command-state

commit 62486fb
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 16:26:44 2022 -0500

    add verification tests to make sure all logs stream in and there are no pending commands

commit 1593d70
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 16:26:22 2022 -0500

    refactor cleanup to async/await and update comments

commit aec4800
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 13:22:40 2022 -0500

    add lodash import to primary

commit e4921c2
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 13:05:43 2022 -0500

    add stubbed out tests for cy-in-cy and correct documentation

commit 336827f
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:55:26 2022 -0500

    remove redundant done commment in primary

commit 12e32f1
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:52:58 2022 -0500

    correct done test error name

commit ed360ae
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:48:03 2022 -0500

    update documentation within the multidomain primary

commit 7226f6e
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:45:31 2022 -0500

    remove unused log messages

commit 372df93
Merge: 89ff0bd 39c5d1a
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:32:11 2022 -0500

    Merge branch 'issue-17253-remove-hardcoded-domain' of github.com:cypress-io/cypress into logSerializationFixes

commit 39c5d1a
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 12:18:09 2022 -0500

    feat: support done callback (#19465)

    Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>

commit 7bce51a
Author: Chris Breiding <chrisbreiding@users.noreply.github.com>
Date:   Tue Jan 11 11:37:18 2022 -0500

    chore: Convert multi-domain file to TS and rename for consistency (#19601)

    * WIP: multi domain refactor event bus

    * refactor multidomain setup so cy/cypress are created once and not on every page load

    * use unique ids per origin for logs instead of trying to sync the counter

    * refactor postMessage/eventBus methods into the multidomain communicator to consolidate messaging logic. Add basic JSDocs to classes and methods within the communicator.

    * fix issue where event data being fed into the message listener is undefined

    * remove forgot about commented out code

    * use debug to log unexpected post messages

    * refactor and update types

    * move internal:window:load to internal types

    * accept data argument in switchToDomain and validate arguments

    * add experimentalMultiDomain flag and fail switchToDomain if not enabled

    * add types for switchToDomain

    * fix types

    * add experimental flag

    * remove comment

    * update config suite titles and snapshots

    * use message in error, update test for browser family

    * remove unnecessary return

    * convert src/multidomain/index.js to typescript

    * use consistent naming for multi-domain

    * remove some data

    * Multidomain -> MultiDomain

    * address PR feedback

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

commit 89ff0bd
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 11 11:03:14 2022 -0500

    clean up implementation of logChanged to make code more readable

commit d42bae3
Author: Bill Glesias <bglesias@gmail.com>
Date:   Mon Jan 10 18:18:55 2022 -0500

    command and log syncing should now work correctly

commit b6ca2f8
Author: Bill Glesias <bglesias@gmail.com>
Date:   Mon Jan 10 18:02:23 2022 -0500

    split out log:added log:changed and command:update into separate methods (still broken)

commit 7735c61
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 11:20:40 2022 -0500

    wrap cleanup code in finally block

commit 36956e6
Author: Bill Glesias <bglesias@gmail.com>
Date:   Thu Jan 6 16:53:07 2022 -0500

    allow logs to be deferrable to allow updates to stream in for commands
    that have just finished

commit b3276ec
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 11:19:48 2022 -0500

    use frame events to get frame tree instead of on prerequest

commit f59af60
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 10:06:16 2022 -0500

    remove unused reference

commit bf05812
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 10:05:11 2022 -0500

    move Page.enable so only chrome uses it

commit dfa3953
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 09:51:11 2022 -0500

    remove comment

    it's in another branch, but we're always injecting now

commit 127f893
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 09:50:22 2022 -0500

    remove aut iframe header before request is sent

commit 2471643
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Jan 11 09:30:12 2022 -0500

    add/improve comments

commit 2bf3557
Author: Chris Breiding <chrisbreiding@users.noreply.github.com>
Date:   Fri Jan 7 12:51:21 2022 -0500

    chore: Finish switchToDomain implementation (#19577)

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

commit b45cf72
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 6 17:00:10 2022 -0500

    fix flakey downloads spec

commit 57d1150
Merge: e3f1eac a408b36
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 6 16:49:43 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit e3f1eac
Merge: 388bfa4 a42e601
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 6 14:18:55 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit 388bfa4
Author: Bill Glesias <bglesias@gmail.com>
Date:   Thu Jan 6 10:26:33 2022 -0500

    chore: refactor cross domain communications (#19430)

    Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>

commit 00dae70
Merge: 4f8ed47 ee6e105
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Jan 5 13:18:21 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit 4f8ed47
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Jan 5 09:51:58 2022 -0500

    update comment

commit 415e149
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 15:59:19 2022 -0500

    fix reference

commit 5cef955
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 14:59:50 2022 -0500

    revert window:load error wrapping

commit 3d28da1
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 14:51:33 2022 -0500

    fix type issue

commit 26e6cdf
Merge: c9c963d f2c6069
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 10:21:03 2022 -0500

    Merge branch 'feature-multidomain' into issue-17253-remove-hardcoded-domain

commit c9c963d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 10:14:43 2022 -0500

    don't signal stable if cross-origin w/o multi-domain api use

commit e2d7113
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Jan 3 10:06:08 2022 -0500

    wrap errors from window:load handlers

commit ce03f5d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 16:45:24 2021 -0500

    fix failing on cross-origin error

commit abeb8ea
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 16:05:47 2021 -0500

    fix

commit 40fec59
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 15:05:32 2021 -0500

    fix confusing window:load handlers errors for cross-origin errors

commit d4fc457
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 15:05:01 2021 -0500

    fix tests and refactor a bit

commit d358f5d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 11:34:08 2021 -0500

    fix

commit 5bb2bcd
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 11:25:52 2021 -0500

    fix random cdp crash

commit a661fb7
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 11:25:39 2021 -0500

    refactor multiple events into single event

commit 9e86408
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Dec 15 10:25:21 2021 -0500

    add timeout and fail if no switchToDomain after cross-domain navigation

commit 77335d4
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Dec 14 13:28:53 2021 -0500

    use cdp for adding is-aut header for chrome-like browsers

commit 16001aa
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 15:05:31 2021 -0500

    fix specs

commit 4d5822d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 14:15:12 2021 -0500

    chore: fix server unit tests running on mac by using actual tmp dir

commit f33abf6
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 11:25:05 2021 -0500

    add unit tests for adding aut frame header

commit 5ff39b6
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Dec 13 10:40:02 2021 -0500

    mark frame request as is-aut instead of is-nested

commit e562423
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Fri Dec 10 15:07:37 2021 -0500

    only delay cross-domain requests for the AUT

commit cb342c0
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Fri Dec 10 15:06:06 2021 -0500

    fix proxy tests

commit 4c971d9
Merge: f61dc33 f716178
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 14:48:34 2021 -0500

    empty commit

commit f61dc33
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 14:42:44 2021 -0500

    chore: remove hard-coded domain for multi-domain

commit 673438e
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 13:29:57 2021 -0500

    fix typo from merge conflict

commit 0b2bad0
Merge: 80665f8 dacf0a5
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Dec 9 13:01:02 2021 -0500

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 80665f8
Merge: d72dcb0 2c28961
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Nov 2 09:36:02 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit d72dcb0
Merge: 5efe34d c6d2918
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Nov 1 13:42:29 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 5efe34d
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Mon Nov 1 10:20:12 2021 -0400

    fix types and tests

commit 06312de
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Oct 21 11:25:34 2021 -0400

    create new signal for multidomain that doesn't abuse stability

commit 3b50afb
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 19 09:40:47 2021 -0400

    use this.debug

commit a700fab
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 19 09:34:46 2021 -0400

    use the domain

commit a311ba3
Merge: 00bb988 516100b
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 19 09:29:32 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 00bb988
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 5 12:24:19 2021 -0400

    remove anticipateMultidomain from rerun spec

commit 8d1c392
Merge: 516c919 8f11635
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 5 11:04:37 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 516c919
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Oct 5 11:03:02 2021 -0400

    remove need for anticipateMultidomain

commit 75473c2
Merge: 0fb201a 9503b40
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Wed Sep 29 09:14:42 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit 0fb201a
Merge: aef4200 fb5ff06
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Sep 21 10:23:45 2021 -0400

    Merge branch 'feature-multidomain' into issue-17252-multidomain-lookahead

commit aef4200
Merge: a5e0ace cc66129
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Sep 16 09:20:57 2021 -0400

    Merge branch 'feature-multidomain' into issue-18043-multidomain-fix-rerun

commit a5e0ace
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Tue Sep 14 09:36:36 2021 -0400

    chore: fix rerunning multidomain tests
AtofStryker added a commit that referenced this pull request Jan 18, 2022
* chore: fix rerunning multidomain tests

* remove need for anticipateMultidomain

* remove anticipateMultidomain from rerun spec

* use the domain

* use this.debug

* create new signal for multidomain that doesn't abuse stability

* fix types and tests

* fix typo from merge conflict

* chore: remove hard-coded domain for multi-domain

* fix proxy tests

* only delay cross-domain requests for the AUT

* mark frame request as is-aut instead of is-nested

* add unit tests for adding aut frame header

* chore: fix server unit tests running on mac by using actual tmp dir

* fix specs

* use cdp for adding is-aut header for chrome-like browsers

* add timeout and fail if no switchToDomain after cross-domain navigation

* refactor multiple events into single event

* fix random cdp crash

* fix

* fix tests and refactor a bit

* fix confusing window:load handlers errors for cross-origin errors

* fix

* fix failing on cross-origin error

* wrap errors from window:load handlers

* don't signal stable if cross-origin w/o multi-domain api use

* fix type issue

* revert window:load error wrapping

* fix reference

* update comment

* chore: refactor cross domain communications (#19430)

Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>

* fix flakey downloads spec

* chore: Finish switchToDomain implementation (#19577)

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

* add/improve comments

* remove aut iframe header before request is sent

* remove comment

it's in another branch, but we're always injecting now

* move Page.enable so only chrome uses it

* remove unused reference

* use frame events to get frame tree instead of on prerequest

* allow logs to be deferrable to allow updates to stream in for commands
that have just finished

* wrap cleanup code in finally block

* split out log:added log:changed and command:update into separate methods (still broken)

* command and log syncing should now work correctly

* clean up implementation of logChanged to make code more readable

* chore: Convert multi-domain file to TS and rename for consistency (#19601)

* WIP: multi domain refactor event bus

* refactor multidomain setup so cy/cypress are created once and not on every page load

* use unique ids per origin for logs instead of trying to sync the counter

* refactor postMessage/eventBus methods into the multidomain communicator to consolidate messaging logic. Add basic JSDocs to classes and methods within the communicator.

* fix issue where event data being fed into the message listener is undefined

* remove forgot about commented out code

* use debug to log unexpected post messages

* refactor and update types

* move internal:window:load to internal types

* accept data argument in switchToDomain and validate arguments

* add experimentalMultiDomain flag and fail switchToDomain if not enabled

* add types for switchToDomain

* fix types

* add experimental flag

* remove comment

* update config suite titles and snapshots

* use message in error, update test for browser family

* remove unnecessary return

* convert src/multidomain/index.js to typescript

* use consistent naming for multi-domain

* remove some data

* Multidomain -> MultiDomain

* address PR feedback

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

* feat: support done callback (#19465)

Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>

* remove unused log messages

* update documentation within the multidomain primary

* correct done test error name

* remove redundant done commment in primary

* add stubbed out tests for cy-in-cy and correct documentation

* add lodash import to primary

* refactor cleanup to async/await and update comments

* add verification tests to make sure all logs stream in and there are no pending commands

* address comments left in code review

* address refactoring comments brought up in code review

* address code changes needed to address comments in code review

* attempt at improving log types for Cypress.Log LogConfig

* change command:update to command:end

* refactor onLogChanged conditional to be more readable

* make sure we have a reference to the changed log before trying to destructure object

Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
mschile added a commit that referenced this pull request Jan 18, 2022
commit 0601570
Author: Bill Glesias <bglesias@gmail.com>
Date:   Tue Jan 18 10:04:57 2022 -0500

    fix: secondary domain command state (#19661)

    * chore: fix rerunning multidomain tests

    * remove need for anticipateMultidomain

    * remove anticipateMultidomain from rerun spec

    * use the domain

    * use this.debug

    * create new signal for multidomain that doesn't abuse stability

    * fix types and tests

    * fix typo from merge conflict

    * chore: remove hard-coded domain for multi-domain

    * fix proxy tests

    * only delay cross-domain requests for the AUT

    * mark frame request as is-aut instead of is-nested

    * add unit tests for adding aut frame header

    * chore: fix server unit tests running on mac by using actual tmp dir

    * fix specs

    * use cdp for adding is-aut header for chrome-like browsers

    * add timeout and fail if no switchToDomain after cross-domain navigation

    * refactor multiple events into single event

    * fix random cdp crash

    * fix

    * fix tests and refactor a bit

    * fix confusing window:load handlers errors for cross-origin errors

    * fix

    * fix failing on cross-origin error

    * wrap errors from window:load handlers

    * don't signal stable if cross-origin w/o multi-domain api use

    * fix type issue

    * revert window:load error wrapping

    * fix reference

    * update comment

    * chore: refactor cross domain communications (#19430)

    Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>

    * fix flakey downloads spec

    * chore: Finish switchToDomain implementation (#19577)

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

    * add/improve comments

    * remove aut iframe header before request is sent

    * remove comment

    it's in another branch, but we're always injecting now

    * move Page.enable so only chrome uses it

    * remove unused reference

    * use frame events to get frame tree instead of on prerequest

    * allow logs to be deferrable to allow updates to stream in for commands
    that have just finished

    * wrap cleanup code in finally block

    * split out log:added log:changed and command:update into separate methods (still broken)

    * command and log syncing should now work correctly

    * clean up implementation of logChanged to make code more readable

    * chore: Convert multi-domain file to TS and rename for consistency (#19601)

    * WIP: multi domain refactor event bus

    * refactor multidomain setup so cy/cypress are created once and not on every page load

    * use unique ids per origin for logs instead of trying to sync the counter

    * refactor postMessage/eventBus methods into the multidomain communicator to consolidate messaging logic. Add basic JSDocs to classes and methods within the communicator.

    * fix issue where event data being fed into the message listener is undefined

    * remove forgot about commented out code

    * use debug to log unexpected post messages

    * refactor and update types

    * move internal:window:load to internal types

    * accept data argument in switchToDomain and validate arguments

    * add experimentalMultiDomain flag and fail switchToDomain if not enabled

    * add types for switchToDomain

    * fix types

    * add experimental flag

    * remove comment

    * update config suite titles and snapshots

    * use message in error, update test for browser family

    * remove unnecessary return

    * convert src/multidomain/index.js to typescript

    * use consistent naming for multi-domain

    * remove some data

    * Multidomain -> MultiDomain

    * address PR feedback

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

    * feat: support done callback (#19465)

    Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>

    * remove unused log messages

    * update documentation within the multidomain primary

    * correct done test error name

    * remove redundant done commment in primary

    * add stubbed out tests for cy-in-cy and correct documentation

    * add lodash import to primary

    * refactor cleanup to async/await and update comments

    * add verification tests to make sure all logs stream in and there are no pending commands

    * address comments left in code review

    * address refactoring comments brought up in code review

    * address code changes needed to address comments in code review

    * attempt at improving log types for Cypress.Log LogConfig

    * change command:update to command:end

    * refactor onLogChanged conditional to be more readable

    * make sure we have a reference to the changed log before trying to destructure object

    Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>
    Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-domain: Support done callback
3 participants