diff --git a/auth/composables/src/main/java/com/google/android/horologist/auth/composables/dialogs/SignedInConfirmationDialog.kt b/auth/composables/src/main/java/com/google/android/horologist/auth/composables/dialogs/SignedInConfirmationDialog.kt index af10b8b30d..b5c783a659 100644 --- a/auth/composables/src/main/java/com/google/android/horologist/auth/composables/dialogs/SignedInConfirmationDialog.kt +++ b/auth/composables/src/main/java/com/google/android/horologist/auth/composables/dialogs/SignedInConfirmationDialog.kt @@ -104,7 +104,7 @@ public fun SignedInConfirmationDialog( } @Composable -private fun SignedInConfirmationDialogContent( +internal fun SignedInConfirmationDialogContent( modifier: Modifier = Modifier, name: String? = null, email: String? = null, diff --git a/roboscreenshots/src/main/java/com/google/android/horologist/screenshots/rng/WearScreenshotTest.kt b/roboscreenshots/src/main/java/com/google/android/horologist/screenshots/rng/WearScreenshotTest.kt index dddccff275..45d5eb6ba9 100644 --- a/roboscreenshots/src/main/java/com/google/android/horologist/screenshots/rng/WearScreenshotTest.kt +++ b/roboscreenshots/src/main/java/com/google/android/horologist/screenshots/rng/WearScreenshotTest.kt @@ -18,10 +18,15 @@ package com.google.android.horologist.screenshots.rng +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier import androidx.compose.ui.test.junit4.ComposeContentTestRule import androidx.compose.ui.test.junit4.createComposeRule import androidx.compose.ui.test.onRoot +import androidx.wear.compose.material.MaterialTheme import com.github.takahirom.roborazzi.ExperimentalRoborazziApi import com.github.takahirom.roborazzi.RoborazziOptions import com.github.takahirom.roborazzi.ThresholdValidator @@ -50,7 +55,9 @@ public abstract class WearScreenshotTest { RuntimeEnvironment.setFontScale(device.fontScale) composeRule.setContent { - content() + Box(modifier = Modifier.fillMaxSize().background(MaterialTheme.colors.background)) { + content() + } } val suffix = "" diff --git a/sample/src/test/kotlin/com/google/android/horologist/screensizes/AuthErrorScreenTest.kt b/sample/src/test/kotlin/com/google/android/horologist/screensizes/AuthErrorScreenTest.kt new file mode 100644 index 0000000000..752fee7e3d --- /dev/null +++ b/sample/src/test/kotlin/com/google/android/horologist/screensizes/AuthErrorScreenTest.kt @@ -0,0 +1,29 @@ +/* + * Copyright 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.android.horologist.screensizes + +import com.google.android.horologist.auth.composables.screens.AuthErrorScreen +import com.google.android.horologist.screenshots.rng.WearDevice +import com.google.android.horologist.screenshots.rng.WearDeviceScreenshotTest +import org.junit.Test + +class AuthErrorScreenTest(device: WearDevice) : WearDeviceScreenshotTest(device = device) { + @Test + fun initial() = runTest { + AuthErrorScreen() + } +} diff --git a/sample/src/test/kotlin/com/google/android/horologist/screensizes/SelectAccountScreenTest.kt b/sample/src/test/kotlin/com/google/android/horologist/screensizes/SelectAccountScreenTest.kt new file mode 100644 index 0000000000..287b97c481 --- /dev/null +++ b/sample/src/test/kotlin/com/google/android/horologist/screensizes/SelectAccountScreenTest.kt @@ -0,0 +1,38 @@ +/* + * Copyright 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.android.horologist.screensizes + +import com.google.android.horologist.auth.composables.model.AccountUiModel +import com.google.android.horologist.auth.composables.screens.SelectAccountScreen +import com.google.android.horologist.compose.layout.belowTimeTextPreview +import com.google.android.horologist.screenshots.rng.WearDevice +import com.google.android.horologist.screenshots.rng.WearDeviceScreenshotTest +import org.junit.Test + +class SelectAccountScreenTest(device: WearDevice) : WearDeviceScreenshotTest(device = device) { + @Test + fun initial() = runTest { + SelectAccountScreen( + accounts = listOf( + AccountUiModel(email = "maggie@example.com"), + AccountUiModel(email = "thisisaverylongemail@example.com"), + ), + onAccountClicked = { _, _ -> }, + columnState = belowTimeTextPreview(), + ) + } +} diff --git a/sample/src/test/kotlin/com/google/android/horologist/screensizes/SignInPlaceholderScreenTest.kt b/sample/src/test/kotlin/com/google/android/horologist/screensizes/SignInPlaceholderScreenTest.kt new file mode 100644 index 0000000000..184f8a4f5e --- /dev/null +++ b/sample/src/test/kotlin/com/google/android/horologist/screensizes/SignInPlaceholderScreenTest.kt @@ -0,0 +1,29 @@ +/* + * Copyright 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.android.horologist.screensizes + +import com.google.android.horologist.auth.composables.screens.SignInPlaceholderScreen +import com.google.android.horologist.screenshots.rng.WearDevice +import com.google.android.horologist.screenshots.rng.WearDeviceScreenshotTest +import org.junit.Test + +class SignInPlaceholderScreenTest(device: WearDevice) : WearDeviceScreenshotTest(device = device) { + @Test + fun initial() = runTest { + SignInPlaceholderScreen() + } +} diff --git a/sample/src/test/kotlin/com/google/android/horologist/screensizes/SignedInConfirmationTest.kt b/sample/src/test/kotlin/com/google/android/horologist/screensizes/SignedInConfirmationTest.kt new file mode 100644 index 0000000000..f2d2062ac5 --- /dev/null +++ b/sample/src/test/kotlin/com/google/android/horologist/screensizes/SignedInConfirmationTest.kt @@ -0,0 +1,37 @@ +/* + * Copyright 2022 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") + +package com.google.android.horologist.screensizes + +import android.R +import com.google.android.horologist.auth.composables.dialogs.SignedInConfirmationDialogContent +import com.google.android.horologist.images.base.paintable.DrawableResPaintable +import com.google.android.horologist.screenshots.rng.WearDevice +import com.google.android.horologist.screenshots.rng.WearDeviceScreenshotTest +import org.junit.Test + +class SignedInConfirmationTest(device: WearDevice) : WearDeviceScreenshotTest(device = device) { + @Test + fun initial() = runTest { + SignedInConfirmationDialogContent( + name = "Maggie", + email = "maggie@example.com", + avatar = DrawableResPaintable(R.mipmap.sym_def_app_icon), + ) + } +} diff --git a/sample/src/test/screenshots/AuthErrorScreenTest_galaxy_watch_5.png b/sample/src/test/screenshots/AuthErrorScreenTest_galaxy_watch_5.png new file mode 100644 index 0000000000..8d05e465da Binary files /dev/null and b/sample/src/test/screenshots/AuthErrorScreenTest_galaxy_watch_5.png differ diff --git a/sample/src/test/screenshots/AuthErrorScreenTest_galaxy_watch_6.png b/sample/src/test/screenshots/AuthErrorScreenTest_galaxy_watch_6.png new file mode 100644 index 0000000000..cce83e1423 Binary files /dev/null and b/sample/src/test/screenshots/AuthErrorScreenTest_galaxy_watch_6.png differ diff --git a/sample/src/test/screenshots/AuthErrorScreenTest_galaxy_watch_6_small_font.png b/sample/src/test/screenshots/AuthErrorScreenTest_galaxy_watch_6_small_font.png new file mode 100644 index 0000000000..6b84a74c5c Binary files /dev/null and b/sample/src/test/screenshots/AuthErrorScreenTest_galaxy_watch_6_small_font.png differ diff --git a/sample/src/test/screenshots/AuthErrorScreenTest_large_round.png b/sample/src/test/screenshots/AuthErrorScreenTest_large_round.png new file mode 100644 index 0000000000..f259853159 Binary files /dev/null and b/sample/src/test/screenshots/AuthErrorScreenTest_large_round.png differ diff --git a/sample/src/test/screenshots/AuthErrorScreenTest_pixel_watch.png b/sample/src/test/screenshots/AuthErrorScreenTest_pixel_watch.png new file mode 100644 index 0000000000..862f804744 Binary files /dev/null and b/sample/src/test/screenshots/AuthErrorScreenTest_pixel_watch.png differ diff --git a/sample/src/test/screenshots/AuthErrorScreenTest_pixel_watch_large_font.png b/sample/src/test/screenshots/AuthErrorScreenTest_pixel_watch_large_font.png new file mode 100644 index 0000000000..c4c888d53c Binary files /dev/null and b/sample/src/test/screenshots/AuthErrorScreenTest_pixel_watch_large_font.png differ diff --git a/sample/src/test/screenshots/AuthErrorScreenTest_small_round.png b/sample/src/test/screenshots/AuthErrorScreenTest_small_round.png new file mode 100644 index 0000000000..862f804744 Binary files /dev/null and b/sample/src/test/screenshots/AuthErrorScreenTest_small_round.png differ diff --git a/sample/src/test/screenshots/AuthErrorScreenTest_ticwatch_pro_5.png b/sample/src/test/screenshots/AuthErrorScreenTest_ticwatch_pro_5.png new file mode 100644 index 0000000000..45714b695c Binary files /dev/null and b/sample/src/test/screenshots/AuthErrorScreenTest_ticwatch_pro_5.png differ diff --git a/sample/src/test/screenshots/CheckYourPhoneTest_galaxy_watch_5.png b/sample/src/test/screenshots/CheckYourPhoneTest_galaxy_watch_5.png index 859416fb5e..26702320db 100644 Binary files a/sample/src/test/screenshots/CheckYourPhoneTest_galaxy_watch_5.png and b/sample/src/test/screenshots/CheckYourPhoneTest_galaxy_watch_5.png differ diff --git a/sample/src/test/screenshots/CheckYourPhoneTest_galaxy_watch_6.png b/sample/src/test/screenshots/CheckYourPhoneTest_galaxy_watch_6.png index 792bc40d77..a546157e48 100644 Binary files a/sample/src/test/screenshots/CheckYourPhoneTest_galaxy_watch_6.png and b/sample/src/test/screenshots/CheckYourPhoneTest_galaxy_watch_6.png differ diff --git a/sample/src/test/screenshots/CheckYourPhoneTest_galaxy_watch_6_small_font.png b/sample/src/test/screenshots/CheckYourPhoneTest_galaxy_watch_6_small_font.png index 752bf4485c..b525a5133a 100644 Binary files a/sample/src/test/screenshots/CheckYourPhoneTest_galaxy_watch_6_small_font.png and b/sample/src/test/screenshots/CheckYourPhoneTest_galaxy_watch_6_small_font.png differ diff --git a/sample/src/test/screenshots/CheckYourPhoneTest_large_round.png b/sample/src/test/screenshots/CheckYourPhoneTest_large_round.png index 90a88d3cd4..a0cfb8d119 100644 Binary files a/sample/src/test/screenshots/CheckYourPhoneTest_large_round.png and b/sample/src/test/screenshots/CheckYourPhoneTest_large_round.png differ diff --git a/sample/src/test/screenshots/CheckYourPhoneTest_pixel_watch.png b/sample/src/test/screenshots/CheckYourPhoneTest_pixel_watch.png index 2641273ac3..1a3813f095 100644 Binary files a/sample/src/test/screenshots/CheckYourPhoneTest_pixel_watch.png and b/sample/src/test/screenshots/CheckYourPhoneTest_pixel_watch.png differ diff --git a/sample/src/test/screenshots/CheckYourPhoneTest_pixel_watch_large_font.png b/sample/src/test/screenshots/CheckYourPhoneTest_pixel_watch_large_font.png index f21a734501..65f8f6b8bb 100644 Binary files a/sample/src/test/screenshots/CheckYourPhoneTest_pixel_watch_large_font.png and b/sample/src/test/screenshots/CheckYourPhoneTest_pixel_watch_large_font.png differ diff --git a/sample/src/test/screenshots/CheckYourPhoneTest_small_round.png b/sample/src/test/screenshots/CheckYourPhoneTest_small_round.png index 2641273ac3..1a3813f095 100644 Binary files a/sample/src/test/screenshots/CheckYourPhoneTest_small_round.png and b/sample/src/test/screenshots/CheckYourPhoneTest_small_round.png differ diff --git a/sample/src/test/screenshots/CheckYourPhoneTest_ticwatch_pro_5.png b/sample/src/test/screenshots/CheckYourPhoneTest_ticwatch_pro_5.png index b6d377d7f2..19bae14a85 100644 Binary files a/sample/src/test/screenshots/CheckYourPhoneTest_ticwatch_pro_5.png and b/sample/src/test/screenshots/CheckYourPhoneTest_ticwatch_pro_5.png differ diff --git a/sample/src/test/screenshots/SelectAccountScreenTest_galaxy_watch_5.png b/sample/src/test/screenshots/SelectAccountScreenTest_galaxy_watch_5.png new file mode 100644 index 0000000000..4e03463cb4 Binary files /dev/null and b/sample/src/test/screenshots/SelectAccountScreenTest_galaxy_watch_5.png differ diff --git a/sample/src/test/screenshots/SelectAccountScreenTest_galaxy_watch_6.png b/sample/src/test/screenshots/SelectAccountScreenTest_galaxy_watch_6.png new file mode 100644 index 0000000000..b51de2bf1e Binary files /dev/null and b/sample/src/test/screenshots/SelectAccountScreenTest_galaxy_watch_6.png differ diff --git a/sample/src/test/screenshots/SelectAccountScreenTest_galaxy_watch_6_small_font.png b/sample/src/test/screenshots/SelectAccountScreenTest_galaxy_watch_6_small_font.png new file mode 100644 index 0000000000..eea50388b7 Binary files /dev/null and b/sample/src/test/screenshots/SelectAccountScreenTest_galaxy_watch_6_small_font.png differ diff --git a/sample/src/test/screenshots/SelectAccountScreenTest_large_round.png b/sample/src/test/screenshots/SelectAccountScreenTest_large_round.png new file mode 100644 index 0000000000..2246655c1d Binary files /dev/null and b/sample/src/test/screenshots/SelectAccountScreenTest_large_round.png differ diff --git a/sample/src/test/screenshots/SelectAccountScreenTest_pixel_watch.png b/sample/src/test/screenshots/SelectAccountScreenTest_pixel_watch.png new file mode 100644 index 0000000000..bdaf3147d4 Binary files /dev/null and b/sample/src/test/screenshots/SelectAccountScreenTest_pixel_watch.png differ diff --git a/sample/src/test/screenshots/SelectAccountScreenTest_pixel_watch_large_font.png b/sample/src/test/screenshots/SelectAccountScreenTest_pixel_watch_large_font.png new file mode 100644 index 0000000000..976de93b5c Binary files /dev/null and b/sample/src/test/screenshots/SelectAccountScreenTest_pixel_watch_large_font.png differ diff --git a/sample/src/test/screenshots/SelectAccountScreenTest_small_round.png b/sample/src/test/screenshots/SelectAccountScreenTest_small_round.png new file mode 100644 index 0000000000..bdaf3147d4 Binary files /dev/null and b/sample/src/test/screenshots/SelectAccountScreenTest_small_round.png differ diff --git a/sample/src/test/screenshots/SelectAccountScreenTest_ticwatch_pro_5.png b/sample/src/test/screenshots/SelectAccountScreenTest_ticwatch_pro_5.png new file mode 100644 index 0000000000..d183e6b452 Binary files /dev/null and b/sample/src/test/screenshots/SelectAccountScreenTest_ticwatch_pro_5.png differ diff --git a/sample/src/test/screenshots/SignInPlaceholderScreenTest_galaxy_watch_5.png b/sample/src/test/screenshots/SignInPlaceholderScreenTest_galaxy_watch_5.png new file mode 100644 index 0000000000..63bc219d03 Binary files /dev/null and b/sample/src/test/screenshots/SignInPlaceholderScreenTest_galaxy_watch_5.png differ diff --git a/sample/src/test/screenshots/SignInPlaceholderScreenTest_galaxy_watch_6.png b/sample/src/test/screenshots/SignInPlaceholderScreenTest_galaxy_watch_6.png new file mode 100644 index 0000000000..acaa958259 Binary files /dev/null and b/sample/src/test/screenshots/SignInPlaceholderScreenTest_galaxy_watch_6.png differ diff --git a/sample/src/test/screenshots/SignInPlaceholderScreenTest_galaxy_watch_6_small_font.png b/sample/src/test/screenshots/SignInPlaceholderScreenTest_galaxy_watch_6_small_font.png new file mode 100644 index 0000000000..b18d29a53f Binary files /dev/null and b/sample/src/test/screenshots/SignInPlaceholderScreenTest_galaxy_watch_6_small_font.png differ diff --git a/sample/src/test/screenshots/SignInPlaceholderScreenTest_large_round.png b/sample/src/test/screenshots/SignInPlaceholderScreenTest_large_round.png new file mode 100644 index 0000000000..641412f5ef Binary files /dev/null and b/sample/src/test/screenshots/SignInPlaceholderScreenTest_large_round.png differ diff --git a/sample/src/test/screenshots/SignInPlaceholderScreenTest_pixel_watch.png b/sample/src/test/screenshots/SignInPlaceholderScreenTest_pixel_watch.png new file mode 100644 index 0000000000..b1faabc50a Binary files /dev/null and b/sample/src/test/screenshots/SignInPlaceholderScreenTest_pixel_watch.png differ diff --git a/sample/src/test/screenshots/SignInPlaceholderScreenTest_pixel_watch_large_font.png b/sample/src/test/screenshots/SignInPlaceholderScreenTest_pixel_watch_large_font.png new file mode 100644 index 0000000000..c14a83c011 Binary files /dev/null and b/sample/src/test/screenshots/SignInPlaceholderScreenTest_pixel_watch_large_font.png differ diff --git a/sample/src/test/screenshots/SignInPlaceholderScreenTest_small_round.png b/sample/src/test/screenshots/SignInPlaceholderScreenTest_small_round.png new file mode 100644 index 0000000000..b1faabc50a Binary files /dev/null and b/sample/src/test/screenshots/SignInPlaceholderScreenTest_small_round.png differ diff --git a/sample/src/test/screenshots/SignInPlaceholderScreenTest_ticwatch_pro_5.png b/sample/src/test/screenshots/SignInPlaceholderScreenTest_ticwatch_pro_5.png new file mode 100644 index 0000000000..0cfb7e8735 Binary files /dev/null and b/sample/src/test/screenshots/SignInPlaceholderScreenTest_ticwatch_pro_5.png differ diff --git a/sample/src/test/screenshots/SignedInConfirmationTest_galaxy_watch_5.png b/sample/src/test/screenshots/SignedInConfirmationTest_galaxy_watch_5.png new file mode 100644 index 0000000000..9a7771917c Binary files /dev/null and b/sample/src/test/screenshots/SignedInConfirmationTest_galaxy_watch_5.png differ diff --git a/sample/src/test/screenshots/SignedInConfirmationTest_galaxy_watch_6.png b/sample/src/test/screenshots/SignedInConfirmationTest_galaxy_watch_6.png new file mode 100644 index 0000000000..998fe98ecc Binary files /dev/null and b/sample/src/test/screenshots/SignedInConfirmationTest_galaxy_watch_6.png differ diff --git a/sample/src/test/screenshots/SignedInConfirmationTest_galaxy_watch_6_small_font.png b/sample/src/test/screenshots/SignedInConfirmationTest_galaxy_watch_6_small_font.png new file mode 100644 index 0000000000..040769aadb Binary files /dev/null and b/sample/src/test/screenshots/SignedInConfirmationTest_galaxy_watch_6_small_font.png differ diff --git a/sample/src/test/screenshots/SignedInConfirmationTest_large_round.png b/sample/src/test/screenshots/SignedInConfirmationTest_large_round.png new file mode 100644 index 0000000000..3a87927655 Binary files /dev/null and b/sample/src/test/screenshots/SignedInConfirmationTest_large_round.png differ diff --git a/sample/src/test/screenshots/SignedInConfirmationTest_pixel_watch.png b/sample/src/test/screenshots/SignedInConfirmationTest_pixel_watch.png new file mode 100644 index 0000000000..8521625398 Binary files /dev/null and b/sample/src/test/screenshots/SignedInConfirmationTest_pixel_watch.png differ diff --git a/sample/src/test/screenshots/SignedInConfirmationTest_pixel_watch_large_font.png b/sample/src/test/screenshots/SignedInConfirmationTest_pixel_watch_large_font.png new file mode 100644 index 0000000000..b586f4bfe5 Binary files /dev/null and b/sample/src/test/screenshots/SignedInConfirmationTest_pixel_watch_large_font.png differ diff --git a/sample/src/test/screenshots/SignedInConfirmationTest_small_round.png b/sample/src/test/screenshots/SignedInConfirmationTest_small_round.png new file mode 100644 index 0000000000..8521625398 Binary files /dev/null and b/sample/src/test/screenshots/SignedInConfirmationTest_small_round.png differ diff --git a/sample/src/test/screenshots/SignedInConfirmationTest_ticwatch_pro_5.png b/sample/src/test/screenshots/SignedInConfirmationTest_ticwatch_pro_5.png new file mode 100644 index 0000000000..3ecb608b94 Binary files /dev/null and b/sample/src/test/screenshots/SignedInConfirmationTest_ticwatch_pro_5.png differ