[WIP] Step description + Screenshots#142
[WIP] Step description + Screenshots#142stefanrenne wants to merge 26 commits intotheappbusiness:developfrom
Conversation
…application state & ElementAttributes
|
Hello! Thanks for taking the time to do this :) it would be super if you could create issues to discuss changes like this before working on changes because if we decide not to incorporate this then you will have wasted your time |
|
|
||
| override func preLaunchSetup(_ launch: @escaping () -> Void) { | ||
| resetAllPrivacyPrompts() | ||
| resetAllPrivacyPrompts().execute() |
There was a problem hiding this comment.
I'm not really a fan of having to call execute all over the place :/
There was a problem hiding this comment.
I get that, the problem is that I need to return a description. Suggestions are welcome.
TABTestKit/Classes/TABTestCase.swift
Outdated
There was a problem hiding this comment.
I'm pretty sure XCUI already adds screenshots when a failure happens anyway?
There was a problem hiding this comment.
Have to check that, will come back to that
| @@ -21,83 +16,40 @@ public typealias And = Step | |||
| /// | |||
| /// Do not use this Step type directly, instead use one of the typealiases above, like Given, When, Then or And. | |||
There was a problem hiding this comment.
If we do go ahead with these changes, the docs will need updating
There was a problem hiding this comment.
I know, that's in the TODO in the description of this pr. Together with extend tests. Because I first wanted to pitch this idea to you guys before finishing this task
TABTestKit/Classes/BDD/Step.swift
Outdated
There was a problem hiding this comment.
Wondering if instead of classes we could make Step a protocol instead, and then have Given/When/Then/And conform to Step? That way you'd still have lightweight structs but you'd be able to tell the difference between Given/When etc
There was a problem hiding this comment.
Great addition, the only thing left was storing the current step, so I decided to move that to TABTestCase, so now you can access it like this: TABTestCase.current?.step
There was a problem hiding this comment.
Ahh yes of course. What about just TABTestCase.currentStep? It can be a static property on TABTestCase rather than an instance property on TABTestCase, if that makes sense?
There was a problem hiding this comment.
fine with me :) Processed feedback
What's in this PR?
This pr's adds a description for every step & adds the ability to create screenshots
As example, this is what the current unit tests generate:
TODO
Pre-merge checklist
Before merging any PR, please check the following common things that should be done beforehand. These aren't all always required, so just check the box if it doesn't apply.
TABTestKittarget, notPods-TABTestKit_Exampleetc.pod installto ensure that the latest changes are in the Example project. Without this, Carthage might not see the latest changes.CHANGELOG. For any changes pending a release, add to the Pending section. For releases, move everything pending to the release section.README. Add info for any new features, update existing info for anything that's changed or needs extra info.