Skip to content

Commit 5ed9e33

Browse files
committed
fix(typings): compareSnapshot typings and add missing hideElement command
1 parent 902a989 commit 5ed9e33

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

types/command.d.ts

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11

22
import type { CompareSnapshotOptions } from './options'
33

4-
declare namespace Cypress {
5-
interface Chainable<Subject = any> {
6-
compareSnapshot(options: string | CompareSnapshotOptions): Chainable<Element>
4+
declare global {
5+
namespace Cypress {
6+
interface Chainable<Subject = any> {
7+
/**
8+
* custom command to take screenshots and compare them with their baseline images
9+
*/
10+
compareSnapshot(options: string | CompareSnapshotOptions): Chainable<Element>
11+
/**
12+
* custom command to hide/unhide elements
13+
*/
14+
hideElement(hide?: boolean): void
15+
}
716
}
817
}
918

0 commit comments

Comments
 (0)