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

[Cypress 6.0.0] cy.screenshot marked as deprecated #9303

Closed
benjick opened this issue Nov 24, 2020 · 4 comments · Fixed by #9323
Closed

[Cypress 6.0.0] cy.screenshot marked as deprecated #9303

benjick opened this issue Nov 24, 2020 · 4 comments · Fixed by #9323
Assignees
Labels
type: typings Issue related to Cypress types (for TypeScript) v6.0.0 🐛 Issue present since 6.0.0

Comments

@benjick
Copy link

benjick commented Nov 24, 2020

Current behavior

When using cy.screenshot my editor warns me that it's deprecated and refers to cy.intercept. I tried looking at the release blog post and the docs for these two function but it doesn't seem this should be deprecated.

Diving into the type definitions it looks like this:

/**
 * @deprecated Use `cy.intercept()` instead.
 *
 * Take a screenshot of the application under test and the Cypress Command Log.
 *
 * @see https://on.cypress.io/screenshot
 * @example
 *    cy.screenshot()
 *    cy.get(".post").screenshot()
 */
screenshot(options?: Partial<Loggable & Timeoutable & ScreenshotOptions>): Chainable<null>### Desired behaviorTo not have this flagged as deprecated or instructions in the docs on how to use intercept for screenshots.

Test code to reproduce

/// <reference types="Cypress" />

context('e2e', () => {
  it('can render', () => {
    cy.visit('/');
    cy.screenshot();
  });
});

Versions

6.0.0

@jennifer-shehane
Copy link
Member

Yah, this warning is supposed to be on cy.route, but likely got associated with the wrong command’s types.

@jennifer-shehane jennifer-shehane added stage: ready for work The issue is reproducible and in scope type: typings Issue related to Cypress types (for TypeScript) v6.0.0 🐛 Issue present since 6.0.0 internal-priority labels Nov 24, 2020
@cypress-bot cypress-bot bot added stage: work in progress stage: needs review The PR code is done & tested, needs review and removed stage: ready for work The issue is reproducible and in scope stage: work in progress labels Nov 25, 2020
@jennifer-shehane
Copy link
Member

PR open for this #9323

@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Nov 25, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Nov 25, 2020

The code for this is done in cypress-io/cypress#9323, 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 Nov 30, 2020

Released in 6.0.1.

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

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Nov 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: typings Issue related to Cypress types (for TypeScript) v6.0.0 🐛 Issue present since 6.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants