Skip to content

Commit

Permalink
add note sentence
Browse files Browse the repository at this point in the history
  • Loading branch information
YusukeMoriJapan committed Sep 26, 2024
1 parent eb17d18 commit 6db7528
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 47 deletions.
28 changes: 5 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1014,29 +1014,11 @@ roborazzi {
}
```
<details>
<summary>build.gradle version</summary>
<br>
```groovy
roborazzi {
generateComposePreviewRobolectricTests.enable.set(true)
// The package names to scan for Composable Previews.
generateComposePreviewRobolectricTests.packages.set(["com.example"])
// robolectricConfig will be passed to Robolectric's @Config annotation in the generated test class.
// See https://robolectric.org/configuring/ for more information.
generateComposePreviewRobolectricTests.robolectricConfig.set([
"sdk": "[32]",
"qualifiers": "RobolectricDeviceQualifiers.Pixel5",
])
// If true, the private previews will be included in the test.
generateComposePreviewRobolectricTests.includePrivatePreviews.set(true)
// The fully qualified class name of the custom test class that implements [com.github.takahirom.roborazzi.ComposePreviewTester].
generateComposePreviewRobolectricTests.testerQualifiedClassName.set("com.example.MyCustomComposePreviewTester")
}
```
</details>
> **Note**
> If you are using build.gradle instead of build.gradle.kts, you need to use the set method for each assignment, like
> ```kotlin
> generateComposePreviewRobolectricTests.packages.set(["com.example"])
> ```
## Manually adding Compose Preview screenshot tests
Expand Down
29 changes: 5 additions & 24 deletions docs/topics/preview_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,30 +45,11 @@ roborazzi {
}
```

<details>
<summary>build.gradle version</summary>
<br>

```groovy
roborazzi {
generateComposePreviewRobolectricTests.enable.set(true)
// The package names to scan for Composable Previews.
generateComposePreviewRobolectricTests.packages.set(["com.example"])
// robolectricConfig will be passed to Robolectric's @Config annotation in the generated test class.
// See https://robolectric.org/configuring/ for more information.
generateComposePreviewRobolectricTests.robolectricConfig.set([
"sdk": "[32]",
"qualifiers": "RobolectricDeviceQualifiers.Pixel5",
])
// If true, the private previews will be included in the test.
generateComposePreviewRobolectricTests.includePrivatePreviews.set(true)
// The fully qualified class name of the custom test class that implements [com.github.takahirom.roborazzi.ComposePreviewTester].
generateComposePreviewRobolectricTests.testerQualifiedClassName.set("com.example.MyCustomComposePreviewTester")
}
```

</details>

> **Note**
> If you are using build.gradle instead of build.gradle.kts, you need to use the set method for each assignment, like
> ```kotlin
> generateComposePreviewRobolectricTests.packages.set(["com.example"])
> ```
## Manually adding Compose Preview screenshot tests
Expand Down

0 comments on commit 6db7528

Please sign in to comment.