{"action":"created","issue":{"url":"https://api.github.com/repos/wix/detox/issues/807","repository_url":"https://api.github.com/repos/wix/detox","labels_url":"https://api.github.com/repos/wix/detox/issues/807/labels{/name}","comments_url":"https://api.github.com/repos/wix/detox/issues/807/comments","events_url":"https://api.github.com/repos/wix/detox/issues/807/events","html_url":"https://github.com/wix/detox/issues/807","id":337376730,"node_id":"MDU6SXNzdWUzMzczNzY3MzA=","number":807,"title":"Support for screenshots in the middle of a test","user":{"login":"luisnaranjo733","id":1091547,"node_id":"MDQ6VXNlcjEwOTE1NDc=","avatar_url":"https://avatars3.githubusercontent.com/u/1091547?v=4","gravatar_id":"","url":"https://api.github.com/users/luisnaranjo733","html_url":"https://github.com/luisnaranjo733","followers_url":"https://api.github.com/users/luisnaranjo733/followers","following_url":"https://api.github.com/users/luisnaranjo733/following{/other_user}","gists_url":"https://api.github.com/users/luisnaranjo733/gists{/gist_id}","starred_url":"https://api.github.com/users/luisnaranjo733/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luisnaranjo733/subscriptions","organizations_url":"https://api.github.com/users/luisnaranjo733/orgs","repos_url":"https://api.github.com/users/luisnaranjo733/repos","events_url":"https://api.github.com/users/luisnaranjo733/events{/privacy}","received_events_url":"https://api.github.com/users/luisnaranjo733/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-07-02T05:41:58Z","updated_at":"2018-07-02T15:17:05Z","closed_at":null,"author_association":"NONE","body":"The artifacts API in its current form enables screenshots to be easily taken before and after each test.\r\nWhat if the test wants to take a screenshot at some arbitrary point in the middle of the test?\r\n\r\nA few scenarios where this would be valuable:\r\n\r\n- Using detox to take screenshots of various screens for QA purposes. If the tests could control when screenshots are taken, they could navigate, take a screenshot, and then repeat the cycle without having to restart the test to manually trigger an afterEach screenshot capture, thus saving time and effort.\r\n- A test encounters an unexpected state in the middle of the test, and wants to capture the intermediary screen (that the afterEach screenshot may be too late to capture)\r\n- A test just wants to capture a screenshot of some valid intermediary state for human sanity checking purposes that is not available at the end of the test.\r\n\r\nPerhaps the API could look something like this:\r\n```\r\n// detox could append \".png\" and put this in the same folder as beforeEach.png and afterEach.png\r\nawait device.takeScreenshot(\"exampleScreenShotName\");\r\n```\r\n\r\nWould love to see what you guys think about this :)"},"comment":{"url":"https://api.github.com/repos/wix/detox/issues/comments/401839741","html_url":"https://github.com/wix/detox/issues/807#issuecomment-401839741","issue_url":"https://api.github.com/repos/wix/detox/issues/807","id":401839741,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTgzOTc0MQ==","user":{"login":"noomorph","id":1962469,"node_id":"MDQ6VXNlcjE5NjI0Njk=","avatar_url":"https://avatars1.githubusercontent.com/u/1962469?v=4","gravatar_id":"","url":"https://api.github.com/users/noomorph","html_url":"https://github.com/noomorph","followers_url":"https://api.github.com/users/noomorph/followers","following_url":"https://api.github.com/users/noomorph/following{/other_user}","gists_url":"https://api.github.com/users/noomorph/gists{/gist_id}","starred_url":"https://api.github.com/users/noomorph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noomorph/subscriptions","organizations_url":"https://api.github.com/users/noomorph/orgs","repos_url":"https://api.github.com/users/noomorph/repos","events_url":"https://api.github.com/users/noomorph/events{/privacy}","received_events_url":"https://api.github.com/users/noomorph/received_events","type":"User","site_admin":false},"created_at":"2018-07-02T15:17:05Z","updated_at":"2018-07-02T15:17:05Z","author_association":"CONTRIBUTOR","body":"Yes, generally you are right, but there's still a question how to do it within the current architecture. I think I have a fairly good idea how, but it anyway needs a PoC (maybe I'm wrong about my way to do it) , a discussion with the maintainers (maybe they won't be happy about that way), a first implementation and maybe a consequent rework after a review and a couple discussions, so it is something that definitely is not going to happen sooner than in a month. Please mind that the latter is not an estimate, rather an advice to work around the current limitation if you need something already working for yesterday. I'm looking forward to this API too, so stay tuned - I'll be posting updates here as soon as the work starts on it. "}}
{"actor":{"display_login":"noomorph"}}