horologist
horologist copied to clipboard
Improve ScreenshotBaseTest
WHAT
Improve ScreenshotBaseTest to allow it to set the parameters in a more convenient way, without requiring to call and import screenshotTestRuleParams. For example:
class MyTest : ScreenshotBaseTest({
screenTimeText = {}
enableA11y = true
}) {
WHY
Feedback on usage https://github.com/google/horologist/pull/1312#discussion_r1205741849
HOW
Suggestion of implementation with type safe builders.
We should probably also pick up the record default value from a system property so we can run tests in a record mode, and not edit the files.
Agreed, potentially with a custom gradle task that sets that property and run the tests in record mode.
I think it should be the case for a separated ticket.