Test Window.can_steal_focus.
(manager_nospawn)
| 351 | |
| 352 | @pytest.mark.usefixtures("hook_fixture") |
| 353 | def test_can_steal_focus(manager_nospawn): |
| 354 | """ |
| 355 | Test Window.can_steal_focus. |
| 356 | """ |
| 357 | |
| 358 | class AntiFocusStealConfig(BareConfig): |
| 359 | hook.subscribe.group_window_add(set_steal_focus) |
| 360 | |
| 361 | manager_nospawn.start(AntiFocusStealConfig) |
| 362 | manager_nospawn.test_window("one") |
| 363 | assert_unfocused(manager_nospawn, "one") |
| 364 | |
| 365 | manager_nospawn.test_window("two") |
| 366 | assert_unfocused(manager_nospawn, "one") |
| 367 | assert_unfocused(manager_nospawn, "two") |
| 368 | |
| 369 | manager_nospawn.test_window("three") |
| 370 | assert_focused(manager_nospawn, "three") |
| 371 | |
| 372 | |
| 373 | class FollowMuseFocus(ManagerConfig): |
nothing calls this directly
no test coverage detected