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(connect): add way to retrieve method info without actually callin… #14910

Merged
merged 4 commits into from
Oct 21, 2024

Conversation

mroz22
Copy link
Contributor

@mroz22 mroz22 commented Oct 16, 2024

prerequisite for #14717

  • 7dfaf33 - each connect method now has a special __info param. If provided, the method is not executed and only information about it is provided instead
  • 0ff2f89—Thanks to the previous commit, we may get rid of some not very robust "connect patches" code in connectInitThunks. This commit changes the behaviour of the Suite since some of the calls were not covered by the patches before, but it should only be fixed—all the intended logic should stay in place.
  • e0843ae Exactly because some of the methods were not covered before by the patch it only unearthed now. Cypress has the concept of retry-ability - it would keep querying for an element until it becomes not-disabled. This however does not work with our Checkbox and Switch components since disabled and datatestid attrs are not defined on the same component there. It leads into such situation when the "disabled" param is still active (and affecting event handlers) but cypress does not wait for it to go away making it click on the element which leads to an early return in its event handler and ultimately hanged test.
  • 89be4e6 - the newly added __info param is not covered by types yet. I would like to add it but so far I only ended up doing some renaming that I found useful to make the types code more readable

@mroz22 mroz22 force-pushed the connect-method-info branch 9 times, most recently from 845ba54 to 8e7924b Compare October 18, 2024 14:39
@mroz22 mroz22 changed the title wip(connect): add way to retrieve method info without actually callin… feat(connect): add way to retrieve method info without actually callin… Oct 18, 2024
@mroz22 mroz22 marked this pull request as ready for review October 18, 2024 14:43
@mroz22 mroz22 force-pushed the connect-method-info branch 2 times, most recently from 02a896a to 89be4e6 Compare October 18, 2024 16:01
@mroz22 mroz22 requested a review from Nodonisko as a code owner October 18, 2024 16:01
@mroz22
Copy link
Contributor Author

mroz22 commented Oct 21, 2024

/rebase

Copy link

@trezor-ci trezor-ci force-pushed the connect-method-info branch from f6caf4c to 144e926 Compare October 21, 2024 10:57
@mroz22 mroz22 merged commit a03f97a into develop Oct 21, 2024
84 checks passed
@mroz22 mroz22 deleted the connect-method-info branch October 21, 2024 11:42
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