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/retryability #14

Merged
merged 4 commits into from
Nov 7, 2019
Merged

Feature/retryability #14

merged 4 commits into from
Nov 7, 2019

Conversation

abramenal
Copy link
Owner

Closes #9

@abramenal abramenal merged commit d6536f1 into master Nov 7, 2019
@abramenal abramenal deleted the feature/retryability branch November 7, 2019 13:21
Copy link

@mcMickJuice mcMickJuice left a comment

Choose a reason for hiding this comment

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

Sorry this is late. Can we set a default timeout for these functions and make options optional param to these functions?

Also, I think we need to add this functionality to all shadow* functions. I updated my repo to this new package version and the shadowFind and shadowGet functions are fixed but my tests are failing on shadowContains.

src/helpers/resolveValue.js Show resolved Hide resolved
src/commands/shadowGet/command.js Show resolved Hide resolved
@@ -8,13 +10,17 @@ declare namespace Cypress {
composed?: Boolean;
};

type CommandOptions = {

Choose a reason for hiding this comment

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

It appears CommandOptions is already declared as an interface in Cypress library.

As such a typescript error is issued because you can't redeclare a type. Can we change this type name to ShadowOptions or something similar? If we extend CommandOptions by declaring this an interface, it results in prevSubject being required.

Copy link

@ashblox ashblox Apr 23, 2020

Choose a reason for hiding this comment

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

I know this was awhile ago, but I'm having this exact problem. I'm using Typescript with Cypress and I am unable to specify a timeout on shadowGet() or shadowFind() because { timeout: 5000 } is not assignable to parameter of type Cypress.CommandOptions. Any chance this is something we could fix? I can open a new issue if necessary.

Copy link
Owner Author

Choose a reason for hiding this comment

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

I see these typings were not updated properly:
https:/abramenal/cypress-shadow-dom/blob/master/index.d.ts#L25

Are you able to create a MR with that fix?

Copy link

Choose a reason for hiding this comment

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

Is it as simple as changing the shadowFind, shadowFirst, shadowGet and shadowLast methods to use ShadowCommandOptions? Also looks like you have a typo in ShadowEventOptios - I could fix that too.

index.d.ts Show resolved Hide resolved
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.

[Feature] cy.shadowFind doesn't repeat until a timeout
3 participants