From b210b22854b511921804d4404826c55f7ad5b026 Mon Sep 17 00:00:00 2001 From: Antonis Lilis Date: Fri, 19 May 2023 12:00:18 +0300 Subject: [PATCH] Removes domain card from the menu --- .../java/org/wordpress/android/ui/mysite/MySiteViewModel.kt | 1 + .../org/wordpress/android/ui/mysite/MySiteViewModelTest.kt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteViewModel.kt b/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteViewModel.kt index 566f28751ac6..ae75df4cb435 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteViewModel.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/mysite/MySiteViewModel.kt @@ -814,6 +814,7 @@ class MySiteViewModel @Inject constructor( } add(Type.QUICK_LINK_RIBBON) add(Type.JETPACK_INSTALL_FULL_PLUGIN_CARD) + add(Type.DOMAIN_REGISTRATION_CARD) } MySiteTabType.DASHBOARD -> mutableListOf().apply { diff --git a/WordPress/src/test/java/org/wordpress/android/ui/mysite/MySiteViewModelTest.kt b/WordPress/src/test/java/org/wordpress/android/ui/mysite/MySiteViewModelTest.kt index 4f3856d57337..b5e67c910f0c 100644 --- a/WordPress/src/test/java/org/wordpress/android/ui/mysite/MySiteViewModelTest.kt +++ b/WordPress/src/test/java/org/wordpress/android/ui/mysite/MySiteViewModelTest.kt @@ -2970,13 +2970,13 @@ class MySiteViewModelTest : BaseUnitTest() { } @Test - fun `given selected site with domain credit, when site menu cards and items, then domain reg card exists`() { + fun `given selected site with domain credit, when site menu cards and items, then domain reg card does not exist`() { initSelectedSite() isDomainCreditAvailable.value = DomainCreditAvailable(true) val items = (uiModels.last().state as SiteSelected).siteMenuCardsAndItems - assertThat(items.filterIsInstance(DomainRegistrationCard::class.java)).isNotEmpty + assertThat(items.filterIsInstance(DomainRegistrationCard::class.java)).isEmpty() } @Test