Get an instance of the browser open to the dynamic components app. Args: icons: AppHarness for the dynamic components Yields: WebDriver instance.
(icons: AppHarness)
| 68 | |
| 69 | @pytest.fixture |
| 70 | def driver(icons: AppHarness): |
| 71 | """Get an instance of the browser open to the dynamic components app. |
| 72 | |
| 73 | Args: |
| 74 | icons: AppHarness for the dynamic components |
| 75 | |
| 76 | Yields: |
| 77 | WebDriver instance. |
| 78 | """ |
| 79 | driver = icons.frontend() |
| 80 | try: |
| 81 | token_input = AppHarness.poll_for_or_raise_timeout( |
| 82 | lambda: driver.find_element(By.ID, "token") |
| 83 | ) |
| 84 | # wait for the backend connection to send the token |
| 85 | token = icons.poll_for_value(token_input) |
| 86 | assert token is not None |
| 87 | |
| 88 | yield driver |
| 89 | finally: |
| 90 | driver.quit() |
| 91 | |
| 92 | |
| 93 | def test_icons(driver: WebDriver, icons: AppHarness): |
nothing calls this directly
no test coverage detected