diff options
Diffstat (limited to 'src/tests/e2e/cases.rs')
-rw-r--r-- | src/tests/e2e/cases.rs | 80 |
1 files changed, 4 insertions, 76 deletions
diff --git a/src/tests/e2e/cases.rs b/src/tests/e2e/cases.rs index 7457ed544..63e2d6778 100644 --- a/src/tests/e2e/cases.rs +++ b/src/tests/e2e/cases.rs @@ -458,9 +458,8 @@ pub fn close_tab() { name: "Wait for tab to close", instruction: |mut remote_terminal: RemoteTerminal| -> bool { let mut step_is_complete = false; - if remote_terminal.cursor_position_is(3, 2) + if remote_terminal.snapshot_contains("Tab #1") && !remote_terminal.snapshot_contains("Tab #2") - && remote_terminal.tip_appears() { // cursor is in the first tab again step_is_complete = true; @@ -475,7 +474,8 @@ pub fn close_tab() { break last_snapshot; } }; - assert_snapshot!(last_snapshot); + assert!(last_snapshot.contains("Tab #1")); + assert!(!last_snapshot.contains("Tab #2")); } #[test] @@ -950,47 +950,12 @@ pub fn detach_and_attach_session() { #[test] #[ignore] -pub fn accepts_basic_layout() { - let fake_win_size = Size { - cols: 120, - rows: 24, - }; - let layout_file_name = "three-panes-with-nesting.yaml"; - let mut test_attempts = 10; - let last_snapshot = loop { - RemoteRunner::kill_running_sessions(fake_win_size); - let mut runner = RemoteRunner::new_with_layout(fake_win_size, layout_file_name); - runner.run_all_steps(); - let last_snapshot = runner.take_snapshot_after(Step { - name: "Wait for app to load", - instruction: |remote_terminal: RemoteTerminal| -> bool { - let mut step_is_complete = false; - if remote_terminal.cursor_position_is(3, 1) - && remote_terminal.snapshot_contains("$ █ ││$") - && remote_terminal.snapshot_contains("$ ") { - step_is_complete = true; - } - step_is_complete - }, - }); - if runner.test_timed_out && test_attempts > 0 { - test_attempts -= 1; - continue; - } else { - break last_snapshot; - } - }; - assert_snapshot!(last_snapshot); -} - -#[test] -#[ignore] pub fn status_bar_loads_custom_keybindings() { let fake_win_size = Size { cols: 120, rows: 24, }; - let config_file_name = "changed_keys.yaml"; + let config_file_name = "changed_keys.kdl"; let mut test_attempts = 10; let last_snapshot = loop { RemoteRunner::kill_running_sessions(fake_win_size); @@ -1720,43 +1685,6 @@ pub fn toggle_floating_panes() { #[test] #[ignore] -pub fn focus_tab_with_layout() { - let fake_win_size = Size { - cols: 120, - rows: 24, - }; - let layout_file_name = "focus-tab-layout.yaml"; - let mut test_attempts = 10; - let last_snapshot = loop { - RemoteRunner::kill_running_sessions(fake_win_size); - let mut runner = RemoteRunner::new_with_layout(fake_win_size, layout_file_name); - runner.run_all_steps(); - let last_snapshot = runner.take_snapshot_after(Step { - name: "Wait for app to load", - instruction: |remote_terminal: RemoteTerminal| -> bool { - let mut step_is_complete = false; - if remote_terminal.status_bar_appears() - && remote_terminal.tip_appears() - && remote_terminal.snapshot_contains("Tab #9") - && remote_terminal.cursor_position_is(63, 2) - { - step_is_complete = true; - } - step_is_complete - }, - }); - if runner.test_timed_out && test_attempts > 0 { - test_attempts -= 1; - continue; - } else { - break last_snapshot; - } - }; - assert_snapshot!(last_snapshot); -} - -#[test] -#[ignore] pub fn tmux_mode() { let fake_win_size = Size { cols: 120, |