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

[Feature] cy.shadowFind doesn't repeat until a timeout #9

Closed
chiarazambe-smeup opened this issue Jul 29, 2019 · 10 comments · Fixed by #14
Closed

[Feature] cy.shadowFind doesn't repeat until a timeout #9

chiarazambe-smeup opened this issue Jul 29, 2019 · 10 comments · Fixed by #14
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@chiarazambe-smeup
Copy link

It seems that cy.shadowFind doesn't work like cy.get because after a click I must use cy.wait(500) and then make a find. It seems that cy.shadowFind doesn't repeat more times until a timeout... Is it true? I'm a newbie with Cypress and I'm not so sure...

This is my code:

it('test first table', () => {
  cy.visit('http://localhost:4000/#/dataTable/basic');

  cy.shadowGet('kup-data-table')
    .shadowFind('.density-medium')
    .its('length')
    .should('eq', 1);

  cy.shadowGet('kup-data-table')
    .shadowFind('kup-button')
    .shadowFind('button')
    .shadowTrigger('click');

  // cy.shadowFind don't seem to be repeated until a timeout like cy.get...  -> actually used a manual wait!
  cy.wait(500);

  cy.shadowGet('kup-data-table')
    .shadowFind('.density-small')
    .its('length')
    .should('eq', 1);
});

Can you help me?
If it is how I think the library can be improved adding a timeout?
If I'm wrong could you tell me how to avoid using cy.wait?

Thanks a lot!

@abramenal
Copy link
Owner

Hi @chiarazambe-smeup
Thanks for submitting the issue.

That is a definitely a to improve, interface and behavior should be similar to cy.get.
Will pick that up later this week.

@abramenal abramenal changed the title cy.shadowFind doesn't repeat until a timeout [Feature] cy.shadowFind doesn't repeat until a timeout Jul 31, 2019
@abramenal abramenal added the enhancement New feature or request label Jul 31, 2019
@abramenal
Copy link
Owner

@bondar-artem
Copy link

@abramenal Do you have any updates on this?

@abramenal
Copy link
Owner

Hi all,
still no time to pick this up.. hopefully this week but won't promise anything until it gets started.
Thanks for understanding 🙏

@abramenal abramenal added the help wanted Extra attention is needed label Oct 24, 2019
@abramenal
Copy link
Owner

Hey all! Started working on this, seems I've found pretty straightforward solution. Will release a beta in the next couple of days to let you test it.

@mcMickJuice
Copy link

I'd be interested in testing out the beta. Looking forward to the PR!

@abramenal
Copy link
Owner

Hi all!
Feel free to test this out! npm install [email protected].
Please note it is under beta tag at the moment.

@abramenal
Copy link
Owner

@chiarazambe-smeup @mcMickJuice @Postavshik @mandric any chance to test this?

@mcMickJuice
Copy link

@abramenal I left a review of the PR - #14 (review)

I think we might need to add this timeout functionality to all shadow* methods. I might be able to submit a PR later this week if you don't get to it.

@abramenal
Copy link
Owner

@mcMickJuice sounds good! I think I can only start next week so feel free to start this out if you have time.
And big thanks for PR review, valuable comments! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants