Skip to content

Commit

Permalink
Try to reproduce file not found exception
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirom committed May 29, 2024
1 parent 22780b7 commit 8c3a1e0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8c3a1e0

Please sign in to comment.