Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when using snapshot method #8

Open
olegosipenko opened this issue Jul 9, 2023 · 0 comments
Open

Crash when using snapshot method #8

olegosipenko opened this issue Jul 9, 2023 · 0 comments

Comments

@olegosipenko
Copy link

java.lang.AssertionError: Not able to create snapshot directory: /snapshot/EmailLoginFragmentTest
at org.junit.Assert.fail(Assert.java:89)
at kotlin.test.junit.JUnitAsserter.fail(JUnitSupport.kt:56)
at kotlin.test.Asserter$DefaultImpls.assertTrue(Assertions.kt:652)
at kotlin.test.junit.JUnitAsserter.assertTrue(JUnitSupport.kt:30)
at kotlin.test.Asserter$DefaultImpls.assertTrue(Assertions.kt:662)
at kotlin.test.junit.JUnitAsserter.assertTrue(JUnitSupport.kt:30)
at kotlin.test.AssertionsKt__AssertionsKt.assertTrue(Assertions.kt:44)
at kotlin.test.AssertionsKt.assertTrue(Unknown Source:1)
at com.quickbird.snapshot.FileSnapshotting_snapshotKt.snapshot$file(FileSnapshotting+snapshot.kt:20)
at com.quickbird.snapshot.FileSnapshotting_snapshotKt.snapshot(FileSnapshotting+snapshot.kt:29)
at com.quickbird.snapshot.JUnitFileSnapshotTest.snapshot(JUnitFileSnapshottingTest.kt:18)
at com.quickbird.snapshot.JUnitFileSnapshotTest.snapshot$default(JUnitFileSnapshottingTest.kt:13)
at com.github.olegosipenko.kointestsample.EmailLoginFragmentTest$testBasicInvocation$1$3.invokeSuspend(EmailLoginFragmentTest.kt:56)
at com.github.olegosipenko.kointestsample.EmailLoginFragmentTest$testBasicInvocation$1$3.invoke(Unknown Source:8)
at com.github.olegosipenko.kointestsample.EmailLoginFragmentTest$testBasicInvocation$1$3.invoke(Unknown Source:4)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTestCoroutine$2.invokeSuspend(TestBuilders.kt:212)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTestCoroutine$2.invoke(Unknown Source:8)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTestCoroutine$2.invoke(Unknown Source:4)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:112)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTestCoroutine(TestBuilders.kt:211)
at kotlinx.coroutines.test.TestBuildersKt.runTestCoroutine(Unknown Source:1)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$1$1.invokeSuspend(TestBuilders.kt:167)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$1$1.invoke(Unknown Source:8)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt$runTest$1$1.invoke(Unknown Source:4)
at kotlinx.coroutines.test.TestBuildersJvmKt$createTestResult$1.invokeSuspend(TestBuildersJvm.kt:13)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source:1)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source:1)
at kotlinx.coroutines.test.TestBuildersJvmKt.createTestResult(TestBuildersJvm.kt:12)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest(TestBuilders.kt:166)
at kotlinx.coroutines.test.TestBuildersKt.runTest(Unknown Source:1)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest(TestBuilders.kt:154)
at kotlinx.coroutines.test.TestBuildersKt.runTest(Unknown Source:1)
at kotlinx.coroutines.test.TestBuildersKt__TestBuildersKt.runTest$default(TestBuilders.kt:147)
at kotlinx.coroutines.test.TestBuildersKt.runTest$default(Unknown Source:1)
at com.github.olegosipenko.kointestsample.EmailLoginFragmentTest$testBasicInvocation$1.invoke(EmailLoginFragmentTest.kt:54)
at com.github.olegosipenko.kointestsample.EmailLoginFragmentTest$testBasicInvocation$1.invoke(EmailLoginFragmentTest.kt:47)
at io.github.kakaocup.compose.node.core.KDSL$DefaultImpls.invoke(KDSL.kt:7)
at io.github.kakaocup.compose.node.core.BaseNode.invoke(BaseNode.kt:15)
at com.github.olegosipenko.kointestsample.EmailLoginFragmentTest.testBasicInvocation(EmailLoginFragmentTest.kt:107)

Example of the test:

 onComposeScreen<EmailLoginForm>(composeTestRule) {
     runTest {
         FileSnapshotting.composeScreenshot
             .snapshot(composeTestRule, record = true)
     }
 }

Device
Снимок экрана 2023-07-09 в 17 20 21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant