Skip to content

Conversation

@dprevost-LMI
Copy link
Contributor

@dprevost-LMI dprevost-LMI commented Dec 30, 2025

Fixes partially #106

PR serving as a starting point to support the multi-remote case.

  • The goal is to have a strong groundwork and not to implement all matchers in a single PR.
  • The first iteration is to implement the toHaveTitle browser matchers
  • Element's matchers will come next
  • waitUntil was reviewed to support multiple instances better so that we can retry only those that failed, optimizing the fetching process.
    • Also, it now returns a CompareResult to be more flexible and returns more information for the assertions.
  • Mechanism to fetch actual data and to format error message was streamlined using an array of instances (even for non multi-remote case) to have a single algorithm used, but all extensible.
  • Until the work is proven enough, it is kept under the UNSTABLE umbrella, so it is to be used at your own risk.

Next:

Draft TODOs:

  • Code review
  • Add unit tests

@dprevost-LMI dprevost-LMI changed the title feat: WIP Support multiremote feat: WIP Alpha Support for Multiremote Dec 31, 2025
@dprevost-LMI dprevost-LMI changed the title feat: WIP Alpha Support for Multiremote feat: Alpha Support for Multiremote Dec 31, 2025
@dprevost-LMI dprevost-LMI changed the title feat: Alpha Support for Multiremote feat: Alpha Support for multi-remote Browser Jan 1, 2026
@dprevost-LMI dprevost-LMI changed the title feat: Alpha Support for multi-remote Browser feat: Alpha Support for Multi-remote Browser Jan 1, 2026
@dprevost-LMI dprevost-LMI marked this pull request as ready for review January 2, 2026 13:33
To assert all remotes with a default value, overriding specific ones:
```ts
await expect(multiRemoteBrowser).toHaveTitle({
default : 'My Default Site Title',
Copy link
Member

Choose a reason for hiding this comment

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

What does default mean here?

Copy link
Contributor Author

@dprevost-LMI dprevost-LMI Jan 4, 2026

Choose a reason for hiding this comment

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

It would provide a default value to assert on all remotes. So instead of enumerating them all when you only have one exception, you can still offer one value for all and another for the exception.

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.

2 participants