diff --git a/include-build/roborazzi-gradle-plugin/src/integrationTest/java/io/github/takahirom/roborazzi/RoborazziGradleProject.kt b/include-build/roborazzi-gradle-plugin/src/integrationTest/java/io/github/takahirom/roborazzi/RoborazziGradleProject.kt index c4d9eb64..b9daf665 100644 --- a/include-build/roborazzi-gradle-plugin/src/integrationTest/java/io/github/takahirom/roborazzi/RoborazziGradleProject.kt +++ b/include-build/roborazzi-gradle-plugin/src/integrationTest/java/io/github/takahirom/roborazzi/RoborazziGradleProject.kt @@ -17,6 +17,11 @@ class RoborazziGradleProject(val testProjectDir: TemporaryFolder) { return runTask(task) } + fun recordAllVariants(): BuildResult { + val task = "recordRoborazzi" + return runTask(task) + } + fun recordWithFilter1(): BuildResult { val task = "recordRoborazziDebug" return runTask( diff --git a/include-build/roborazzi-gradle-plugin/src/integrationTest/java/io/github/takahirom/roborazzi/RoborazziGradleProjectTest.kt b/include-build/roborazzi-gradle-plugin/src/integrationTest/java/io/github/takahirom/roborazzi/RoborazziGradleProjectTest.kt index a54efa63..c2dc5a13 100644 --- a/include-build/roborazzi-gradle-plugin/src/integrationTest/java/io/github/takahirom/roborazzi/RoborazziGradleProjectTest.kt +++ b/include-build/roborazzi-gradle-plugin/src/integrationTest/java/io/github/takahirom/roborazzi/RoborazziGradleProjectTest.kt @@ -53,6 +53,21 @@ class RoborazziGradleProjectTest { } } + @Test + fun recordAllVariantMultipleTimes() { + RoborazziGradleProject(testProjectDir).apply { + for (i in 0 until 10) { + recordAllVariants() + + checkResultsSummaryFileExists() + checkRecordedFileExists("$screenshotAndName.testCapture.png") + checkResultFileExists(resultFileSuffix) + checkRecordedFileNotExists("$screenshotAndName.testCapture_compare.png") + checkRecordedFileNotExists("$screenshotAndName.testCapture_actual.png") + } + } + } + @Test fun whenRecordAndRemovedOutputAndRecordThenSkipAndRestoreTheImages() { RoborazziGradleProject(testProjectDir).apply {