-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-ui.sh
More file actions
executable file
·32 lines (25 loc) · 816 Bytes
/
test-ui.sh
File metadata and controls
executable file
·32 lines (25 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -e
# Start session
echo "Starting UI Test..."
agent-browser --session ui-test open "http://localhost:3000/project/mock-ui-test"
# Wait for load
agent-browser wait --text "Build an Audiobook Site"
# Snapshot 1: Editor View (Default)
echo "Taking Editor Screenshot..."
agent-browser screenshot editor-view.png
# Switch to Preview
echo "Switching to Preview..."
agent-browser find text "Preview" click
agent-browser wait 1000
agent-browser screenshot preview-view.png
# Switch back to Code
echo "Switching back to Code..."
agent-browser find text "Code" click
agent-browser wait 1000
# Test File Tree Interaction
echo "Testing File Tree..."
agent-browser find text "package.json" click
agent-browser wait 500
agent-browser screenshot file-selected.png
echo "UI Test Complete. Screenshots saved."