diff --git a/app/src/main/java/org/mozilla/fenix/compose/cfr/CFRPopup.kt b/app/src/main/java/org/mozilla/fenix/compose/cfr/CFRPopup.kt index 2504fdebf3b2..bfd8e495e598 100644 --- a/app/src/main/java/org/mozilla/fenix/compose/cfr/CFRPopup.kt +++ b/app/src/main/java/org/mozilla/fenix/compose/cfr/CFRPopup.kt @@ -63,7 +63,7 @@ class CFRPopup( // This is just a facade for the CFRPopupFullScreenLayout composable offering a cleaner API. @VisibleForTesting - internal var popup: WeakReference? = null + internal var popup: WeakReference? = null /** * Construct and display a styled CFR popup shown at the coordinates of [anchor]. @@ -72,7 +72,7 @@ class CFRPopup( */ fun show() { anchor.post { - CFRPopupFullScreenLayout(text, anchor, properties, onDismiss, action).apply { + CFRPopupFullscreenLayout(text, anchor, properties, onDismiss, action).apply { this.show() popup = WeakReference(this) } diff --git a/app/src/main/java/org/mozilla/fenix/compose/cfr/CFRPopupFullscreenLayout.kt b/app/src/main/java/org/mozilla/fenix/compose/cfr/CFRPopupFullscreenLayout.kt index 87e034c6787f..ee5270796958 100644 --- a/app/src/main/java/org/mozilla/fenix/compose/cfr/CFRPopupFullscreenLayout.kt +++ b/app/src/main/java/org/mozilla/fenix/compose/cfr/CFRPopupFullscreenLayout.kt @@ -70,7 +70,7 @@ private data class PopupHorizontalBounds( * @param action Optional other composable to show just below the popup text. */ @SuppressLint("ViewConstructor") // Intended to be used only in code, don't need a View constructor -internal class CFRPopupFullScreenLayout( +internal class CFRPopupFullscreenLayout( private val text: String, private val anchor: View, private val properties: CFRPopupProperties, diff --git a/app/src/test/java/org/mozilla/fenix/compose/cfr/CFRPopupFullScreenLayoutTest.kt b/app/src/test/java/org/mozilla/fenix/compose/cfr/CFRPopupFullscreenLayoutTest.kt similarity index 94% rename from app/src/test/java/org/mozilla/fenix/compose/cfr/CFRPopupFullScreenLayoutTest.kt rename to app/src/test/java/org/mozilla/fenix/compose/cfr/CFRPopupFullscreenLayoutTest.kt index 4b196c29fe03..e32bb6f7a41f 100644 --- a/app/src/test/java/org/mozilla/fenix/compose/cfr/CFRPopupFullScreenLayoutTest.kt +++ b/app/src/test/java/org/mozilla/fenix/compose/cfr/CFRPopupFullscreenLayoutTest.kt @@ -28,7 +28,7 @@ import org.junit.runner.RunWith import org.mozilla.fenix.helpers.FenixRobolectricTestRunner @RunWith(FenixRobolectricTestRunner::class) -class CFRPopupFullScreenLayoutTest { +class CFRPopupFullscreenLayoutTest { @Test fun `WHEN the popup is constructed THEN setup lifecycle owners`() { val anchor = View(testContext).apply { @@ -36,7 +36,7 @@ class CFRPopupFullScreenLayoutTest { this.setViewTreeSavedStateRegistryOwner(mockk()) } - val popupView = spyk(CFRPopupFullScreenLayout("", anchor, mockk(), mockk()) {}) + val popupView = spyk(CFRPopupFullscreenLayout("", anchor, mockk(), mockk()) {}) assertNotNull(popupView.findViewTreeLifecycleOwner()) assertEquals( @@ -59,7 +59,7 @@ class CFRPopupFullScreenLayoutTest { } val windowManager = spyk(context.getSystemService(Context.WINDOW_SERVICE) as WindowManager) every { context.getSystemService(Context.WINDOW_SERVICE) } returns windowManager - val popupView = CFRPopupFullScreenLayout("", anchor, mockk(), mockk()) {} + val popupView = CFRPopupFullscreenLayout("", anchor, mockk(), mockk()) {} popupView.show() assertNotNull(popupView.findViewTreeLifecycleOwner()) assertNotNull(popupView.findViewTreeSavedStateRegistryOwner()) @@ -77,7 +77,7 @@ class CFRPopupFullScreenLayoutTest { val anchor = View(context) val windowManager = spyk(context.getSystemService(Context.WINDOW_SERVICE)) every { context.getSystemService(Context.WINDOW_SERVICE) } returns windowManager - val popupView = CFRPopupFullScreenLayout("", anchor, mockk(), mockk()) {} + val popupView = CFRPopupFullscreenLayout("", anchor, mockk(), mockk()) {} val layoutParamsCaptor = slot() popupView.show() @@ -97,7 +97,7 @@ class CFRPopupFullScreenLayoutTest { @Test fun `WHEN creating layout params THEN get fullscreen translucent layout params`() { val anchor = View(testContext) - val popupView = CFRPopupFullScreenLayout("", anchor, mockk(), mockk()) {} + val popupView = CFRPopupFullscreenLayout("", anchor, mockk(), mockk()) {} val result = popupView.createLayoutParams()