Skip to content

feat: add support of @testing-library/dom queries #1092

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

talkenson
Copy link

No description provided.

@talkenson talkenson force-pushed the feat/add-dtl branch 4 times, most recently from 7195292 to cddccaf Compare June 10, 2025 07:18
@talkenson talkenson requested a review from shadowusr June 10, 2025 07:22
@talkenson talkenson marked this pull request as ready for review June 10, 2025 07:22
Copy link
Member

@shadowusr shadowusr left a comment

Choose a reason for hiding this comment

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

Thoughts I have after taking a look:

  • Let's come up with a better configuration API. browser.configureDTL isn't a good choice for multiple reasons (you need browser instance to configure, naming feels off, you can't set this globally)

  • We need to check an important edge-case: what if users followed through with our docs and uses wdio-testing-library? Then if he updates, tests will be failing, because of duplicate commands. We need to check this

  • We need to check that timeouts for find* queries are being configured correctly. For example, how timeouts specified in our testplane config, interact with those. If they don't it's an issue, because they should affect testing-library timeouts.

Copy link
Member

@shadowusr shadowusr left a comment

Choose a reason for hiding this comment

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

Also, I still see no signs that we respect timeouts set in testplane config in find* queries (see point 3 of my previous comment)

/**
* Allows to configure DOM Testing Library
*/
configureDTL: typeof configure;
Copy link
Member

Choose a reason for hiding this comment

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

Here, we still have configureDTL command

export { run as runCli } from "./cli";
export { Testplane as default } from "./testplane";
export { Key } from "@testplane/webdriverio";
export * from "./mock";

export * as unstable from "./unstable";
export * as queries from "./browser/queries";
Copy link
Member

Choose a reason for hiding this comment

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

I think it's better to remove this export, because it exports too much and I don't think items that are being exported will be popular among users. It's better to export as little as possible, because anything that becomes part of public API will need to be supported indefinitely.

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