-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Android Compose Screenshot Testing, remove Paparazzi
- Loading branch information
1 parent
8b09077
commit ac123a9
Showing
73 changed files
with
468 additions
and
543 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...PlaceholderScreenshotTest.InitialLoadingPlaceholderTest_5bdc6066_da39a3ee_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...ndar.ui.failure.NoInternetScreenshotTest.NoInternetTest_5bdc6066_da39a3ee_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...e.OtherNetworkErrorScreenshotTest.OtherNetworkErrorTest_5bdc6066_0b1e2353_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...e.OtherNetworkErrorScreenshotTest.OtherNetworkErrorTest_5bdc6066_0b1e2353_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...ndarScreenHeaderScreenshotTest.CalendarScreenHeaderTest_5bdc6066_da39a3ee_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions
22
...shotTest/kotlin/ru/pixnews/feature/calendar/ui/InitialLoadingPlaceholderScreenshotTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (c) 2024, the Pixnews project authors and contributors. Please see the AUTHORS file for details. | ||
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. | ||
*/ | ||
|
||
@file:Suppress("PREVIEW_ANNOTATION") | ||
|
||
package ru.pixnews.feature.calendar.ui | ||
|
||
import androidx.compose.runtime.Composable | ||
import ru.pixnews.foundation.ui.theme.PixnewsTheme | ||
import ru.pixnews.library.ui.tooling.ScreenshotTestPreview | ||
|
||
class InitialLoadingPlaceholderScreenshotTest { | ||
@Composable | ||
@ScreenshotTestPreview | ||
fun InitialLoadingPlaceholderTest() { | ||
PixnewsTheme(useDynamicColor = false) { | ||
InitialLoadingPlaceholder() | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
.../screenshotTest/kotlin/ru/pixnews/feature/calendar/ui/failure/NoInternetScreenshotTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (c) 2024, the Pixnews project authors and contributors. Please see the AUTHORS file for details. | ||
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. | ||
*/ | ||
|
||
@file:Suppress("PREVIEW_ANNOTATION") | ||
|
||
package ru.pixnews.feature.calendar.ui.failure | ||
|
||
import androidx.compose.runtime.Composable | ||
import ru.pixnews.foundation.ui.theme.PixnewsTheme | ||
import ru.pixnews.library.ui.tooling.ScreenshotTestPreview | ||
|
||
class NoInternetScreenshotTest { | ||
@Composable | ||
@ScreenshotTestPreview | ||
fun NoInternetTest() { | ||
PixnewsTheme(useDynamicColor = false) { | ||
NoInternet() | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
...shotTest/kotlin/ru/pixnews/feature/calendar/ui/failure/OtherNetworkErrorScreenshotTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright (c) 2024, the Pixnews project authors and contributors. Please see the AUTHORS file for details. | ||
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. | ||
*/ | ||
|
||
@file:Suppress("PREVIEW_ANNOTATION") | ||
|
||
package ru.pixnews.feature.calendar.ui.failure | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.tooling.preview.PreviewParameter | ||
import androidx.compose.ui.tooling.preview.PreviewParameterProvider | ||
import ru.pixnews.foundation.ui.theme.PixnewsTheme | ||
import ru.pixnews.library.ui.tooling.ScreenshotTestPreview | ||
|
||
class OtherNetworkErrorScreenshotTest { | ||
@Composable | ||
@ScreenshotTestPreview | ||
fun OtherNetworkErrorTest( | ||
@PreviewParameter(RefreshActiveProvider::class) refreshActive: Boolean, | ||
) { | ||
PixnewsTheme(useDynamicColor = false) { | ||
OtherNetworkError( | ||
onRefreshClicked = { }, | ||
refreshActive = { refreshActive }, | ||
) | ||
} | ||
} | ||
|
||
class RefreshActiveProvider : PreviewParameterProvider<Boolean> { | ||
override val values: Sequence<Boolean> = sequenceOf(false, true) | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...r/ui/header/CalendarHeaderTestFixtures.kt → ...r/ui/header/CalendarHeaderTestFixtures.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...otTest/kotlin/ru/pixnews/feature/calendar/ui/header/CalendarScreenHeaderScreenshotTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (c) 2024, the Pixnews project authors and contributors. Please see the AUTHORS file for details. | ||
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. | ||
*/ | ||
|
||
@file:Suppress("PREVIEW_ANNOTATION") | ||
|
||
package ru.pixnews.feature.calendar.ui.header | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.mutableStateOf | ||
import androidx.compose.runtime.remember | ||
import kotlinx.collections.immutable.toImmutableList | ||
import ru.pixnews.feature.calendar.model.GameListViewMode.GRID | ||
import ru.pixnews.foundation.ui.theme.PixnewsTheme | ||
import ru.pixnews.library.ui.tooling.ScreenshotTestPreview | ||
|
||
class CalendarScreenHeaderScreenshotTest { | ||
@Composable | ||
@ScreenshotTestPreview | ||
fun CalendarScreenHeaderTest() { | ||
PixnewsTheme(useDynamicColor = false) { | ||
CalendarScreenHeader( | ||
onSearch = {}, | ||
onDaySelectionClick = {}, | ||
onYearMonthSelectionClick = {}, | ||
onOpenFilterClick = {}, | ||
onViewModeClick = {}, | ||
onFilterChipClick = {}, | ||
activeDate = remember { mutableStateOf(CalendarHeaderTestFixtures.activeDate) }, | ||
games = CalendarHeaderTestFixtures.gamesSummaryOnActiveDate, | ||
chips = CalendarHeaderTestFixtures.chips.toImmutableList(), | ||
viewMode = remember { mutableStateOf(GRID) }, | ||
) | ||
} | ||
} | ||
} |
34 changes: 0 additions & 34 deletions
34
...src/test/kotlin/ru/pixnews/feature/calendar/ui/InitialLoadingPlaceholderScreenshotTest.kt
This file was deleted.
Oops, something went wrong.
34 changes: 0 additions & 34 deletions
34
...public/src/test/kotlin/ru/pixnews/feature/calendar/ui/failure/NoInternetScreenshotTest.kt
This file was deleted.
Oops, something went wrong.
49 changes: 0 additions & 49 deletions
49
...src/test/kotlin/ru/pixnews/feature/calendar/ui/failure/OtherNetworkErrorScreenshotTest.kt
This file was deleted.
Oops, something went wrong.
49 changes: 0 additions & 49 deletions
49
...c/test/kotlin/ru/pixnews/feature/calendar/ui/header/CalendarScreenHeaderScreenshotTest.kt
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
.../ru.pixnews.feature.calendar.ui.failure_NoInternetScreenshotTest_noInternet.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...failure_OtherNetworkErrorScreenshotTest_checkOtherNetworkErrorRefreshActive.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...lure_OtherNetworkErrorScreenshotTest_checkOtherNetworkErrorRefreshNotActive.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...ndar.ui.header_CalendarScreenHeaderScreenshotTest_checkCalendarScreenHeader.png
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...r.ui_InitialLoadingPlaceholderScreenshotTest_checkInitialLoadingPlaceholder.png
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...tomNavigationBarScreenshots.YopLevelDestinationCalendar_9a706e2b_51c44502_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...tomNavigationBarScreenshots.YopLevelDestinationCalendar_9a706e2b_51c44502_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...tomNavigationBarScreenshots.YopLevelDestinationCalendar_9a706e2b_51c44502_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.