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 behavior
To not have this flagged as deprecated or instructions in the docs on how to use intercept for screenshots.
/// <reference types="Cypress" />
context('e2e', () => {
it('can render', () => {
cy.visit('/');
cy.screenshot();
});
});
6.0.0
Yah, this warning is supposed to be on cy.route, but likely got associated with the wrong command鈥檚 types.
PR open for this https://github.com/cypress-io/cypress/pull/9323
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.
Most helpful comment
PR open for this https://github.com/cypress-io/cypress/pull/9323