Skip to content

Commit

Permalink
Fix not to run Roborazzi implementation when it is normal unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirom committed Nov 4, 2024
1 parent 4918281 commit 57f88bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,7 @@ class RoborazziGradleProjectTest {
removeTests()
record()

// Summary file will be generated even if no test files
checkResultsSummaryFileExists()
checkResultsSummaryFileNotExists()
// Test will be skipped when no source so no output
checkResultFileNotExists(resultFileSuffix)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,11 @@ abstract class RoborazziPlugin : Plugin<Project> {
// Run only root suite
return
}
if (doesRoborazziRunProvider.get()) {
test.infoln("Roborazzi: test.afterSuite ${test.name}")
} else {
return
}

val results: List<CaptureResult> = resultDirFileTree.get().mapNotNull {
if (it.name.endsWith(".json")) {
Expand Down

0 comments on commit 57f88bd

Please sign in to comment.