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

fix(Types):Fixed the types of whileElement to be aligned with the documentation … #4485

Merged
merged 5 commits into from
May 9, 2024

Conversation

gosha212
Copy link
Contributor

@gosha212 gosha212 commented May 8, 2024

…and the reality

Description

  • This pull request addresses the issue described here: #3662

In this pull request, I have removed the unsupported actions from waitFor().whileElement()


For features/enhancements:

  • I have added/updated the relevant references in the documentation files.

For API changes:

  • I have made the necessary changes in the types index file.

@asafkorem
Copy link
Contributor

Let's emphasize this on our docs (only scroll is allowed)

* @example await element(by.id('scrollView')).scroll(100, 'down', NaN, 0.85);
* @example await element(by.id('scrollView')).scroll(100, 'up');
*/
scroll(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add an extra test to:

https://github.com/wix/Detox/blob/feat/refine_whileElement_api/detox/test/types/detox-global-tests.ts#L93

Invoke the waitFor(...).scroll(pixels, direction, startX, startY, in addition to (pixels, directions).

Besides, you can add one more test like // @ts-expect-error to ensure that waitFor(...) does not have tap or some other common method.

Copy link
Collaborator

@noomorph noomorph left a comment

Choose a reason for hiding this comment

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

Looks good but I strongly recommend to add a couple of typing tests, still.

@gosha212 gosha212 enabled auto-merge May 9, 2024 11:48
@gosha212 gosha212 merged commit 4c1c05e into master May 9, 2024
3 checks passed
@asafkorem
Copy link
Contributor

Released with Detox 20.21.0.

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.

None yet

3 participants