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

Error when passing scrollBehavior as TestConfig #9643

Closed
pauwilk opened this issue Dec 11, 2020 · 3 comments · Fixed by #14166
Closed

Error when passing scrollBehavior as TestConfig #9643

pauwilk opened this issue Dec 11, 2020 · 3 comments · Fixed by #14166
Assignees
Labels
topic: typescript type: typings Issue related to Cypress types (for TypeScript)

Comments

@pauwilk
Copy link
Contributor

pauwilk commented Dec 11, 2020

Current behavior

on VS code I get an error:

Argument of type '{ scrollBehavior: string; }' is not assignable to parameter of type 'TestConfigOverrides'.
Object literal may only specify known properties, and 'scrollBehavior' does not exist in type 'TestConfigOverrides'.ts

image

Desired behavior

no types error, autocomplete should work as well for scrollBehavior

Test code to reproduce

(write test in typescript)

describe("Test", { scrollBehavior: "center" }, () => {
  beforeEach(() => {
    cy.reload();
  });

  cy.get("#test").click();
});

Versions

cypress 6.1.0

@jennifer-shehane
Copy link
Member

I opened a PR here to fix this: #14166

@jennifer-shehane jennifer-shehane added the type: typings Issue related to Cypress types (for TypeScript) label Dec 14, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 14, 2020

The code for this is done in cypress-io/cypress#14166, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 21, 2020

Released in 6.2.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v6.2.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Dec 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic: typescript type: typings Issue related to Cypress types (for TypeScript)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants