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

.each & .wrap break .react() #135

Open
Twiggeh opened this issue Jan 24, 2021 · 0 comments
Open

.each & .wrap break .react() #135

Twiggeh opened this issue Jan 24, 2021 · 0 comments
Labels
Evaluating Under evaluation whether a valid bug

Comments

@Twiggeh
Copy link

Twiggeh commented Jan 24, 2021

Sorry if I am not using your plugin correctly, I was iterating over all clickable images and checking whether they spawn a modal like they are supposed to.

When using cy.wrap cy.react is no longer able to find anything, but when I use image.trigger("click") instead of cy.wrap cy.react works again, but the click doesn't get triggered on the second iteration of the loop.

It seems like .each and .wrap have a funky interaction with .react

Full Repro

cy.react('FeatureImg').each(image => {
	// if this line exists, the cy.reacts below can't find anything anymore
	cy.wrap(image).scrollIntoView().click();
	// replacing the line above the code below allows the cy.react below to work, 
	// but this line is not executed on any subsequent iterations of the loop ?
	// image.trigger("click");

	cy.react('ModalWrapper').should('exist');
	cy.react('ModalButton').should('exist').trigger('click');
});
@abhinaba-ghosh abhinaba-ghosh added the Evaluating Under evaluation whether a valid bug label Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Evaluating Under evaluation whether a valid bug
Projects
None yet
Development

No branches or pull requests

2 participants