name: Browser can screenshot
steps:
- step: I have a "my_test.toolproof.yml" file with the content {yaml}
yaml: |-
name: Inner passing test
steps:
- I have a "public/index.html" file with the content "<p>Hello World</p>"
- I serve the directory "public"
- In my browser, I load "/"
- step: In my browser, I evaluate {js}
js: |-
await toolproof.querySelector("p");
- In my browser, I screenshot the element "p" to "shot/p.webp"
- I run "ls shot"
- stdout should contain "p.webp"
- I run "%toolproof_path% --timeout 60"
- step: "stdout should contain 'Total passing tests: 1'"
- step: "stdout should contain 'Failing tests: 0'"
- step: "stdout should contain 'All tests passed'"