|
15 | 15 | from selenium.webdriver.common.keys import Keys |
16 | 16 | from selenium.webdriver.remote.webelement import WebElement |
17 | 17 | from selenium.webdriver.support import expected_conditions as selenium_conditions |
| 18 | +from typing_extensions import assert_type |
18 | 19 |
|
19 | 20 | from screenpy_selenium import ( |
20 | 21 | AcceptAlert, |
@@ -354,6 +355,14 @@ def test_can_be_instantiated(self) -> None: |
354 | 355 | assert isinstance(e6, Enter) |
355 | 356 | assert isinstance(e7, Enter) |
356 | 357 | assert isinstance(e8, Enter) |
| 358 | + assert_type(e1, Enter) |
| 359 | + assert_type(e2, Enter) |
| 360 | + assert_type(e3, Enter) |
| 361 | + assert_type(e4, Enter) |
| 362 | + assert_type(e5, Enter) |
| 363 | + assert_type(e6, Enter) |
| 364 | + assert_type(e7, Enter) |
| 365 | + assert_type(e8, Enter) |
357 | 366 |
|
358 | 367 | def test_implements_protocol(self) -> None: |
359 | 368 | e = Enter("") |
@@ -617,6 +626,10 @@ def test_can_be_instantiated(self) -> None: |
617 | 626 | assert isinstance(hd2, HoldDown) |
618 | 627 | assert isinstance(hd3, HoldDown) |
619 | 628 | assert isinstance(hd4, HoldDown) |
| 629 | + assert_type(hd1, HoldDown) |
| 630 | + assert_type(hd2, HoldDown) |
| 631 | + assert_type(hd3, HoldDown) |
| 632 | + assert_type(hd4, HoldDown) |
620 | 633 |
|
621 | 634 | def test_implements_protocol(self) -> None: |
622 | 635 | h = HoldDown.left_mouse_button() |
@@ -916,6 +929,9 @@ def test_can_be_instantiated(self) -> None: |
916 | 929 | assert isinstance(r1, Release) |
917 | 930 | assert isinstance(r2, Release) |
918 | 931 | assert isinstance(r3, Release) |
| 932 | + assert_type(r1, Release) |
| 933 | + assert_type(r2, Release) |
| 934 | + assert_type(r3, Release) |
919 | 935 |
|
920 | 936 | def test_implements_protocol(self) -> None: |
921 | 937 | r = Release.left_mouse_button() |
|
0 commit comments