cypress 16.2.0 → 16.2.1
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.
- package/angular/angular/dist/index.js +6 -7
- package/angular/angular/package.json +7 -22
- package/angular/dist/index.js +6 -7
- package/angular/package.json +7 -22
- package/dist/bin/cypress +2 -2
- package/dist/{cli-AgTnS5LO.js → cli-DoJnc1F1.js} +6 -5
- package/dist/cli.js +2 -2
- package/dist/{cypress-CdDm9AVa.js → cypress-BTgp4zGi.js} +1 -1
- package/dist/cypress.js +3 -3
- package/dist/exec/spawn.js +1 -1
- package/dist/index.js +3 -3
- package/dist/{spawn-DElwyZHC.js → spawn-zPuxj7Kz.js} +2 -2
- package/dist/{tap-WHD3nHJC.js → tap-D2mHgoNE.js} +2 -2
- package/mount-utils/dist/index.js +0 -1
- package/mount-utils/mount-utils/dist/index.js +0 -1
- package/mount-utils/mount-utils/package.json +14 -14
- package/mount-utils/package.json +14 -14
- package/package.json +4 -4
- package/react/dist/cypress-react.cjs.js +5 -6
- package/react/dist/cypress-react.esm-bundler.js +5 -6
- package/react/package.json +26 -46
- package/react/react/dist/cypress-react.cjs.js +5 -6
- package/react/react/dist/cypress-react.esm-bundler.js +5 -6
- package/react/react/package.json +26 -46
- package/svelte/dist/cypress-svelte.cjs.js +0 -1
- package/svelte/dist/cypress-svelte.esm-bundler.js +0 -1
- package/svelte/package.json +24 -22
- package/svelte/svelte/dist/cypress-svelte.cjs.js +0 -1
- package/svelte/svelte/dist/cypress-svelte.esm-bundler.js +0 -1
- package/svelte/svelte/package.json +24 -22
- package/types/cy-chai.d.ts +99 -2
- package/types/cypress.d.ts +208 -42
- package/vue/dist/cypress-vue.cjs.js +1 -2
- package/vue/dist/cypress-vue.esm-bundler.js +1 -2
- package/vue/package.json +35 -42
- package/vue/vue/dist/cypress-vue.cjs.js +1 -2
- package/vue/vue/dist/cypress-vue.esm-bundler.js +1 -2
- package/vue/vue/package.json +35 -42
package/types/cypress.d.ts
CHANGED
|
@@ -624,6 +624,16 @@ declare namespace Cypress {
|
|
|
624
624
|
* Returns a jQuery object obtained by wrapping an object in jQuery.
|
|
625
625
|
*/
|
|
626
626
|
wrap(wrappingElement_function: JQuery.Selector | JQuery.htmlString | Element | JQuery | ((index: number) => string | JQuery)): JQuery
|
|
627
|
+
/**
|
|
628
|
+
* Returns the elements matching a jQuery selector, as a jQuery object.
|
|
629
|
+
* Without a `context`, it searches the document that Cypress's own scripts
|
|
630
|
+
* run in, not your application. To search your application, pass its
|
|
631
|
+
* document or an element in it as `context`.
|
|
632
|
+
* @example
|
|
633
|
+
* cy.document().then((doc) => {
|
|
634
|
+
* const $buttons = Cypress.dom.query('button', doc)
|
|
635
|
+
* })
|
|
636
|
+
*/
|
|
627
637
|
query(selector: JQuery.Selector, context?: Element | JQuery): JQuery
|
|
628
638
|
/**
|
|
629
639
|
* Returns an array of raw elements pulled out from a jQuery object.
|
|
@@ -633,7 +643,6 @@ declare namespace Cypress {
|
|
|
633
643
|
* Returns a boolean indicating whether an object is a DOM object.
|
|
634
644
|
*/
|
|
635
645
|
isDom(obj: any): boolean
|
|
636
|
-
isType(element: JQuery | HTMLElement, type: string): boolean
|
|
637
646
|
/**
|
|
638
647
|
* Returns a boolean indicating whether an element is visible.
|
|
639
648
|
*/
|
|
@@ -644,15 +653,29 @@ declare namespace Cypress {
|
|
|
644
653
|
isHidden(element: JQuery | HTMLElement, methodName?: string, options?: object): boolean
|
|
645
654
|
/**
|
|
646
655
|
* Returns a boolean indicating whether an element can receive focus.
|
|
656
|
+
* Accepts a DOM element or a jQuery object. For a jQuery object with
|
|
657
|
+
* more than one element, returns `true` if any of them can receive focus.
|
|
647
658
|
*/
|
|
648
659
|
isFocusable(element: JQuery | HTMLElement): boolean
|
|
660
|
+
/**
|
|
661
|
+
* Returns a boolean indicating whether an element accepts typed text: a
|
|
662
|
+
* `<textarea>`, a contenteditable element, or an `<input>` whose `type` is
|
|
663
|
+
* `text`, `password`, `email`, `number`, `date`, `week`, `month`, `time`,
|
|
664
|
+
* `datetime`, `datetime-local`, `search`, `url`, or `tel`.
|
|
665
|
+
* Accepts a DOM element or a jQuery object. For a jQuery object, checks its
|
|
666
|
+
* first element.
|
|
667
|
+
*/
|
|
649
668
|
isTextLike(element: JQuery | HTMLElement): boolean
|
|
650
669
|
/**
|
|
651
|
-
* Returns a boolean indicating whether an element is scrollable.
|
|
670
|
+
* Returns a boolean indicating whether an element or the window is scrollable.
|
|
671
|
+
* Accepts the window, a DOM element, or a jQuery object. For a jQuery object,
|
|
672
|
+
* checks its first element.
|
|
652
673
|
*/
|
|
653
674
|
isScrollable(element: Window | JQuery | HTMLElement): boolean
|
|
654
675
|
/**
|
|
655
676
|
* Returns a boolean indicating whether an element currently has focus.
|
|
677
|
+
* Accepts a DOM element or a jQuery object. For a jQuery object, checks
|
|
678
|
+
* its first element.
|
|
656
679
|
*/
|
|
657
680
|
isFocused(element: JQuery | HTMLElement): boolean
|
|
658
681
|
/**
|
|
@@ -663,9 +686,16 @@ declare namespace Cypress {
|
|
|
663
686
|
* Returns a boolean indicating whether an element is attached to the DOM.
|
|
664
687
|
*/
|
|
665
688
|
isAttached(element: JQuery | HTMLElement | Window | Document): boolean
|
|
689
|
+
/**
|
|
690
|
+
* Returns a boolean indicating whether an element matches a jQuery selector.
|
|
691
|
+
* For a jQuery object with more than one element, returns `true` if any of
|
|
692
|
+
* them match. Accepts a DOM element or a jQuery object.
|
|
693
|
+
*/
|
|
666
694
|
isSelector(element: JQuery | HTMLElement, selector: JQuery.Selector): boolean
|
|
667
695
|
/**
|
|
668
|
-
* Returns a boolean indicating whether
|
|
696
|
+
* Returns a boolean indicating whether `element2` is `element1` or is
|
|
697
|
+
* inside it. Each argument can be a DOM element or a jQuery object.
|
|
698
|
+
* For a jQuery object, checks its first element.
|
|
669
699
|
*/
|
|
670
700
|
isDescendent(element1: JQuery | HTMLElement, element2: JQuery | HTMLElement): boolean
|
|
671
701
|
/**
|
|
@@ -688,22 +718,146 @@ declare namespace Cypress {
|
|
|
688
718
|
* Returns a boolean indicating whether an object is a jQuery object.
|
|
689
719
|
*/
|
|
690
720
|
isJquery(obj: any): obj is JQuery
|
|
721
|
+
/**
|
|
722
|
+
* Returns a boolean indicating whether an `<input>` or `<button>` has the
|
|
723
|
+
* given `type`, or any of the given types when `type` is an array. It reads
|
|
724
|
+
* the element's `type` property rather than its attribute, so an `<input>`
|
|
725
|
+
* with an unrecognized `type` counts as `'text'`, and a `<button>` with no
|
|
726
|
+
* `type` counts as `'submit'`. Returns `false` for any other element.
|
|
727
|
+
* Accepts a DOM element or a jQuery object. For a jQuery object, checks its
|
|
728
|
+
* first element.
|
|
729
|
+
*/
|
|
691
730
|
isInputType(element: JQuery | HTMLElement, type: string | string[]): boolean
|
|
692
|
-
|
|
693
|
-
|
|
731
|
+
/**
|
|
732
|
+
* Returns a string representation of an element, the window, or the document.
|
|
733
|
+
* `'long'` (the default) returns the element's HTML with its content
|
|
734
|
+
* abbreviated, and `'short'` returns its tag name with its id or classes.
|
|
735
|
+
*/
|
|
736
|
+
stringify(element: JQuery | HTMLElement | Window | Document, form?: 'long' | 'short'): string
|
|
737
|
+
/**
|
|
738
|
+
* Returns the raw elements in a jQuery object: the element itself when it
|
|
739
|
+
* holds one, an array of elements when it holds more than one, and
|
|
740
|
+
* `undefined` when it is empty.
|
|
741
|
+
*/
|
|
742
|
+
getElements(element: JQuery): HTMLElement | HTMLElement[] | undefined
|
|
743
|
+
/**
|
|
744
|
+
* Returns the selector that `cy.contains()` uses to find elements whose
|
|
745
|
+
* text includes `text`, plus submit buttons whose `value` has `text` as one
|
|
746
|
+
* of its space-separated words. `filter` limits the search to elements
|
|
747
|
+
* matching a selector, and can list several selectors separated by commas.
|
|
748
|
+
* Matching ignores case unless `options.matchCase` is `true`.
|
|
749
|
+
*
|
|
750
|
+
* The selector relies on pseudo-classes that only Cypress's copy of jQuery
|
|
751
|
+
* understands, so run it with `Cypress.$` or `Cypress.dom.query()`, not
|
|
752
|
+
* `document.querySelectorAll()`.
|
|
753
|
+
* @example
|
|
754
|
+
* Cypress.dom.getContainsSelector('Log in', 'button', { matchCase: true })
|
|
755
|
+
*/
|
|
694
756
|
getContainsSelector(text: string, filter?: string, options?: CaseMatchable): JQuery.Selector
|
|
695
|
-
|
|
696
|
-
|
|
757
|
+
/**
|
|
758
|
+
* Picks one element from a list of matches, the way `cy.contains()` does.
|
|
759
|
+
* Starting at `index` (default `0`) and skipping `<script>` and `<style>`,
|
|
760
|
+
* it moves on to the next element in the list for as long as that element
|
|
761
|
+
* is nested inside the current one, and stops at the deepest. If that
|
|
762
|
+
* element is inside an `<a>`, `<button>`, `<label>`, or submit `<input>`
|
|
763
|
+
* that is also in the list, it picks that ancestor instead.
|
|
764
|
+
*
|
|
765
|
+
* Returns a jQuery object holding the chosen element.
|
|
766
|
+
*/
|
|
767
|
+
getFirstDeepestElement(elements: JQuery, index?: number): JQuery
|
|
768
|
+
/**
|
|
769
|
+
* Returns the window that contains an element or a document, or the window
|
|
770
|
+
* itself when passed a window. Accepts any of these, or a jQuery object
|
|
771
|
+
* holding one. For a jQuery object, uses its first element.
|
|
772
|
+
*/
|
|
773
|
+
getWindowByElement(element: JQuery<HTMLElement | Document | Window> | HTMLElement | Document | Window): Window
|
|
774
|
+
/**
|
|
775
|
+
* Returns a sentence explaining why an element is not visible.
|
|
776
|
+
* Accepts a DOM element or a jQuery object.
|
|
777
|
+
*/
|
|
697
778
|
getReasonIsHidden(element: JQuery | HTMLElement, options?: object): string
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
779
|
+
/**
|
|
780
|
+
* Returns the closest ancestor of an element that can scroll, as a jQuery
|
|
781
|
+
* object, or `null` if there is none. The element itself is not checked.
|
|
782
|
+
* It walks out of shadow roots to their hosts and can return `<html>`.
|
|
783
|
+
* Returns `null` right away for `<html>`, `<body>`, or the document.
|
|
784
|
+
* Accepts a DOM element or a jQuery object. For a jQuery object, starts
|
|
785
|
+
* from its first element.
|
|
786
|
+
*/
|
|
787
|
+
getFirstScrollableParent(element: JQuery | HTMLElement): JQuery | null
|
|
788
|
+
/**
|
|
789
|
+
* Returns the element, or its closest ancestor, whose CSS `position` is
|
|
790
|
+
* `fixed` or `sticky`, as a jQuery object, or `null` if there is none.
|
|
791
|
+
* It walks out of shadow roots to their hosts. Returns `null` right away for
|
|
792
|
+
* `<html>`, `<body>`, or the document.
|
|
793
|
+
* Accepts a DOM element or a jQuery object. For a jQuery object, starts
|
|
794
|
+
* from its first element.
|
|
795
|
+
*/
|
|
796
|
+
getFirstFixedOrStickyPositionParent(element: JQuery | HTMLElement): JQuery | null
|
|
797
|
+
/**
|
|
798
|
+
* Returns the element, or its closest ancestor, whose CSS `position` is
|
|
799
|
+
* `sticky`, as a jQuery object, or `null` if there is none. It walks out of
|
|
800
|
+
* shadow roots to their hosts. Returns `null` right away for `<html>`,
|
|
801
|
+
* `<body>`, or the document.
|
|
802
|
+
* Accepts a DOM element or a jQuery object. For a jQuery object, starts
|
|
803
|
+
* from its first element.
|
|
804
|
+
*/
|
|
805
|
+
getFirstStickyPositionParent(element: JQuery | HTMLElement): JQuery | null
|
|
806
|
+
/**
|
|
807
|
+
* Rounds a point to whole pixels so it stays inside the element it targets.
|
|
808
|
+
* `xPosition` (`'left'`, `'center'`, or `'right'`) and `yPosition` (`'top'`,
|
|
809
|
+
* `'center'`, or `'bottom'`) say which edge the point sits on, and both
|
|
810
|
+
* default to `'center'`. A left or top edge rounds up, a center rounds down,
|
|
811
|
+
* and a right or bottom edge rounds down and then subtracts 1.
|
|
812
|
+
* Returns an object with `x` and `y`.
|
|
813
|
+
*/
|
|
814
|
+
getCoordsByPosition(left: number, top: number, xPosition?: 'left' | 'center' | 'right', yPosition?: 'top' | 'center' | 'bottom'): { x: number, y: number }
|
|
815
|
+
/**
|
|
816
|
+
* Returns an element's `width`, `height`, `scrollTop`, and `scrollLeft`, and
|
|
817
|
+
* the position of its box measured three ways: `fromElViewport` is relative
|
|
818
|
+
* to the viewport of the window the element is in, `fromElWindow` is
|
|
819
|
+
* relative to that window's document (so it includes the window's scroll),
|
|
820
|
+
* and `fromAutWindow` is relative to your application's top-level window,
|
|
821
|
+
* adding the offsets of any iframes in between.
|
|
822
|
+
* Accepts a DOM element or a jQuery object. For a jQuery object, measures its
|
|
823
|
+
* first element.
|
|
824
|
+
*/
|
|
702
825
|
getElementPositioning(element: JQuery | HTMLElement): ElementPositioning
|
|
826
|
+
/**
|
|
827
|
+
* Returns the topmost element at a point in `doc`'s viewport, looking inside
|
|
828
|
+
* open shadow roots, or `null` when the point is outside the viewport.
|
|
829
|
+
*/
|
|
703
830
|
getElementAtPointFromViewport(doc: Document, x: number, y: number): Element | null
|
|
831
|
+
/**
|
|
832
|
+
* Returns the same measurements as `getElementPositioning()`, with `x` and
|
|
833
|
+
* `y` added to `fromElViewport`, `fromElWindow`, and `fromAutWindow` for a
|
|
834
|
+
* point at `position` inside the element. `position` defaults to `'center'`
|
|
835
|
+
* and can be `'topLeft'`, `'top'`, `'topRight'`, `'left'`, `'center'`,
|
|
836
|
+
* `'right'`, `'bottomLeft'`, `'bottom'`, or `'bottomRight'`. Any other value
|
|
837
|
+
* throws a `TypeError`.
|
|
838
|
+
* Accepts a DOM element or a jQuery object.
|
|
839
|
+
*/
|
|
704
840
|
getElementCoordinatesByPosition(element: JQuery | HTMLElement, position?: string): ElementCoordinates
|
|
841
|
+
/**
|
|
842
|
+
* Like `getElementCoordinatesByPosition()`, but the point is `x` and `y`
|
|
843
|
+
* pixels from the element's top-left corner, as in `.click(x, y)`. The
|
|
844
|
+
* returned `top` and `left` values are shifted by `x` and `y` as well.
|
|
845
|
+
* Accepts a DOM element or a jQuery object.
|
|
846
|
+
*/
|
|
705
847
|
getElementCoordinatesByPositionRelativeToXY(element: JQuery | HTMLElement, x: number, y: number): ElementPositioning
|
|
848
|
+
/**
|
|
849
|
+
* Returns the element that hosts editing for `element`: the closest element,
|
|
850
|
+
* starting with `element` itself, that has a `contenteditable` attribute
|
|
851
|
+
* other than `"false"`. If there is none, returns the document's `<html>`
|
|
852
|
+
* element, which is the editing host when the document is in `designMode`.
|
|
853
|
+
* Pass a DOM element.
|
|
854
|
+
*/
|
|
706
855
|
getHostContenteditable(element: HTMLElement): HTMLElement
|
|
856
|
+
/**
|
|
857
|
+
* Returns the start and end offsets of the current text selection in an
|
|
858
|
+
* `<input>`, a `<textarea>`, or a contenteditable element. Returns
|
|
859
|
+
* `{ start: 0, end: 0 }` for any other element. Pass a DOM element.
|
|
860
|
+
*/
|
|
707
861
|
getSelectionBounds(element: HTMLElement): { start: number, end: number }
|
|
708
862
|
}
|
|
709
863
|
|
|
@@ -1345,9 +1499,12 @@ declare namespace Cypress {
|
|
|
1345
1499
|
/**
|
|
1346
1500
|
* Save/Restore browser Cookies, LocalStorage, and SessionStorage data resulting from the supplied `setup` function.
|
|
1347
1501
|
*
|
|
1502
|
+
* Yields the status of the session: `'created'` when `setup` ran for a new session, `'restored'` when a saved
|
|
1503
|
+
* session was restored, or `'recreated'` when a restored session failed validation and `setup` ran again.
|
|
1504
|
+
*
|
|
1348
1505
|
* @see https://on.cypress.io/session
|
|
1349
1506
|
*/
|
|
1350
|
-
session(id: string | object, setup: () => void, options?: SessionOptions): Chainable<
|
|
1507
|
+
session(id: string | object, setup: () => void, options?: SessionOptions): Chainable<'created' | 'restored' | 'recreated'>
|
|
1351
1508
|
|
|
1352
1509
|
/**
|
|
1353
1510
|
* Get the window.document of the page that is currently active.
|
|
@@ -4092,14 +4249,14 @@ declare namespace Cypress {
|
|
|
4092
4249
|
*/
|
|
4093
4250
|
cacheAcrossSpecs?: boolean
|
|
4094
4251
|
/**
|
|
4095
|
-
* Function to run immediately after
|
|
4096
|
-
*
|
|
4097
|
-
*
|
|
4098
|
-
* Cypress command
|
|
4252
|
+
* Function to run immediately after `setup` creates a session, or after a saved session is
|
|
4253
|
+
* restored. The session is invalid if this function throws an exception, contains a failing
|
|
4254
|
+
* Cypress command, returns a Promise that rejects or resolves to `false`, or returns nothing
|
|
4255
|
+
* and its last Cypress command yields `false`. Returning `false` directly, without a Promise,
|
|
4256
|
+
* does not invalidate the session.
|
|
4099
4257
|
*
|
|
4100
4258
|
* If validation fails immediately after `setup`, the test will fail.
|
|
4101
4259
|
* If validation fails after restoring a session, `setup` will re-run.
|
|
4102
|
-
* @default {false}
|
|
4103
4260
|
*/
|
|
4104
4261
|
validate?: () => Promise<false | void> | void
|
|
4105
4262
|
}
|
|
@@ -4322,6 +4479,13 @@ declare namespace Cypress {
|
|
|
4322
4479
|
encoding: Encodings
|
|
4323
4480
|
}
|
|
4324
4481
|
|
|
4482
|
+
/**
|
|
4483
|
+
* What the chai-jquery `match` assertion accepts for a DOM subject: anything jQuery's `.is()` accepts.
|
|
4484
|
+
*
|
|
4485
|
+
* @see http://chaijs.com/plugins/chai-jquery/#matchselector
|
|
4486
|
+
*/
|
|
4487
|
+
type JQueryMatchable = string | Element | ArrayLike<Element> | JQuery<any> | ((this: Element, index: number, element: Element) => boolean)
|
|
4488
|
+
|
|
4325
4489
|
// Kind of onerous, but has a nice auto-complete.
|
|
4326
4490
|
/**
|
|
4327
4491
|
* @see https://on.cypress.io/should
|
|
@@ -5976,10 +6140,11 @@ declare namespace Cypress {
|
|
|
5976
6140
|
* @example
|
|
5977
6141
|
* cy.get('#result').should('have.attr', 'role')
|
|
5978
6142
|
* cy.get('#result').should('have.attr', 'role', 'menu')
|
|
6143
|
+
* cy.get('#result').should('have.attr', 'tabindex', 0)
|
|
5979
6144
|
* @see http://chaijs.com/plugins/chai-jquery/#attrname-value
|
|
5980
6145
|
* @see https://on.cypress.io/assertions
|
|
5981
6146
|
*/
|
|
5982
|
-
(chainer: 'have.attr', value: string, match?: string): Chainable<Subject>
|
|
6147
|
+
(chainer: 'have.attr', value: string, match?: string | number): Chainable<Subject>
|
|
5983
6148
|
/**
|
|
5984
6149
|
* Assert that the first element of the selection has the given attribute, using `.attr()`. Optionally, assert a particular value as well. The return value is available for chaining.
|
|
5985
6150
|
* @example
|
|
@@ -6003,7 +6168,7 @@ declare namespace Cypress {
|
|
|
6003
6168
|
* @see http://chaijs.com/plugins/chai-jquery/#dataname-value
|
|
6004
6169
|
* @see https://on.cypress.io/assertions
|
|
6005
6170
|
*/
|
|
6006
|
-
(chainer: 'have.data', value: string, match?: string): Chainable<Subject>
|
|
6171
|
+
(chainer: 'have.data', value: string, match?: string | number | boolean | null): Chainable<Subject>
|
|
6007
6172
|
/**
|
|
6008
6173
|
* Assert that the selection contains at least one element which has a descendant matching the given selector, using `.has()`.
|
|
6009
6174
|
* @example
|
|
@@ -6037,13 +6202,13 @@ declare namespace Cypress {
|
|
|
6037
6202
|
*/
|
|
6038
6203
|
(chainer: 'include.html', value: string): Chainable<Subject>
|
|
6039
6204
|
/**
|
|
6040
|
-
* Assert that the first element of the selection has the given id, using `.
|
|
6205
|
+
* Assert that the first element of the selection has the given id, using `.prop('id')`.
|
|
6041
6206
|
* @example
|
|
6042
6207
|
* cy.get('#result').should('have.id', 'result')
|
|
6043
6208
|
* @see http://chaijs.com/plugins/chai-jquery/#idid
|
|
6044
6209
|
* @see https://on.cypress.io/assertions
|
|
6045
6210
|
*/
|
|
6046
|
-
(chainer: 'have.id', value: string
|
|
6211
|
+
(chainer: 'have.id', value: string | number): Chainable<Subject>
|
|
6047
6212
|
/**
|
|
6048
6213
|
* Assert that the first element of the selection has the given property, using `.prop()`. Optionally, assert a particular value as well. The return value is available for chaining.
|
|
6049
6214
|
* @example
|
|
@@ -6060,7 +6225,7 @@ declare namespace Cypress {
|
|
|
6060
6225
|
* @see http://chaijs.com/plugins/chai-jquery/#texttext
|
|
6061
6226
|
* @see https://on.cypress.io/assertions
|
|
6062
6227
|
*/
|
|
6063
|
-
(chainer: 'have.text', value: string): Chainable<Subject>
|
|
6228
|
+
(chainer: 'have.text', value: string | number): Chainable<Subject>
|
|
6064
6229
|
/**
|
|
6065
6230
|
* Assert that the text of the first element of the selection partially contains the given text, using `.text()`.
|
|
6066
6231
|
* @example
|
|
@@ -6068,7 +6233,7 @@ declare namespace Cypress {
|
|
|
6068
6233
|
* @see http://chaijs.com/plugins/chai-jquery/#texttext
|
|
6069
6234
|
* @see https://on.cypress.io/assertions
|
|
6070
6235
|
*/
|
|
6071
|
-
(chainer: 'contain.text', value: string): Chainable<Subject>
|
|
6236
|
+
(chainer: 'contain.text', value: string | number): Chainable<Subject>
|
|
6072
6237
|
/**
|
|
6073
6238
|
* Assert that the text of the first element of the selection partially contains the given text, using `.text()`.
|
|
6074
6239
|
* @example
|
|
@@ -6076,7 +6241,7 @@ declare namespace Cypress {
|
|
|
6076
6241
|
* @see http://chaijs.com/plugins/chai-jquery/#texttext
|
|
6077
6242
|
* @see https://on.cypress.io/assertions
|
|
6078
6243
|
*/
|
|
6079
|
-
(chainer: 'include.text', value: string): Chainable<Subject>
|
|
6244
|
+
(chainer: 'include.text', value: string | number): Chainable<Subject>
|
|
6080
6245
|
/**
|
|
6081
6246
|
* Assert that the first element of the selection has the given value, using `.val()`.
|
|
6082
6247
|
* @example
|
|
@@ -6084,7 +6249,7 @@ declare namespace Cypress {
|
|
|
6084
6249
|
* @see http://chaijs.com/plugins/chai-jquery/#valuevalue
|
|
6085
6250
|
* @see https://on.cypress.io/assertions
|
|
6086
6251
|
*/
|
|
6087
|
-
(chainer: 'have.value', value: string): Chainable<Subject>
|
|
6252
|
+
(chainer: 'have.value', value: string | number): Chainable<Subject>
|
|
6088
6253
|
/**
|
|
6089
6254
|
* Assert that the first element of the selection partially contains the given value, using `.val()`.
|
|
6090
6255
|
* @example
|
|
@@ -6092,7 +6257,7 @@ declare namespace Cypress {
|
|
|
6092
6257
|
* @see http://chaijs.com/plugins/chai-jquery/#valuevalue
|
|
6093
6258
|
* @see https://on.cypress.io/assertions
|
|
6094
6259
|
*/
|
|
6095
|
-
(chainer: 'contain.value', value: string): Chainable<Subject>
|
|
6260
|
+
(chainer: 'contain.value', value: string | number): Chainable<Subject>
|
|
6096
6261
|
/**
|
|
6097
6262
|
* Assert that the first element of the selection partially contains the given value, using `.val()`.
|
|
6098
6263
|
* @example
|
|
@@ -6100,15 +6265,15 @@ declare namespace Cypress {
|
|
|
6100
6265
|
* @see http://chaijs.com/plugins/chai-jquery/#valuevalue
|
|
6101
6266
|
* @see https://on.cypress.io/assertions
|
|
6102
6267
|
*/
|
|
6103
|
-
(chainer: 'include.value', value: string): Chainable<Subject>
|
|
6268
|
+
(chainer: 'include.value', value: string | number): Chainable<Subject>
|
|
6104
6269
|
/**
|
|
6105
|
-
* Assert that the selection matches a given selector, using `.is()`. Note that this overrides the built-in chai assertion. If the
|
|
6270
|
+
* Assert that the selection matches a given selector, element, elements, jQuery object, or predicate, using `.is()`. Note that this overrides the built-in chai assertion. If the subject is not a DOM element or jQuery object, only a regular expression is accepted, and a regular expression never matches a DOM element or jQuery object.
|
|
6106
6271
|
* @example
|
|
6107
6272
|
* cy.get('#result').should('match', ':empty')
|
|
6108
6273
|
* @see http://chaijs.com/plugins/chai-jquery/#matchselector
|
|
6109
6274
|
* @see https://on.cypress.io/assertions
|
|
6110
6275
|
*/
|
|
6111
|
-
(chainer: 'match', value:
|
|
6276
|
+
(chainer: 'match', value: JQueryMatchable): Chainable<Subject>
|
|
6112
6277
|
|
|
6113
6278
|
// jquery-chai.not
|
|
6114
6279
|
/**
|
|
@@ -6204,10 +6369,11 @@ declare namespace Cypress {
|
|
|
6204
6369
|
* @example
|
|
6205
6370
|
* cy.get('#result').should('not.have.attr', 'role')
|
|
6206
6371
|
* cy.get('#result').should('not.have.attr', 'role', 'menu')
|
|
6372
|
+
* cy.get('#result').should('not.have.attr', 'tabindex', 0)
|
|
6207
6373
|
* @see http://chaijs.com/plugins/chai-jquery/#attrname-value
|
|
6208
6374
|
* @see https://on.cypress.io/assertions
|
|
6209
6375
|
*/
|
|
6210
|
-
(chainer: 'not.have.attr', value: string, match?: string): Chainable<Subject>
|
|
6376
|
+
(chainer: 'not.have.attr', value: string, match?: string | number): Chainable<Subject>
|
|
6211
6377
|
/**
|
|
6212
6378
|
* Assert that the first element of the selection does not have the given attribute, using `.attr()`. Optionally, assert a particular value as well. The return value is available for chaining.
|
|
6213
6379
|
* @example
|
|
@@ -6231,7 +6397,7 @@ declare namespace Cypress {
|
|
|
6231
6397
|
* @see http://chaijs.com/plugins/chai-jquery/#dataname-value
|
|
6232
6398
|
* @see https://on.cypress.io/assertions
|
|
6233
6399
|
*/
|
|
6234
|
-
(chainer: 'not.have.data', value: string, match?: string): Chainable<Subject>
|
|
6400
|
+
(chainer: 'not.have.data', value: string, match?: string | number | boolean | null): Chainable<Subject>
|
|
6235
6401
|
/**
|
|
6236
6402
|
* Assert that the selection does not contain at least one element which has a descendant matching the given selector, using `.has()`.
|
|
6237
6403
|
* @example
|
|
@@ -6265,13 +6431,13 @@ declare namespace Cypress {
|
|
|
6265
6431
|
*/
|
|
6266
6432
|
(chainer: 'not.include.html', value: string): Chainable<Subject>
|
|
6267
6433
|
/**
|
|
6268
|
-
* Assert that the first element of the selection does not have the given id, using `.
|
|
6434
|
+
* Assert that the first element of the selection does not have the given id, using `.prop('id')`.
|
|
6269
6435
|
* @example
|
|
6270
6436
|
* cy.get('#result').should('not.have.id', 'result')
|
|
6271
6437
|
* @see http://chaijs.com/plugins/chai-jquery/#idid
|
|
6272
6438
|
* @see https://on.cypress.io/assertions
|
|
6273
6439
|
*/
|
|
6274
|
-
(chainer: 'not.have.id', value: string
|
|
6440
|
+
(chainer: 'not.have.id', value: string | number): Chainable<Subject>
|
|
6275
6441
|
/**
|
|
6276
6442
|
* Assert that the first element of the selection does not have the given property, using `.prop()`. Optionally, assert a particular value as well. The return value is available for chaining.
|
|
6277
6443
|
* @example
|
|
@@ -6288,7 +6454,7 @@ declare namespace Cypress {
|
|
|
6288
6454
|
* @see http://chaijs.com/plugins/chai-jquery/#texttext
|
|
6289
6455
|
* @see https://on.cypress.io/assertions
|
|
6290
6456
|
*/
|
|
6291
|
-
(chainer: 'not.have.text', value: string): Chainable<Subject>
|
|
6457
|
+
(chainer: 'not.have.text', value: string | number): Chainable<Subject>
|
|
6292
6458
|
/**
|
|
6293
6459
|
* Assert that the text of the first element of the selection does not contain the given text, using `.text()`.
|
|
6294
6460
|
* @example
|
|
@@ -6296,7 +6462,7 @@ declare namespace Cypress {
|
|
|
6296
6462
|
* @see http://chaijs.com/plugins/chai-jquery/#texttext
|
|
6297
6463
|
* @see https://on.cypress.io/assertions
|
|
6298
6464
|
*/
|
|
6299
|
-
(chainer: 'not.contain.text', value: string): Chainable<Subject>
|
|
6465
|
+
(chainer: 'not.contain.text', value: string | number): Chainable<Subject>
|
|
6300
6466
|
/**
|
|
6301
6467
|
* Assert that the text of the first element of the selection does not contain the given text, using `.text()`.
|
|
6302
6468
|
* @example
|
|
@@ -6304,7 +6470,7 @@ declare namespace Cypress {
|
|
|
6304
6470
|
* @see http://chaijs.com/plugins/chai-jquery/#texttext
|
|
6305
6471
|
* @see https://on.cypress.io/assertions
|
|
6306
6472
|
*/
|
|
6307
|
-
(chainer: 'not.include.text', value: string): Chainable<Subject>
|
|
6473
|
+
(chainer: 'not.include.text', value: string | number): Chainable<Subject>
|
|
6308
6474
|
/**
|
|
6309
6475
|
* Assert that the first element of the selection does not have the given value, using `.val()`.
|
|
6310
6476
|
* @example
|
|
@@ -6312,7 +6478,7 @@ declare namespace Cypress {
|
|
|
6312
6478
|
* @see http://chaijs.com/plugins/chai-jquery/#valuevalue
|
|
6313
6479
|
* @see https://on.cypress.io/assertions
|
|
6314
6480
|
*/
|
|
6315
|
-
(chainer: 'not.have.value', value: string): Chainable<Subject>
|
|
6481
|
+
(chainer: 'not.have.value', value: string | number): Chainable<Subject>
|
|
6316
6482
|
/**
|
|
6317
6483
|
* Assert that the first element of the selection does not contain the given value, using `.val()`.
|
|
6318
6484
|
* @example
|
|
@@ -6320,7 +6486,7 @@ declare namespace Cypress {
|
|
|
6320
6486
|
* @see http://chaijs.com/plugins/chai-jquery/#valuevalue
|
|
6321
6487
|
* @see https://on.cypress.io/assertions
|
|
6322
6488
|
*/
|
|
6323
|
-
(chainer: 'not.contain.value', value: string): Chainable<Subject>
|
|
6489
|
+
(chainer: 'not.contain.value', value: string | number): Chainable<Subject>
|
|
6324
6490
|
/**
|
|
6325
6491
|
* Assert that the first element of the selection does not contain the given value, using `.val()`.
|
|
6326
6492
|
* @example
|
|
@@ -6328,15 +6494,15 @@ declare namespace Cypress {
|
|
|
6328
6494
|
* @see http://chaijs.com/plugins/chai-jquery/#valuevalue
|
|
6329
6495
|
* @see https://on.cypress.io/assertions
|
|
6330
6496
|
*/
|
|
6331
|
-
(chainer: 'not.include.value', value: string): Chainable<Subject>
|
|
6497
|
+
(chainer: 'not.include.value', value: string | number): Chainable<Subject>
|
|
6332
6498
|
/**
|
|
6333
|
-
* Assert that the selection does not match a given selector, using `.is()`. Note that this overrides the built-in chai assertion. If the
|
|
6499
|
+
* Assert that the selection does not match a given selector, element, elements, jQuery object, or predicate, using `.is()`. Note that this overrides the built-in chai assertion. If the subject is not a DOM element or jQuery object, only a regular expression is accepted, and a regular expression never matches a DOM element or jQuery object.
|
|
6334
6500
|
* @example
|
|
6335
6501
|
* cy.get('#result').should('not.match', ':empty')
|
|
6336
6502
|
* @see http://chaijs.com/plugins/chai-jquery/#matchselector
|
|
6337
6503
|
* @see https://on.cypress.io/assertions
|
|
6338
6504
|
*/
|
|
6339
|
-
(chainer: 'not.match', value:
|
|
6505
|
+
(chainer: 'not.match', value: JQueryMatchable): Chainable<Subject>
|
|
6340
6506
|
|
|
6341
6507
|
// fallback
|
|
6342
6508
|
/**
|
|
@@ -6440,7 +6606,7 @@ declare namespace Cypress {
|
|
|
6440
6606
|
|
|
6441
6607
|
interface BeforeRunDetails {
|
|
6442
6608
|
browser?: Browser
|
|
6443
|
-
config:
|
|
6609
|
+
config: PluginConfigOptions
|
|
6444
6610
|
cypressVersion: string
|
|
6445
6611
|
group?: string
|
|
6446
6612
|
parallel?: boolean
|
|
@@ -100,7 +100,6 @@ function setupHooks(optionalCallback) {
|
|
|
100
100
|
Cypress.Commands.overwrite('origin', () => {
|
|
101
101
|
throw new Error('cy.origin from a component spec is not allowed');
|
|
102
102
|
});
|
|
103
|
-
// @ts-ignore
|
|
104
103
|
Cypress.on('test:before:after:run:async', () => {
|
|
105
104
|
optionalCallback?.();
|
|
106
105
|
});
|
|
@@ -8623,7 +8622,7 @@ function mount(componentOptions, options = {}) {
|
|
|
8623
8622
|
// then wait for cypress to load
|
|
8624
8623
|
return cy.then(() => {
|
|
8625
8624
|
var _a, _b;
|
|
8626
|
-
// @ts-
|
|
8625
|
+
// @ts-expect-error - `cy.state` is internal and not in the public Cypress types
|
|
8627
8626
|
const document = cy.state('document');
|
|
8628
8627
|
const el = getContainerEl();
|
|
8629
8628
|
// merge the extensions with global
|
|
@@ -80,7 +80,6 @@ function setupHooks(optionalCallback) {
|
|
|
80
80
|
Cypress.Commands.overwrite('origin', () => {
|
|
81
81
|
throw new Error('cy.origin from a component spec is not allowed');
|
|
82
82
|
});
|
|
83
|
-
// @ts-ignore
|
|
84
83
|
Cypress.on('test:before:after:run:async', () => {
|
|
85
84
|
optionalCallback?.();
|
|
86
85
|
});
|
|
@@ -8603,7 +8602,7 @@ function mount(componentOptions, options = {}) {
|
|
|
8603
8602
|
// then wait for cypress to load
|
|
8604
8603
|
return cy.then(() => {
|
|
8605
8604
|
var _a, _b;
|
|
8606
|
-
// @ts-
|
|
8605
|
+
// @ts-expect-error - `cy.state` is internal and not in the public Cypress types
|
|
8607
8606
|
const document = cy.state('document');
|
|
8608
8607
|
const el = getContainerEl();
|
|
8609
8608
|
// merge the extensions with global
|
package/vue/package.json
CHANGED
|
@@ -2,11 +2,33 @@
|
|
|
2
2
|
"name": "@cypress/vue",
|
|
3
3
|
"version": "0.0.0-development",
|
|
4
4
|
"description": "Browser-based Component Testing for Vue.js with Cypress.io",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cypress",
|
|
7
|
+
"vue",
|
|
8
|
+
"vue3",
|
|
9
|
+
"component-testing",
|
|
10
|
+
"vue-testing",
|
|
11
|
+
"testing",
|
|
12
|
+
"sfc"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/vue/#readme",
|
|
15
|
+
"bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Fvue&template=1-bug-report.md&title=",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/cypress-io/cypress.git"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
5
21
|
"main": "dist/cypress-vue.cjs.js",
|
|
22
|
+
"module": "dist/cypress-vue.esm-bundler.js",
|
|
23
|
+
"types": "dist/index.d.ts",
|
|
24
|
+
"files": [
|
|
25
|
+
"dist/**/*",
|
|
26
|
+
"src/**/*.js"
|
|
27
|
+
],
|
|
6
28
|
"scripts": {
|
|
7
29
|
"build": "rimraf dist && rollup -c rollup.config.mjs",
|
|
8
30
|
"postbuild": "node ../../scripts/sync-exported-npm-with-cli.js",
|
|
9
|
-
"check-ts": "yarn tsd && vue-tsc --noEmit",
|
|
31
|
+
"check-ts": "yarn tsd && vue-tsc --noEmit && vue-tsc --noEmit -p cypress/tsconfig.json",
|
|
10
32
|
"cy:open": "node ../../scripts/cypress.js open --component --project ${PWD}",
|
|
11
33
|
"cy:run": "node ../../scripts/cypress.js run --component --project ${PWD}",
|
|
12
34
|
"lint": "eslint",
|
|
@@ -14,21 +36,26 @@
|
|
|
14
36
|
"tsd": "yarn build && yarn tsc -p test-tsd/tsconfig.json",
|
|
15
37
|
"watch": "yarn build --watch --watch.exclude ./dist/**/*"
|
|
16
38
|
},
|
|
39
|
+
"lint-staged": {
|
|
40
|
+
"**/*.{js,jsx,ts,tsx,json,vue}": "eslint --fix"
|
|
41
|
+
},
|
|
17
42
|
"devDependencies": {
|
|
18
|
-
"@packages/eslint-config": "0.0.0-development",
|
|
19
43
|
"@cypress/mount-utils": "0.0.0-development",
|
|
20
|
-
"
|
|
21
|
-
"
|
|
44
|
+
"@cypress/vite-plugin-cypress-esm": "0.0.0-development",
|
|
45
|
+
"@intlify/unplugin-vue-i18n": "11.2.5",
|
|
46
|
+
"@packages/eslint-config": "0.0.0-development",
|
|
22
47
|
"@vitejs/plugin-vue": "6.0.6",
|
|
23
48
|
"@vue/compiler-sfc": "3.2.47",
|
|
24
49
|
"@vue/test-utils": "2.4.6",
|
|
25
50
|
"axios": "^1.20.0",
|
|
26
51
|
"cypress": "0.0.0-development",
|
|
52
|
+
"eslint": "^9.31.0",
|
|
53
|
+
"jiti": "^2.4.2",
|
|
27
54
|
"rollup": "^4.60.2",
|
|
28
55
|
"typescript": "~5.4.5",
|
|
29
56
|
"vite": "^8.0.9",
|
|
30
|
-
"vue-eslint-parser": "^10.0.0",
|
|
31
57
|
"vue": "3.2.47",
|
|
58
|
+
"vue-eslint-parser": "^10.0.0",
|
|
32
59
|
"vue-i18n": "9.14.5",
|
|
33
60
|
"vue-router": "^4.0.0",
|
|
34
61
|
"vue-tsc": "^2.0.19",
|
|
@@ -39,45 +66,14 @@
|
|
|
39
66
|
"cypress": ">=7.0.0",
|
|
40
67
|
"vue": ">=3.0.0"
|
|
41
68
|
},
|
|
42
|
-
"files": [
|
|
43
|
-
"dist/**/*",
|
|
44
|
-
"src/**/*.js"
|
|
45
|
-
],
|
|
46
|
-
"engines": {
|
|
47
|
-
"node": "^22.0.0 || ^24.0.0 || >=26.0.0"
|
|
48
|
-
},
|
|
49
|
-
"types": "dist/index.d.ts",
|
|
50
|
-
"license": "MIT",
|
|
51
|
-
"repository": {
|
|
52
|
-
"type": "git",
|
|
53
|
-
"url": "https://github.com/cypress-io/cypress.git"
|
|
54
|
-
},
|
|
55
|
-
"homepage": "https://github.com/cypress-io/cypress/blob/develop/npm/vue/#readme",
|
|
56
|
-
"bugs": "https://github.com/cypress-io/cypress/issues/new?assignees=&labels=npm%3A%20%40cypress%2Fvue&template=1-bug-report.md&title=",
|
|
57
|
-
"keywords": [
|
|
58
|
-
"cypress",
|
|
59
|
-
"vue"
|
|
60
|
-
],
|
|
61
|
-
"contributors": [
|
|
62
|
-
{
|
|
63
|
-
"name": "Jessica Sachs",
|
|
64
|
-
"social": "@JessicaSachs"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"name": "Amir Rustamzadeh",
|
|
68
|
-
"social": "@amirrustam"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"name": "Lachlan Miller",
|
|
72
|
-
"social": "@Lachlan19900"
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
"module": "dist/cypress-vue.esm-bundler.js",
|
|
76
69
|
"peerDependenciesMeta": {
|
|
77
70
|
"@cypress/webpack-dev-server": {
|
|
78
71
|
"optional": true
|
|
79
72
|
}
|
|
80
73
|
},
|
|
74
|
+
"engines": {
|
|
75
|
+
"node": "^22.0.0 || ^24.0.0 || >=26.0.0"
|
|
76
|
+
},
|
|
81
77
|
"publishConfig": {
|
|
82
78
|
"access": "public"
|
|
83
79
|
},
|
|
@@ -90,8 +86,5 @@
|
|
|
90
86
|
]
|
|
91
87
|
}
|
|
92
88
|
}
|
|
93
|
-
},
|
|
94
|
-
"lint-staged": {
|
|
95
|
-
"**/*.{js,jsx,ts,tsx,vue}": "eslint --fix"
|
|
96
89
|
}
|
|
97
90
|
}
|
|
@@ -100,7 +100,6 @@ function setupHooks(optionalCallback) {
|
|
|
100
100
|
Cypress.Commands.overwrite('origin', () => {
|
|
101
101
|
throw new Error('cy.origin from a component spec is not allowed');
|
|
102
102
|
});
|
|
103
|
-
// @ts-ignore
|
|
104
103
|
Cypress.on('test:before:after:run:async', () => {
|
|
105
104
|
optionalCallback?.();
|
|
106
105
|
});
|
|
@@ -8623,7 +8622,7 @@ function mount(componentOptions, options = {}) {
|
|
|
8623
8622
|
// then wait for cypress to load
|
|
8624
8623
|
return cy.then(() => {
|
|
8625
8624
|
var _a, _b;
|
|
8626
|
-
// @ts-
|
|
8625
|
+
// @ts-expect-error - `cy.state` is internal and not in the public Cypress types
|
|
8627
8626
|
const document = cy.state('document');
|
|
8628
8627
|
const el = getContainerEl();
|
|
8629
8628
|
// merge the extensions with global
|