aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2023-10-17 11:55:38 +0200
committerGitHub <noreply@github.com>2023-10-17 11:55:38 +0200
commit69eb904426e64649fc7228b0d6803469911267d7 (patch)
treea4c1448de8301f91856917dfcbe3c0f13d0e25ae /src/tests
parentdocs(changelog): cyberpunk themes (diff)
downloadsl0ppij-69eb904426e64649fc7228b0d6803469911267d7.tar.gz
sl0ppij-69eb904426e64649fc7228b0d6803469911267d7.tar.xz
sl0ppij-69eb904426e64649fc7228b0d6803469911267d7.zip
feat(panes): Add an option to press <ESC> and drop to shell in command panes (#2872)
* feat(panes): ESC to drop to default shell on command panes * style(fmt): rustfmt
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/e2e/cases.rs8
-rw-r--r--src/tests/e2e/snapshots/zellij__tests__e2e__cases__quit_and_resurrect_session.snap4
-rw-r--r--src/tests/e2e/snapshots/zellij__tests__e2e__cases__quit_and_resurrect_session_with_viewport_serialization.snap4
-rw-r--r--src/tests/e2e/snapshots/zellij__tests__e2e__cases__send_command_through_the_cli.snap48
4 files changed, 32 insertions, 32 deletions
diff --git a/src/tests/e2e/cases.rs b/src/tests/e2e/cases.rs
index c5110b69..be337ea9 100644
--- a/src/tests/e2e/cases.rs
+++ b/src/tests/e2e/cases.rs
@@ -2070,7 +2070,7 @@ pub fn send_command_through_the_cli() {
// so when we press "Enter", it will run again and we'll see two "foo"s one after the other,
// that's how we know the whole flow is working
let fake_win_size = Size {
- cols: 120,
+ cols: 150,
rows: 24,
};
let mut test_attempts = 10;
@@ -2118,7 +2118,7 @@ pub fn send_command_through_the_cli() {
instruction: |mut remote_terminal: RemoteTerminal| -> bool {
let mut step_is_complete = false;
if remote_terminal.snapshot_contains("<Ctrl-c>")
- && remote_terminal.cursor_position_is(61, 3)
+ && remote_terminal.cursor_position_is(76, 3)
{
remote_terminal.send_key(&SPACE); // re-run script - here we use SPACE
// instead of the default ENTER because
@@ -2135,7 +2135,7 @@ pub fn send_command_through_the_cli() {
instruction: |mut remote_terminal: RemoteTerminal| -> bool {
let mut step_is_complete = false;
if remote_terminal.snapshot_contains("<Ctrl-c>")
- && remote_terminal.cursor_position_is(61, 4)
+ && remote_terminal.cursor_position_is(76, 4)
{
step_is_complete = true
}
@@ -2149,7 +2149,7 @@ pub fn send_command_through_the_cli() {
instruction: |remote_terminal: RemoteTerminal| -> bool {
let mut step_is_complete = false;
if remote_terminal.snapshot_contains("foo")
- && remote_terminal.cursor_position_is(61, 4)
+ && remote_terminal.cursor_position_is(76, 4)
{
step_is_complete = true
}
diff --git a/src/tests/e2e/snapshots/zellij__tests__e2e__cases__quit_and_resurrect_session.snap b/src/tests/e2e/snapshots/zellij__tests__e2e__cases__quit_and_resurrect_session.snap
index a7c58010..fd55ac42 100644
--- a/src/tests/e2e/snapshots/zellij__tests__e2e__cases__quit_and_resurrect_session.snap
+++ b/src/tests/e2e/snapshots/zellij__tests__e2e__cases__quit_and_resurrect_session.snap
@@ -17,10 +17,10 @@ expression: last_snapshot
│ │ │ │ │────────────────────────────┘
│ │ │ Waiting to run: top │ │────────────────────────────┐
│ │ │ │ │ │
-│ │ │ <ENTER> to run, <Ctrl-c> to exit │ │ │
+│ │ │ <ENTER> run, <ESC> drop to shell, <Ctrl-c> exit │ │ │
│ └─│ │ │ │
│ │ │ │ │
-│ └─ <ENTER> to run, <Ctrl-c> to exit ─────────────────────┘ │ │
+│ └─ <ENTER> run, <ESC> drop to shell, <Ctrl-c> exit ──────┘ │ │
│ │ │ │
│ └────────────────────────────────────────────────────────┘ │
│ ││ │
diff --git a/src/tests/e2e/snapshots/zellij__tests__e2e__cases__quit_and_resurrect_session_with_viewport_serialization.snap b/src/tests/e2e/snapshots/zellij__tests__e2e__cases__quit_and_resurrect_session_with_viewport_serialization.snap
index 51031337..f3677360 100644
--- a/src/tests/e2e/snapshots/zellij__tests__e2e__cases__quit_and_resurrect_session_with_viewport_serialization.snap
+++ b/src/tests/e2e/snapshots/zellij__tests__e2e__cases__quit_and_resurrect_session_with_viewport_serialization.snap
@@ -17,10 +17,10 @@ expression: last_snapshot
│ │ │ │ │────────────────────────────┘
│ │ │ Waiting to run: top │ │────────────────────────────┐
│ │ │ │ │ │
-│ │ │ <ENTER> to run, <Ctrl-c> to exit │ │ │
+│ │ │ <ENTER> run, <ESC> drop to shell, <Ctrl-c> exit │ │ │
│ └─│ │ │ │
│ │ │ │ │
-│ └─ <ENTER> to run, <Ctrl-c> to exit ─────────────────────┘ │ │
+│ └─ <ENTER> run, <ESC> drop to shell, <Ctrl-c> exit ──────┘ │ │
│ │ │ │
│ └────────────────────────────────────────────────────────┘ │
│ ││ │
diff --git a/src/tests/e2e/snapshots/zellij__tests__e2e__cases__send_command_through_the_cli.snap b/src/tests/e2e/snapshots/zellij__tests__e2e__cases__send_command_through_the_cli.snap
index 343e574a..4d255521 100644
--- a/src/tests/e2e/snapshots/zellij__tests__e2e__cases__send_command_through_the_cli.snap
+++ b/src/tests/e2e/snapshots/zellij__tests__e2e__cases__send_command_through_the_cli.snap
@@ -1,29 +1,29 @@
---
source: src/tests/e2e/cases.rs
-assertion_line: 2031
+assertion_line: 2175
expression: last_snapshot
---
Zellij (e2e-test)  Tab #1 
-┌ Pane #1 ─────────────────────────────────────────────────┐┌ /usr/src/zellij/fixtures/append-echo-script.sh ──────────┐
-│$ /usr/src/zellij/x86_64-unknown-linux-musl/release/zellij││foo │
-│ run -s -- "/usr/src/zellij/fixtures/append-echo-script.sh││foo │
-│" ││█ │
-│$ ││ │
-│ ││ │
-│ ││ │
-│ ││ │
-│ ││ │
-│ ││ │
-│ ││ │
-│ ││ │
-│ ││ │
-│ ││ │
-│ ││ │
-│ ││ │
-│ ││ │
-│ ││ │
-│ ││ │
-│ ││ │
-└──────────────────────────────────────────────────────────┘└ [ EXIT CODE: 0 ] <ENTER> to re-run, <Ctrl-c> to exit ────┘
- Ctrl + <g> LOCK  <p> PANE  <t> TAB  <n> RESIZE  <h> MOVE  <s> SEARCH  <o> SESSION  <q> QUIT 
- Tip: Alt + <n> => new pane. Alt + <←↓↑→> or Alt + <hjkl> => navigate. Alt + <+|-> => resize pane.
+┌ Pane #1 ────────────────────────────────────────────────────────────────┐┌ /usr/src/zellij/fixtures/append-echo-script.sh ─────────────────────────┐
+│$ /usr/src/zellij/x86_64-unknown-linux-musl/release/zellij run -s -- "/us││foo │
+│r/src/zellij/fixtures/append-echo-script.sh" ││foo │
+│$ ││█ │
+│ ││ │
+│ ││ │
+│ ││ │
+│ ││ │
+│ ││ │
+│ ││ │
+│ ││ │
+│ ││ │
+│ ││ │
+│ ││ │
+│ ││ │
+│ ││ │
+│ ││ │
+│ ││ │
+│ ││ │
+│ ││ │
+└─────────────────────────────────────────────────────────────────────────┘└ [ EXIT CODE: 0 ] <ENTER> re-run, <ESC> drop to shell, <Ctrl-c> exit ────┘
+ Ctrl + <g> LOCK  <p> PANE  <t> TAB  <n> RESIZE  <h> MOVE  <s> SEARCH  <o> SESSION  <q> QUIT  Alt + <[]>  VERTICAL 
+ Tip: Alt + <n> => open new pane. Alt + <←↓↑→> or Alt + <hjkl> => navigate between panes. Alt + <+|-> => increase/decrease pane size.