Skip to content

Commit

Permalink
Merge pull request #87 from RajashekarRaju/shreyas/screenshot-tests-s…
Browse files Browse the repository at this point in the history
…creens

Added screenshot tests for all screens
  • Loading branch information
yesshreyes authored Feb 6, 2025
2 parents 6159129 + 52065bc commit a650b52
Show file tree
Hide file tree
Showing 24 changed files with 99 additions and 8 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ fun AboutScreen(

@Preview(showBackground = true)
@Composable
private fun AboutScreenLightPreview() {
fun AboutScreenLightPreview() {
ComposeActorsTheme(darkTheme = false) {
AboutScreen { }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private fun ActorDetailsUIDarkPreview() {

@Preview(showBackground = true)
@Composable
private fun ActorDetailsUILightPreview() {
fun ActorDetailsUILightPreview() {
ComposeActorsTheme(darkTheme = false) {
ActorDetailsUI(
data = ActorDetailsData(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private fun FeatureComingSoonTextUI() {

@Preview
@Composable
private fun FavoriteScreenUILightPreview() {
fun FavoriteScreenUILightPreview() {
ComposeActorsTheme(darkTheme = false) {
FavoritesScreenUI(
favoriteMovies = emptyList(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private fun HomeScreenUI(

@Preview(showBackground = true)
@Composable
private fun HomeScreenUILightPreview() {
fun HomeScreenUILightPreview() {
ComposeActorsTheme(darkTheme = false) {
HomeScreenUI(
navigateToSelectedPerson = {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private fun ItemOptionRow(
@OptIn(ExperimentalMaterialApi::class)
@Preview
@Composable
private fun OptionsModalSheetContentLightPreview() {
fun OptionsModalSheetContentLightPreview() {
ComposeActorsTheme(darkTheme = false) {
OptionsModalSheetContent(
modalSheetSheet = ModalBottomSheetState(ModalBottomSheetValue.Expanded),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private fun ActorBiographyText(

@Preview
@Composable
private fun SheetContentActorDetailsLightPreview() {
fun SheetContentActorDetailsLightPreview() {
ComposeActorsTheme(darkTheme = false) {
SheetContentActorDetails(
actor = fakePersonDetail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ private fun MovieOverviewText(

@Preview(showBackground = true)
@Composable
private fun SheetContentMovieDetailsLightPreview() {
fun SheetContentMovieDetailsLightPreview() {
ComposeActorsTheme(darkTheme = false) {
SheetContentMovieDetails(
movie = fakeMovieDetail,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private fun GetBottomSheetContent(

@Preview(showBackground = true)
@Composable
private fun MovieDetailsUILightPreview() {
fun MovieDetailsUILightPreview() {
ComposeActorsTheme(darkTheme = false) {
MovieDetailsContent(
data = MovieDetailsData(
Expand Down
11 changes: 11 additions & 0 deletions app/src/screenshotTest/kotlin/AboutScreenScreenshotTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.developersbreach.composeactors.screenshotTests

import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import com.developersbreach.composeactors.ui.screens.about.AboutScreenLightPreview

@Preview
@Composable
private fun AboutScreenUIPreviewTest() {
AboutScreenLightPreview()
}
12 changes: 12 additions & 0 deletions app/src/screenshotTest/kotlin/ActorDetailsScreenshotTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.developersbreach.composeactors.screenshotTests

import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import com.developersbreach.composeactors.ui.screens.actorDetails.ActorDetailsUILightPreview


@Preview
@Composable
private fun ActorDetailsUIPreviewTest() {
ActorDetailsUILightPreview()
}
12 changes: 12 additions & 0 deletions app/src/screenshotTest/kotlin/FavoritesScreenScreenshotTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.developersbreach.composeactors.screenshotTests

import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import com.developersbreach.composeactors.ui.screens.favorites.FavoriteScreenUILightPreview


@Preview
@Composable
private fun FavoritesScreenUIPreviewTest() {
FavoriteScreenUILightPreview()
}
11 changes: 11 additions & 0 deletions app/src/screenshotTest/kotlin/HomeScreenScreenshotTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.developersbreach.composeactors.screenshotTests

import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import com.developersbreach.composeactors.ui.screens.home.HomeScreenUILightPreview

@Preview
@Composable
private fun HomeScreenUIPreviewTest() {
HomeScreenUILightPreview()
}
11 changes: 11 additions & 0 deletions app/src/screenshotTest/kotlin/MovieDetailsScreenshotTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.developersbreach.composeactors.screenshotTests

import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import com.developersbreach.composeactors.ui.screens.movieDetail.MovieDetailsUILightPreview

@Preview
@Composable
private fun MovieDetailUIPreviewTest() {
MovieDetailsUILightPreview()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.developersbreach.composeactors.screenshotTests

import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import com.developersbreach.composeactors.ui.screens.modalSheets.OptionsModalSheetContentLightPreview


@Preview
@Composable
private fun OptionsModalSheetContentUIPreviewTest() {
OptionsModalSheetContentLightPreview()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.developersbreach.composeactors.screenshotTests

import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import com.developersbreach.composeactors.ui.screens.modalSheets.SheetContentActorDetailsLightPreview

@Preview
@Composable
private fun SheetContentActorDetailsUIPreviewTest() {
SheetContentActorDetailsLightPreview()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package com.developersbreach.composeactors.screenshotTests

import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import com.developersbreach.composeactors.ui.screens.modalSheets.SheetContentMovieDetailsLightPreview

@Preview
@Composable
private fun SheetContentMovieDetailsUIPreviewTest() {
SheetContentMovieDetailsLightPreview()
}

0 comments on commit a650b52

Please sign in to comment.