File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -512,6 +512,37 @@ def test_resize(
512512 assert window_height_before < window_height_expanded
513513
514514
515+ @pytest .mark .skipif (
516+ has_lt_version ("3.2" ),
517+ reason = "Only 3.2+ has the -a and -b flag on new-window" ,
518+ )
519+ def test_new_window_with_direction (
520+ session : Session ,
521+ ) -> None :
522+ """Verify new window with direction."""
523+ window = session .active_window
524+ window .refresh ()
525+
526+ window_initial = session .new_window (window_name = "Example" )
527+ assert window_initial .window_index == "2"
528+
529+ window_before = window_initial .new_window (
530+ window_name = "Window before" , direction = WindowDirection .Before
531+ )
532+ window_initial .refresh ()
533+ assert window_before .window_index == "2"
534+ assert window_initial .window_index == "3"
535+
536+ window_after = window_initial .new_window (
537+ window_name = "Window after" , direction = WindowDirection .After
538+ )
539+ window_initial .refresh ()
540+ window_after .refresh ()
541+ assert window_after .window_index == "4"
542+ assert window_initial .window_index == "3"
543+ assert window_before .window_index == "2"
544+
545+
515546@pytest .mark .skipif (
516547 has_gte_version ("3.2" ),
517548 reason = "Only 3.2+ has the -a and -b flag on new-window" ,
You can’t perform that action at this time.
0 commit comments