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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update plugin to be compatible with Cypress 10 #32

Open
admah opened this issue May 26, 2022 · 5 comments
Open

Update plugin to be compatible with Cypress 10 #32

admah opened this issue May 26, 2022 · 5 comments

Comments

@admah
Copy link

admah commented May 26, 2022

Hello 馃憢 I'm writing on behalf of the Cypress DX team. We wanted to notify you that some changes may need to be made to this plugin to ensure that it works in Cypress 10.

For more information, here is our official plugin update guide.

@kris-luminar
Copy link

It would be ever so helpful if someone would update this repo for Cypress 10!

@wylieconlon
Copy link

wylieconlon commented Sep 22, 2022

Edit: This comment is no longer accurate, it did not solve the root issue.

This plugin seems to work fine with Cypress 10 after I replaced return true or return false with return cy.wrap(true) etc. I'm using the pipe function to assert that my Redux store is in a certain state, so basically:

function applyCondition(win: any) {
  const result = ...;
  if (!result) {
    cy.log("Failed check for", result);
  } else {
    cy.log("Passed check", result);
  }
  // This line used to be "return result;" in cypress 9
  return cy.wrap(result);
}
cy.window().pipe(applyCondition).should("be.true");

@srikanthkyatham
Copy link

I can migrate the plugin to cypress 10

@srikanthkyatham
Copy link

Here is the PR for migration - #34

@wylieconlon
Copy link

I previously commented that this plugin "seems to work" with Cypress 10, but after a closer look I was wrong. I've stopped using cypress-pipe and am now using https://www.npmjs.com/package/cypress-wait-until using a similar code snippet as above, and it is successfully retrying multiple times.

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

No branches or pull requests

4 participants