Get a function that returns the active token. Args: hybrid_properties: harness for HybridProperties app. driver: WebDriver instance. Returns: The token for the connected client
(hybrid_properties: AppHarness, driver: WebDriver)
| 190 | |
| 191 | @pytest.fixture |
| 192 | def token(hybrid_properties: AppHarness, driver: WebDriver) -> str: |
| 193 | """Get a function that returns the active token. |
| 194 | |
| 195 | Args: |
| 196 | hybrid_properties: harness for HybridProperties app. |
| 197 | driver: WebDriver instance. |
| 198 | |
| 199 | Returns: |
| 200 | The token for the connected client |
| 201 | """ |
| 202 | assert hybrid_properties.app_instance is not None |
| 203 | token_input = AppHarness.poll_for_or_raise_timeout( |
| 204 | lambda: driver.find_element(By.ID, "token") |
| 205 | ) |
| 206 | |
| 207 | # wait for the backend connection to send the token |
| 208 | token = hybrid_properties.poll_for_value(token_input, timeout=DEFAULT_TIMEOUT * 2) |
| 209 | assert token is not None |
| 210 | |
| 211 | return token |
| 212 | |
| 213 | |
| 214 | def test_hybrid_properties( |
nothing calls this directly
no test coverage detected