.ad files cannot reach off-screen elements, and test --platform skips files without a platform header
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #3234 của @thymikee — đã merge
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- cli
Hướng nghiên cứu
Start in the replay/.ad parser and the command flag table where scroll --until is marked recorded: false; the scroll handler is what rejects the extra argument, and wait --raw fails through the same argument splitter. For part 2, find where test --platform assembles the internal missing platform metadata skip reason and where the user-facing No replay tests matched error is built. Part 3 is a flag table for help scripting. Done means scroll down --until 'id="x"' works inside a .ad file, the platform error names the skip reason, and the docs list which CLI flags are valid in .ad files.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I use agent-device test with .ad files to replay example apps on an Android emulator and an iOS simulator. Three things make long screens hard to replay in a deterministic way. Version: 0.21.20.
1. .ad files cannot reach an off-screen element
wait, is, and press only see elements that are on screen. That is fine. But I cannot get an element on screen in a .ad file in a viewport-independent way:
scroll down --until 'label="ok:ready"'works from the CLI. In a.adfile it fails withscroll amount must be a number, because--untilis not parsed (it isrecorded: falsein the flag table).wait id="x" --rawandwait --raw id="x"both fail in a.adfile (is followed by unexpected extra arguments/mixes plain word "--raw").
So a .ad file has to use fixed scroll down steps. They pass on one screen size and fail on another. Example: the same flow passed on a Medium Phone emulator and failed on an iPhone 17 simulator, because the target button was one page lower.
Repro:
open "com.example.app" --relaunch
scroll down --until 'id="far-button"'
press id="far-button"
close
Expected: the scroll repeats until far-button is visible, as it does in the CLI.
Actual: scroll amount must be a number.
Request: support --until <selector> for scroll in .ad files (and replays), or give .ad files another way to bring a selector on screen.
2. test --platform skips files that have no platform metadata
agent-device test e2e/*.ad --platform android --serial emulator-5554 fails with No replay tests matched for --platform android. when the .ad files have no platform header. Without --platform the same files run on that serial. The skip reason (missing platform metadata for --platform android) is only in the internal entry, not in the error the user sees.
Request: when --serial or --udid already selects the device, treat header-less files as runnable on that platform, or say in the error that the files were skipped because they have no platform header, and how to add one.
3. Docs
I could not find the .ad syntax for flags per command, or a list of which CLI flags work inside .ad files. A short table in help scripting would have saved me some time.
Thanks for the tool. My workaround for 1 is an accessible element that stays on screen and carries all result values in its label. It works, but it means changing the app for the test runner.
- Ngôn ngữ chính
- TypeScript
- Star
- 4.9k
- Fork
- 328
- Merge trung bình
- 12 giờ 13 phút
- Pull request đã merge (30 ngày)
- 541
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstack/agent-device
-
settings clear-app-state fails with ENOENT … scandir '(null)' for iOS system apps such as SettingsCó thể đã có người làm @thymikee đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
callstack/agent-device#3305 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
callstack/agent-device#1869 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
install and reinstall from another session in the same daemon replace the app on a claimed deviceĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
callstack/agent-device#3345 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
callstack/agent-device#3344 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
callstack/agent-device#3342 · 7 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của callstack/agent-device
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
MystenLabs/MemWal#1163 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Mondriaan
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
knaw-huc/textannoviz#709 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
billion-context-pi
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
ranxianglei/billion-context#2521 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: YRF Music NepalĐang mởstreams:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100