|
1 | 1 | // TypeScript Version: 2.8 |
2 | 2 |
|
3 | | -import { |
4 | | - SelectorMatcherOptions as DTLSelectorMatcherOptions, |
5 | | - Matcher, |
6 | | - MatcherOptions as DTLMatcherOptions, |
7 | | - getByTestId, |
8 | | -} from '@testing-library/dom' |
| 3 | +import { Matcher, MatcherOptions as DTLMatcherOptions, SelectorMatcherOptions as DTLSelectorMatcherOptions } from '@testing-library/dom'; |
9 | 4 |
|
10 | 5 | export interface CTLMatcherOptions { |
11 | 6 | timeout?: number |
@@ -153,11 +148,11 @@ declare global { |
153 | 148 | getBySelectText<E extends Node = HTMLElement>( |
154 | 149 | id: Matcher, |
155 | 150 | options?: MatcherOptions, |
156 | | - ): Chainable<E> |
| 151 | + ): Chainable<JQuery<E>> |
157 | 152 | getBySelectText<K extends keyof HTMLElementTagNameMap>( |
158 | 153 | id: Matcher, |
159 | 154 | options?: MatcherOptions, |
160 | | - ): Chainable<HTMLElementTagNameMap[K]> |
| 155 | + ): Chainable<JQuery<HTMLElementTagNameMap[K]>> |
161 | 156 |
|
162 | 157 | /** |
163 | 158 | * dom-testing-library helpers for Cypress |
@@ -233,11 +228,11 @@ declare global { |
233 | 228 | getByText<E extends Node = HTMLElement>( |
234 | 229 | id: Matcher, |
235 | 230 | options?: SelectorMatcherOptions, |
236 | | - ): Chainable<E> |
| 231 | + ): Chainable<JQuery<E>> |
237 | 232 | getByText<K extends keyof HTMLElementTagNameMap>( |
238 | 233 | id: Matcher, |
239 | 234 | options?: SelectorMatcherOptions, |
240 | | - ): Chainable<HTMLElementTagNameMap[K]> |
| 235 | + ): Chainable<JQuery<HTMLElementTagNameMap[K]>> |
241 | 236 |
|
242 | 237 | /** |
243 | 238 | * dom-testing-library helpers for Cypress |
@@ -313,11 +308,11 @@ declare global { |
313 | 308 | getByLabelText<E extends Node = HTMLElement>( |
314 | 309 | id: Matcher, |
315 | 310 | options?: SelectorMatcherOptions, |
316 | | - ): Chainable<E> |
| 311 | + ): Chainable<JQuery<E>> |
317 | 312 | getByLabelText<K extends keyof HTMLElementTagNameMap>( |
318 | 313 | id: Matcher, |
319 | 314 | options?: SelectorMatcherOptions, |
320 | | - ): Chainable<HTMLElementTagNameMap[K]> |
| 315 | + ): Chainable<JQuery<HTMLElementTagNameMap[K]>> |
321 | 316 |
|
322 | 317 | /** |
323 | 318 | * dom-testing-library helpers for Cypress |
@@ -393,11 +388,11 @@ declare global { |
393 | 388 | getByAltText<E extends Node = HTMLElement>( |
394 | 389 | id: Matcher, |
395 | 390 | options?: MatcherOptions, |
396 | | - ): Chainable<E> |
| 391 | + ): Chainable<JQuery<E>> |
397 | 392 | getByAltText<K extends keyof HTMLElementTagNameMap>( |
398 | 393 | id: Matcher, |
399 | 394 | options?: MatcherOptions, |
400 | | - ): Chainable<HTMLElementTagNameMap[K]> |
| 395 | + ): Chainable<JQuery<HTMLElementTagNameMap[K]>> |
401 | 396 |
|
402 | 397 | /** |
403 | 398 | * dom-testing-library helpers for Cypress |
@@ -473,11 +468,11 @@ declare global { |
473 | 468 | getByTestId<E extends Node = HTMLElement>( |
474 | 469 | id: Matcher, |
475 | 470 | options?: MatcherOptions, |
476 | | - ): Chainable<E> |
| 471 | + ): Chainable<JQuery<E>> |
477 | 472 | getByTestId<K extends keyof HTMLElementTagNameMap>( |
478 | 473 | id: Matcher, |
479 | 474 | options?: MatcherOptions, |
480 | | - ): Chainable<HTMLElementTagNameMap[K]> |
| 475 | + ): Chainable<JQuery<HTMLElementTagNameMap[K]>> |
481 | 476 |
|
482 | 477 | /** |
483 | 478 | * dom-testing-library helpers for Cypress |
@@ -553,11 +548,11 @@ declare global { |
553 | 548 | getByTitle<E extends Node = HTMLElement>( |
554 | 549 | id: Matcher, |
555 | 550 | options?: MatcherOptions, |
556 | | - ): Chainable<E> |
| 551 | + ): Chainable<JQuery<E>> |
557 | 552 | getByTitle<K extends keyof HTMLElementTagNameMap>( |
558 | 553 | id: Matcher, |
559 | 554 | options?: MatcherOptions, |
560 | | - ): Chainable<HTMLElementTagNameMap[K]> |
| 555 | + ): Chainable<JQuery<HTMLElementTagNameMap[K]>> |
561 | 556 |
|
562 | 557 | /** |
563 | 558 | * dom-testing-library helpers for Cypress |
@@ -633,11 +628,11 @@ declare global { |
633 | 628 | getByDisplayValue<E extends Node = HTMLElement>( |
634 | 629 | id: Matcher, |
635 | 630 | options?: MatcherOptions, |
636 | | - ): Chainable<E> |
| 631 | + ): Chainable<JQuery<E>> |
637 | 632 | getByDisplayValue<K extends keyof HTMLElementTagNameMap>( |
638 | 633 | id: Matcher, |
639 | 634 | options?: MatcherOptions, |
640 | | - ): Chainable<HTMLElementTagNameMap[K]> |
| 635 | + ): Chainable<JQuery<HTMLElementTagNameMap[K]>> |
641 | 636 |
|
642 | 637 | /** |
643 | 638 | * dom-testing-library helpers for Cypress |
@@ -713,11 +708,11 @@ declare global { |
713 | 708 | getByRole<E extends Node = HTMLElement>( |
714 | 709 | id: Matcher, |
715 | 710 | options?: MatcherOptions, |
716 | | - ): Chainable<E> |
| 711 | + ): Chainable<JQuery<E>> |
717 | 712 | getByRole<K extends keyof HTMLElementTagNameMap>( |
718 | 713 | id: Matcher, |
719 | 714 | options?: MatcherOptions, |
720 | | - ): Chainable<HTMLElementTagNameMap[K]> |
| 715 | + ): Chainable<JQuery<HTMLElementTagNameMap[K]>> |
721 | 716 |
|
722 | 717 | /** |
723 | 718 | * dom-testing-library helpers for Cypress |
|
0 commit comments