DroidKaigi / conference-app-2023

The Official Conference App for DroidKaigi 2023
Apache License 2.0
645 stars 206 forks source link

:sparkles: Apply stamps initial dialog #1090

Closed Corvus400 closed 1 year ago

Corvus400 commented 1 year ago

Issue

Overview (Required)

Movie (Optional)

Before After
---
Corvus400 commented 1 year ago

The PR conflict in #1061 could not be resolved, so it was reworked. 🙇

github-actions[bot] commented 1 year ago

Test Results

211 tests   211 :heavy_check_mark:  7m 37s :stopwatch:   11 suites      0 :zzz:   11 files        0 :x:

Results for commit 6faaa0a6.

:recycle: This comment has been updated with latest results.

takahirom commented 1 year ago

I think you can download the test report. I'm not sure why there are two root but it may be because of the dialog, right? We can select it onNodes(isRoot).onFirst or something. Could you check it out?

        composeTestRule
            .onNode(isRoot())
            .captureRoboImage()
java.lang.AssertionError: fail to captureRoboImage
Reason: Expected exactly '1' node but found '2' nodes that satisfy: (isRoot)
Nodes found:
1) Node #1 at (l=0.0, t=84.0, r=480.0, b=799.0)px
Has 1 child
2) Node #30 at (l=0.0, t=0.0, r=480.0, b=461.0)px
Has 1 child

    at androidx.compose.ui.test.SemanticsNodeInteraction.fetchOneOrDie(SemanticsNodeInteraction.kt:145)
    at androidx.compose.ui.test.SemanticsNodeInteraction.fetchSemanticsNode(SemanticsNodeInteraction.kt:79)
    at com.github.takahirom.roborazzi.RoborazziKt.captureRoboImage(Roborazzi.kt:220)
    at com.github.takahirom.roborazzi.RoborazziKt.captureRoboImage(Roborazzi.kt:210)
    at com.github.takahirom.roborazzi.RoborazziKt.captureRoboImage$default(Roborazzi.kt:205)
    at io.github.droidkaigi.confsched2023.testing.robot.AchievementsScreenRobot.checkScreenCapture(AchievementsScreenRobot.kt:56)
    at io.github.droidkaigi.confsched2023.achievements.AchievementsScreenTest$checkLaunchShot$1.invoke(AchievementsScreenTest.kt:38)
    at io.github.droidkaigi.confsched2023.achievements.AchievementsScreenTest$checkLaunchShot$1.invoke(AchievementsScreenTest.kt:36)
    at io.github.droidkaigi.confsched2023.testing.robot.AchievementsScreenRobot$invoke$1.invokeSuspend(AchievementsScreenRobot.kt:27)
    at io.github.droidkaigi.confsched2023.testing.robot.AchievementsScreenRobot$invoke$1.invoke(AchievementsScreenRobot.kt)
    at io.github.droidkaigi.confsched2023.testing.robot.AchievementsScreenRobot$invoke$1.invoke(AchievementsScreenRobot.kt)
    at io.github.droidkaigi.confsched2023.testing.coroutines.RunTestWithLoggingKt$runTestWithLogging$1$1$1.invokeSuspend(RunTestWithLogging.kt:18)
    at io.github.droidkaigi.confsched2023.testing.coroutines.RunTestWithLoggingKt$runTestWithLogging$1$1$1.invoke(RunTestWithLogging.kt)
    at io.github.droidkaigi.confsched2023.testing.coroutines.RunTestWithLoggingKt$runTestWithLogging$1$1$1.invoke(RunTestWithLogging.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
    at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
    at io.github.droidkaigi.confsched2023.testing.coroutines.RunTestWithLoggingKt$runTestWithLogging$1.invokeSuspend(RunTestWithLogging.kt:17)
    at io.github.droidkaigi.confsched2023.testing.coroutines.RunTestWithLoggingKt$runTestWithLogging$1.invoke(RunTestWithLogging.kt)
    at io.github.droidkaigi.confsched2023.testing.coroutines.RunTestWithLoggingKt$runTestWithLogging$1.invoke(RunTestWithLogging.kt)
    at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$1.invokeSuspend(TestBuilders.kt:314)
    at _COROUTINE._BOUNDARY._(CoroutineDebugging.kt:46)
    at io.github.droidkaigi.confsched2023.testing.coroutines.RunTestWithLoggingKt$runTestWithLogging$1.invokeSuspend(RunTestWithLogging.kt:17)
    at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$1.invokeSuspend(TestBuilders.kt:314)
Caused by: java.lang.AssertionError: fail to captureRoboImage
Reason: Expected exactly '1' node but found '2' nodes that satisfy: (isRoot)
Nodes found:
1) Node #1 at (l=0.0, t=84.0, r=480.0, b=799.0)px
Has 1 child
2) Node #30 at (l=0.0, t=0.0, r=480.0, b=461.0)px
github-actions[bot] commented 1 year ago
Snapshot diff report File name Image
KaigiAppTest.checkNa
vigateToAchievements
Shot_compare.png
takahirom commented 1 year ago

I've checked the diff and It seems that we don't have any image change in diff!

Corvus400 commented 1 year ago

@takahirom @momomomo111 Hmmm...in the local KaigiAppTest screenshot test, as shown in the attached video, KaigiAppTest.checkNavigateToAchievementsShot.png successfully selects the AchievementsScreen tab and a screenshot is taken. I do not know how to further address this issue on my end.🤯 Can you please help me?😭 screen_shot_test_result

takahirom commented 1 year ago

@Corvus400 I think the implementation is great! I just wanted @momomomo111 to review the specification!

takahirom commented 1 year ago

ちょっと誤解ありそうなので日本語で書きます🙇 diff無いというのはいい意味です!スクショテストについての問題は今は解決されてると思います!

momomomo111 commented 1 year ago

@Corvus400 @takahirom Thanks! I think there's no problem with the specifications. I believe it's a cool implementation!

takahirom commented 1 year ago

Unfortunately, there is a PR that will cause conflict. It is a core implementation for the achievements and it is larger than this pr. Maybe we are going to merge the pr first. 🙇 https://github.com/DroidKaigi/conference-app-2023/pull/1043

naveenhonnachar commented 5 months ago

I think you can download the test report. I'm not sure why there are two root but it may be because of the dialog, right? We can select it onNodes(isRoot).onFirst or something. Could you check it out?

        composeTestRule
            .onNode(isRoot())
            .captureRoboImage()
java.lang.AssertionError: fail to captureRoboImage
Reason: Expected exactly '1' node but found '2' nodes that satisfy: (isRoot)
Nodes found:
1) Node #1 at (l=0.0, t=84.0, r=480.0, b=799.0)px
Has 1 child
2) Node #30 at (l=0.0, t=0.0, r=480.0, b=461.0)px
Has 1 child

  at androidx.compose.ui.test.SemanticsNodeInteraction.fetchOneOrDie(SemanticsNodeInteraction.kt:145)
  at androidx.compose.ui.test.SemanticsNodeInteraction.fetchSemanticsNode(SemanticsNodeInteraction.kt:79)
  at com.github.takahirom.roborazzi.RoborazziKt.captureRoboImage(Roborazzi.kt:220)
  at com.github.takahirom.roborazzi.RoborazziKt.captureRoboImage(Roborazzi.kt:210)
  at com.github.takahirom.roborazzi.RoborazziKt.captureRoboImage$default(Roborazzi.kt:205)
  at io.github.droidkaigi.confsched2023.testing.robot.AchievementsScreenRobot.checkScreenCapture(AchievementsScreenRobot.kt:56)
  at io.github.droidkaigi.confsched2023.achievements.AchievementsScreenTest$checkLaunchShot$1.invoke(AchievementsScreenTest.kt:38)
  at io.github.droidkaigi.confsched2023.achievements.AchievementsScreenTest$checkLaunchShot$1.invoke(AchievementsScreenTest.kt:36)
  at io.github.droidkaigi.confsched2023.testing.robot.AchievementsScreenRobot$invoke$1.invokeSuspend(AchievementsScreenRobot.kt:27)
  at io.github.droidkaigi.confsched2023.testing.robot.AchievementsScreenRobot$invoke$1.invoke(AchievementsScreenRobot.kt)
  at io.github.droidkaigi.confsched2023.testing.robot.AchievementsScreenRobot$invoke$1.invoke(AchievementsScreenRobot.kt)
  at io.github.droidkaigi.confsched2023.testing.coroutines.RunTestWithLoggingKt$runTestWithLogging$1$1$1.invokeSuspend(RunTestWithLogging.kt:18)
  at io.github.droidkaigi.confsched2023.testing.coroutines.RunTestWithLoggingKt$runTestWithLogging$1$1$1.invoke(RunTestWithLogging.kt)
  at io.github.droidkaigi.confsched2023.testing.coroutines.RunTestWithLoggingKt$runTestWithLogging$1$1$1.invoke(RunTestWithLogging.kt)
  at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
  at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
  at io.github.droidkaigi.confsched2023.testing.coroutines.RunTestWithLoggingKt$runTestWithLogging$1.invokeSuspend(RunTestWithLogging.kt:17)
  at io.github.droidkaigi.confsched2023.testing.coroutines.RunTestWithLoggingKt$runTestWithLogging$1.invoke(RunTestWithLogging.kt)
  at io.github.droidkaigi.confsched2023.testing.coroutines.RunTestWithLoggingKt$runTestWithLogging$1.invoke(RunTestWithLogging.kt)
  at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$1.invokeSuspend(TestBuilders.kt:314)
  at _COROUTINE._BOUNDARY._(CoroutineDebugging.kt:46)
  at io.github.droidkaigi.confsched2023.testing.coroutines.RunTestWithLoggingKt$runTestWithLogging$1.invokeSuspend(RunTestWithLogging.kt:17)
  at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$2$1$1.invokeSuspend(TestBuilders.kt:314)
Caused by: java.lang.AssertionError: fail to captureRoboImage
Reason: Expected exactly '1' node but found '2' nodes that satisfy: (isRoot)
Nodes found:
1) Node #1 at (l=0.0, t=84.0, r=480.0, b=799.0)px
Has 1 child
2) Node #30 at (l=0.0, t=0.0, r=480.0, b=461.0)px

Hello,

I am also having same problem. did you find any solution for this ?