cypress 14.2.1 → 14.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/types/cypress.d.ts +108 -93
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cypress",
3
- "version": "14.2.1",
3
+ "version": "14.3.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "postinstall": "node index.js --exec install",
@@ -123,8 +123,8 @@
123
123
  },
124
124
  "buildInfo": {
125
125
  "commitBranch": "develop",
126
- "commitSha": "a9ad8b136ff5f566cfaacec149ffab41eeb26b69",
127
- "commitDate": "2025-03-26T00:33:33.000Z",
126
+ "commitSha": "696ba74d05096ba4dfb421cc442748ef76665634",
127
+ "commitDate": "2025-04-08T18:07:27.000Z",
128
128
  "stable": true
129
129
  },
130
130
  "description": "Cypress is a next generation front end testing tool built for the modern web",
@@ -578,99 +578,7 @@ declare namespace Cypress {
578
578
  */
579
579
  stop(): void
580
580
 
581
- Commands: {
582
- /**
583
- * Add a custom command
584
- * @see https://on.cypress.io/api/commands
585
- */
586
- add<T extends keyof Chainable>(name: T, fn: CommandFn<T>): void
587
-
588
- /**
589
- * Add a custom parent command
590
- * @see https://on.cypress.io/api/commands#Parent-Commands
591
- */
592
- add<T extends keyof Chainable>(name: T, options: CommandOptions & { prevSubject: false }, fn: CommandFn<T>): void
593
-
594
- /**
595
- * Add a custom child command
596
- * @see https://on.cypress.io/api/commands#Child-Commands
597
- */
598
- add<T extends keyof Chainable, S = any>(name: T, options: CommandOptions & { prevSubject: true }, fn: CommandFnWithSubject<T, S>): void
599
-
600
- /**
601
- * Add a custom child or dual command
602
- * @see https://on.cypress.io/api/commands#Validations
603
- */
604
- add<T extends keyof Chainable, S extends PrevSubject>(
605
- name: T, options: CommandOptions & { prevSubject: S | ['optional'] }, fn: CommandFnWithSubject<T, PrevSubjectMap[S]>,
606
- ): void
607
-
608
- /**
609
- * Add a custom command that allows multiple types as the prevSubject
610
- * @see https://on.cypress.io/api/commands#Validations#Allow-Multiple-Types
611
- */
612
- add<T extends keyof Chainable, S extends PrevSubject>(
613
- name: T, options: CommandOptions & { prevSubject: S[] }, fn: CommandFnWithSubject<T, PrevSubjectMap<void>[S]>,
614
- ): void
615
-
616
- /**
617
- * Add one or more custom commands
618
- * @see https://on.cypress.io/api/commands
619
- */
620
- addAll<T extends keyof Chainable>(fns: CommandFns): void
621
-
622
- /**
623
- * Add one or more custom parent commands
624
- * @see https://on.cypress.io/api/commands#Parent-Commands
625
- */
626
- addAll<T extends keyof Chainable>(options: CommandOptions & { prevSubject: false }, fns: CommandFns): void
627
-
628
- /**
629
- * Add one or more custom child commands
630
- * @see https://on.cypress.io/api/commands#Child-Commands
631
- */
632
- addAll<T extends keyof Chainable, S = any>(options: CommandOptions & { prevSubject: true }, fns: CommandFnsWithSubject<S>): void
633
-
634
- /**
635
- * Add one or more custom commands that validate their prevSubject
636
- * @see https://on.cypress.io/api/commands#Validations
637
- */
638
- addAll<T extends keyof Chainable, S extends PrevSubject>(
639
- options: CommandOptions & { prevSubject: S | ['optional'] }, fns: CommandFnsWithSubject<PrevSubjectMap[S]>,
640
- ): void
641
-
642
- /**
643
- * Add one or more custom commands that allow multiple types as their prevSubject
644
- * @see https://on.cypress.io/api/commands#Allow-Multiple-Types
645
- */
646
- addAll<T extends keyof Chainable, S extends PrevSubject>(
647
- options: CommandOptions & { prevSubject: S[] }, fns: CommandFnsWithSubject<PrevSubjectMap<void>[S]>,
648
- ): void
649
-
650
- /**
651
- * Overwrite an existing Cypress command with a new implementation
652
- * @see https://on.cypress.io/api/commands#Overwrite-Existing-Commands
653
- */
654
- overwrite<T extends keyof Chainable>(name: T, fn: CommandFnWithOriginalFn<T>): void
655
-
656
- /**
657
- * Overwrite an existing Cypress command with a new implementation
658
- * @see https://on.cypress.io/api/commands#Overwrite-Existing-Commands
659
- */
660
- overwrite<T extends keyof Chainable, S extends PrevSubject>(name: T, fn: CommandFnWithOriginalFnAndSubject<T, PrevSubjectMap[S]>): void
661
-
662
- /**
663
- * Add a custom query
664
- * @see https://on.cypress.io/api/custom-queries
665
- */
666
- addQuery<T extends keyof Chainable>(name: T, fn: QueryFn<T>): void
667
-
668
- /**
669
- * Overwrite an existing Cypress query with a new implementation
670
- * @see https://on.cypress.io/api/custom-queries
671
- */
672
- overwriteQuery<T extends keyof Chainable>(name: T, fn: QueryFnWithOriginalFn<T>): void
673
- }
581
+ Commands: Commands
674
582
 
675
583
  /**
676
584
  * @see https://on.cypress.io/cookies
@@ -775,6 +683,9 @@ declare namespace Cypress {
775
683
  */
776
684
  Keyboard: {
777
685
  defaults(options: Partial<KeyboardDefaultsOptions>): void
686
+ Keys: {
687
+ TAB: 'Tab',
688
+ },
778
689
  }
779
690
 
780
691
  /**
@@ -829,6 +740,100 @@ declare namespace Cypress {
829
740
  onSpecWindow: (window: Window, specList: string[] | Array<() => Promise<void>>) => void
830
741
  }
831
742
 
743
+ interface Commands {
744
+ /**
745
+ * Add a custom command
746
+ * @see https://on.cypress.io/api/commands
747
+ */
748
+ add<T extends keyof Chainable>(name: T, fn: CommandFn<T>): void
749
+
750
+ /**
751
+ * Add a custom parent command
752
+ * @see https://on.cypress.io/api/commands#Parent-Commands
753
+ */
754
+ add<T extends keyof Chainable>(name: T, options: CommandOptions & { prevSubject: false }, fn: CommandFn<T>): void
755
+
756
+ /**
757
+ * Add a custom child command
758
+ * @see https://on.cypress.io/api/commands#Child-Commands
759
+ */
760
+ add<T extends keyof Chainable, S = any>(name: T, options: CommandOptions & { prevSubject: true }, fn: CommandFnWithSubject<T, S>): void
761
+
762
+ /**
763
+ * Add a custom child or dual command
764
+ * @see https://on.cypress.io/api/commands#Validations
765
+ */
766
+ add<T extends keyof Chainable, S extends PrevSubject>(
767
+ name: T, options: CommandOptions & { prevSubject: S | ['optional'] }, fn: CommandFnWithSubject<T, PrevSubjectMap[S]>,
768
+ ): void
769
+
770
+ /**
771
+ * Add a custom command that allows multiple types as the prevSubject
772
+ * @see https://on.cypress.io/api/commands#Validations#Allow-Multiple-Types
773
+ */
774
+ add<T extends keyof Chainable, S extends PrevSubject>(
775
+ name: T, options: CommandOptions & { prevSubject: S[] }, fn: CommandFnWithSubject<T, PrevSubjectMap<void>[S]>,
776
+ ): void
777
+
778
+ /**
779
+ * Add one or more custom commands
780
+ * @see https://on.cypress.io/api/commands
781
+ */
782
+ addAll<T extends keyof Chainable>(fns: CommandFns): void
783
+
784
+ /**
785
+ * Add one or more custom parent commands
786
+ * @see https://on.cypress.io/api/commands#Parent-Commands
787
+ */
788
+ addAll<T extends keyof Chainable>(options: CommandOptions & { prevSubject: false }, fns: CommandFns): void
789
+
790
+ /**
791
+ * Add one or more custom child commands
792
+ * @see https://on.cypress.io/api/commands#Child-Commands
793
+ */
794
+ addAll<T extends keyof Chainable, S = any>(options: CommandOptions & { prevSubject: true }, fns: CommandFnsWithSubject<S>): void
795
+
796
+ /**
797
+ * Add one or more custom commands that validate their prevSubject
798
+ * @see https://on.cypress.io/api/commands#Validations
799
+ */
800
+ addAll<T extends keyof Chainable, S extends PrevSubject>(
801
+ options: CommandOptions & { prevSubject: S | ['optional'] }, fns: CommandFnsWithSubject<PrevSubjectMap[S]>,
802
+ ): void
803
+
804
+ /**
805
+ * Add one or more custom commands that allow multiple types as their prevSubject
806
+ * @see https://on.cypress.io/api/commands#Allow-Multiple-Types
807
+ */
808
+ addAll<T extends keyof Chainable, S extends PrevSubject>(
809
+ options: CommandOptions & { prevSubject: S[] }, fns: CommandFnsWithSubject<PrevSubjectMap<void>[S]>,
810
+ ): void
811
+
812
+ /**
813
+ * Overwrite an existing Cypress command with a new implementation
814
+ * @see https://on.cypress.io/api/commands#Overwrite-Existing-Commands
815
+ */
816
+ overwrite<T extends keyof Chainable>(name: T, fn: CommandFnWithOriginalFn<T>): void
817
+
818
+ /**
819
+ * Overwrite an existing Cypress command with a new implementation
820
+ * @see https://on.cypress.io/api/commands#Overwrite-Existing-Commands
821
+ */
822
+ overwrite<T extends keyof Chainable, S extends PrevSubject>(name: T, fn: CommandFnWithOriginalFnAndSubject<T, PrevSubjectMap[S]>): void
823
+
824
+ /**
825
+ * Add a custom query
826
+ * @see https://on.cypress.io/api/custom-queries
827
+ */
828
+ addQuery<T extends keyof Chainable>(name: T, fn: QueryFn<T>): void
829
+
830
+ /**
831
+ * Overwrite an existing Cypress query with a new implementation
832
+ * @see https://on.cypress.io/api/custom-queries
833
+ */
834
+ overwriteQuery<T extends keyof Chainable>(name: T, fn: QueryFnWithOriginalFn<T>): void
835
+ }
836
+
832
837
  type CanReturnChainable = void | Chainable | Promise<unknown>
833
838
  type ThenReturn<S, R> =
834
839
  R extends void ? Chainable<S> :
@@ -1742,6 +1747,16 @@ declare namespace Cypress {
1742
1747
  */
1743
1748
  pause(options?: Partial<Loggable>): Chainable<Subject>
1744
1749
 
1750
+ /**
1751
+ * Send a native sequence of keyboard events: keydown & press, followed by keyup, for the provided key.
1752
+ * Supported keys index the Cypress.Keyboard.Keys record.
1753
+ *
1754
+ * @example
1755
+ * cy.press(Cypress.Keyboard.Keys.TAB) // dispatches a keydown and press event to the browser, followed by a keyup event.
1756
+ * @see https://on.cypress.io/press
1757
+ */
1758
+ press(key: typeof Cypress.Keyboard.Keys[keyof typeof Cypress.Keyboard.Keys], options?: Partial<Loggable & Timeoutable>): void
1759
+
1745
1760
  /**
1746
1761
  * Get the immediately preceding sibling of each element in a set of the elements.
1747
1762
  *