Skip to content

Commit 188c562

Browse files
github-actions[bot]munezaclovisclaude
committed
fix(e2e): update tests for lipgloss UI output changes
The UI revamp moved all CLI output to os.Stderr for lipgloss styling. E2e scripts were capturing stdout only; add 2>&1 to capture stderr too. Also update assertions to match the new output format. Co-authored-by: Clovis <munezaclovis@users.noreply.github.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 17e309a commit 188c562

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

scripts/e2e/dynamic-unlink.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sudo -E pv unlink e2e-static
66
sleep 2
77

88
# Verify removed from list
9-
if pv list | grep -q "e2e-static"; then
9+
if pv list 2>&1 | grep -q "e2e-static"; then
1010
echo "FAIL: e2e-static still in list after unlink"
1111
exit 1
1212
fi

scripts/e2e/lifecycle.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ echo "OK: pv use php:8.4 works"
2222

2323
# Unlink e2e-php83 to free PHP 8.3
2424
sudo -E pv unlink e2e-php83
25-
if pv list | grep -q "e2e-php83"; then
25+
if pv list 2>&1 | grep -q "e2e-php83"; then
2626
echo "FAIL: e2e-php83 still in list"; exit 1
2727
fi
2828
echo "OK: e2e-php83 unlinked"
@@ -32,7 +32,7 @@ pv php remove 8.3
3232
if [ -d ~/.pv/php/8.3 ]; then
3333
echo "FAIL: PHP 8.3 directory still exists"; exit 1
3434
fi
35-
PHP_OUT=$(pv php list)
35+
PHP_OUT=$(pv php list 2>&1)
3636
echo "$PHP_OUT"
3737
if echo "$PHP_OUT" | grep -qE "8\.3"; then
3838
echo "FAIL: 8.3 still in php list"; exit 1

scripts/e2e/link-verify.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pv link /tmp/e2e-octane --name e2e-octane
99
pv link /tmp/e2e-php83 --name e2e-php83
1010

1111
echo "==> pv list"
12-
OUTPUT=$(pv list)
12+
OUTPUT=$(pv list 2>&1)
1313
echo "$OUTPUT"
1414
assert_contains "$OUTPUT" "e2e-static" "e2e-static not in list"
1515
assert_contains "$OUTPUT" "e2e-php" "e2e-php not in list"
@@ -20,10 +20,10 @@ echo "$OUTPUT" | grep "e2e-octane" | grep -q "laravel-octane" || { echo "FAIL: o
2020
echo "$OUTPUT" | grep "e2e-php83" | grep -q "8.3" || { echo "FAIL: php83 version wrong"; exit 1; }
2121

2222
echo "==> pv php list (project associations)"
23-
PHP_OUTPUT=$(pv php list)
23+
PHP_OUTPUT=$(pv php list 2>&1)
2424
echo "$PHP_OUTPUT"
2525
echo "$PHP_OUTPUT" | grep "8.3" | grep -q "e2e-php83" || { echo "FAIL: php83 not associated with 8.3"; exit 1; }
26-
echo "$PHP_OUTPUT" | grep "8.4" | grep -q "(default)" || { echo "FAIL: 8.4 not marked default"; exit 1; }
26+
echo "$PHP_OUTPUT" | grep "8.4" | grep -q "(global)" || { echo "FAIL: 8.4 not marked default"; exit 1; }
2727

2828
echo "==> Verify site configs"
2929

scripts/e2e/start-curl.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ sudo -E pv start &
66
sleep 8
77

88
echo "==> pv status"
9-
STATUS=$(sudo -E pv status)
9+
STATUS=$(sudo -E pv status 2>&1)
1010
echo "$STATUS"
11-
assert_contains "$STATUS" "running" "server not running"
11+
assert_contains "$STATUS" "Running" "server not running"
1212
assert_contains "$STATUS" "8.4 (global)" "global PHP not shown"
1313
assert_contains "$STATUS" "5 linked" "wrong site count"
1414

scripts/e2e/stop.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ source "$(dirname "$0")/helpers.sh"
44

55
sudo -E pv stop
66
sleep 2
7-
STATUS=$(pv status)
7+
STATUS=$(pv status 2>&1)
88
echo "$STATUS"
9-
assert_contains "$STATUS" "stopped" "server not stopped"
9+
assert_contains "$STATUS" "Stopped" "server not stopped"
1010
echo "OK: server stopped"

scripts/e2e/verify-install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ ls -la ~/.pv/php/8.3/frankenphp
1111
ls -la ~/.pv/php/8.3/php
1212

1313
echo "==> pv php list"
14-
OUTPUT=$(pv php list)
14+
OUTPUT=$(pv php list 2>&1)
1515
echo "$OUTPUT"
16-
assert_contains "$OUTPUT" "* 8.4" "8.4 not marked as default"
16+
assert_contains "$OUTPUT" "(global)" "8.4 not marked as default"
1717
assert_contains "$OUTPUT" "8.3" "8.3 not listed"
1818

1919
echo "==> Verify frankenphp symlink points to 8.4"

0 commit comments

Comments
 (0)