From 8f2864c870161fd7bdee9d7407d06b5f97f74f7e Mon Sep 17 00:00:00 2001 From: Andras Sarro Date: Thu, 30 Jan 2025 17:18:36 +0100 Subject: [PATCH] fix(iam-dialog-test): add missing changes from the removal of kotest runner annotation SDK-186 Co-authored-by: davidSchuppa <32750715+davidSchuppa@users.noreply.github.com> Co-authored-by: LasOri <24588073+LasOri@users.noreply.github.com> Co-authored-by: megamegax Co-authored-by: matusekma <36794575+matusekma@users.noreply.github.com> --- .../mobileengage/iam/dialog/IamDialogTest.kt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/mobile-engage/src/androidTest/java/com/emarsys/mobileengage/iam/dialog/IamDialogTest.kt b/mobile-engage/src/androidTest/java/com/emarsys/mobileengage/iam/dialog/IamDialogTest.kt index 5240d1df..33bd581a 100644 --- a/mobile-engage/src/androidTest/java/com/emarsys/mobileengage/iam/dialog/IamDialogTest.kt +++ b/mobile-engage/src/androidTest/java/com/emarsys/mobileengage/iam/dialog/IamDialogTest.kt @@ -29,19 +29,18 @@ import com.emarsys.mobileengage.iam.webview.IamWebViewFactory import com.emarsys.mobileengage.iam.webview.MessageLoadedListener import com.emarsys.testUtil.ExtensionTestUtils.runOnMain import com.emarsys.testUtil.InstrumentationRegistry.Companion.getTargetContext -import com.emarsys.testUtil.KotestRunnerAndroid import com.emarsys.testUtil.ReflectionTestUtils -import io.kotest.core.spec.style.AnnotationSpec import io.kotest.matchers.shouldBe import io.kotest.matchers.shouldNotBe import io.mockk.every import io.mockk.mockk import io.mockk.verify -import org.junit.runner.RunWith +import org.junit.After +import org.junit.Before +import org.junit.Test import java.util.concurrent.CountDownLatch -@RunWith(KotestRunnerAndroid::class) -class IamDialogTest: AnnotationSpec() { +class IamDialogTest { private companion object { const val CAMPAIGN_ID = "id_value" private const val SID = "testSid" @@ -64,7 +63,7 @@ class IamDialogTest: AnnotationSpec() { private var scenario: ActivityScenario? = null private lateinit var iamWebView: IamWebView - @BeforeEach + @Before fun setUp() { mockTimestampProvider = mockk(relaxed = true) val mockUuidProvider: UUIDProvider = mockk(relaxed = true) @@ -101,7 +100,7 @@ class IamDialogTest: AnnotationSpec() { iamDialog = IamDialog(mockTimestampProvider, mockWebViewFactory) } - @AfterEach + @After fun tearDown() { tearDownMobileEngageComponent() scenario?.close() @@ -261,7 +260,6 @@ class IamDialogTest: AnnotationSpec() { } } - @Test fun testInitialization_setsDialogToFullscreen() { val bundle = Bundle()