Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

getByText type might be wrong #45

Closed
wolverineks opened this issue Jul 18, 2019 · 4 comments
Closed

getByText type might be wrong #45

wolverineks opened this issue Jul 18, 2019 · 4 comments
Labels
help wanted Extra attention is needed released

Comments

@wolverineks
Copy link
Contributor

Relevant code or config:

getByText(DISPLAY_STRINGS.page01.body, {
  // @ts-ignore
  normalizer: (string: string) => string.trim()
});

What you did:

Tried to add options to getByText

What happened:

Argument of type '{ normalizer: (string: string) => string; }' is not assignable to parameter of type 'WaitForElementOptions'.
Object literal may only specify known properties, and 'normalizer' does not exist in type 'WaitForElementOptions'.ts(2345)

Reproduction:

demo

Problem description:

This behavior doesn't match documentation

Suggested solution:

Update type, essentially,

- WaitForElementOptions
+ SelectorMatcherOptions

Can you help us fix this issue by submitting a pull request?

I am able to submit a PR with the change

@bcarroll22
Copy link
Collaborator

@wolverineks sorry for the delay, I don't use TypeScript myself and generally rely on the community to maintain those types. Would you be willing to submit the PR for this? Thanks in advance!

@bcarroll22 bcarroll22 added the help wanted Extra attention is needed label Jul 30, 2019
@wolverineks
Copy link
Contributor Author

np, ill take a whack at it when i get some time

@wolverineks
Copy link
Contributor Author

im on it

@bcarroll22
Copy link
Collaborator

🎉 This issue has been resolved in version 4.0.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed released
Projects
None yet
Development

No branches or pull requests

2 participants