Get an instance of the browser open to the extra overlay app. Args: extra_overlay: harness for the ExtraOverlay app. Yields: WebDriver instance.
(extra_overlay: AppHarness)
| 48 | |
| 49 | @pytest.fixture |
| 50 | def driver(extra_overlay: AppHarness): |
| 51 | """Get an instance of the browser open to the extra overlay app. |
| 52 | |
| 53 | Args: |
| 54 | extra_overlay: harness for the ExtraOverlay app. |
| 55 | |
| 56 | Yields: |
| 57 | WebDriver instance. |
| 58 | """ |
| 59 | driver = extra_overlay.frontend() |
| 60 | try: |
| 61 | token_input = AppHarness.poll_for_or_raise_timeout( |
| 62 | lambda: driver.find_element(By.ID, "token") |
| 63 | ) |
| 64 | # wait for the backend connection to send the token |
| 65 | token = extra_overlay.poll_for_value(token_input) |
| 66 | assert token is not None |
| 67 | |
| 68 | yield driver |
| 69 | finally: |
| 70 | driver.quit() |
| 71 | |
| 72 | |
| 73 | def test_extra_overlay(driver: WebDriver, extra_overlay: AppHarness): |
nothing calls this directly
no test coverage detected