Skip to content

Commit

Permalink
Fix globe icon
Browse files Browse the repository at this point in the history
  • Loading branch information
CrisBarreiro committed Feb 3, 2025
1 parent 40269e8 commit 364cfab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ class OmnibarLayoutViewModel @Inject constructor(

_viewState.update {
it.copy(
viewMode = viewMode,
leadingIconState = leadingIcon,
scrollingEnabled = scrollingEnabled,
showVoiceSearch = shouldShowVoiceSearch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ class OmnibarLayoutViewModelTest {
val viewState = awaitItem()
assertTrue(viewState.leadingIconState == LeadingIconState.GLOBE)
assertTrue(viewState.scrollingEnabled)
assertTrue(viewState.viewMode is ViewMode.Error)
}
}

Expand All @@ -298,6 +299,7 @@ class OmnibarLayoutViewModelTest {
val viewState = awaitItem()
assertTrue(viewState.leadingIconState == LeadingIconState.GLOBE)
assertTrue(viewState.scrollingEnabled)
assertTrue(viewState.viewMode is ViewMode.SSLWarning)
}
}

Expand All @@ -309,6 +311,7 @@ class OmnibarLayoutViewModelTest {
val viewState = awaitItem()
assertTrue(viewState.leadingIconState == LeadingIconState.GLOBE)
assertTrue(viewState.scrollingEnabled)
assertTrue(viewState.viewMode is ViewMode.MaliciousSiteWarning)
}
}

Expand All @@ -320,6 +323,7 @@ class OmnibarLayoutViewModelTest {
val viewState = awaitItem()
assertTrue(viewState.leadingIconState == LeadingIconState.SEARCH)
assertFalse(viewState.scrollingEnabled)
assertTrue(viewState.viewMode is ViewMode.NewTab)
}
}

Expand All @@ -331,6 +335,7 @@ class OmnibarLayoutViewModelTest {
val viewState = awaitItem()
assertTrue(viewState.leadingIconState == LeadingIconState.SEARCH)
assertTrue(viewState.scrollingEnabled)
assertTrue(viewState.viewMode is ViewMode.Browser)
}
}

Expand All @@ -342,6 +347,7 @@ class OmnibarLayoutViewModelTest {
testee.viewState.test {
val viewState = expectMostRecentItem()
assertTrue(viewState.leadingIconState == LeadingIconState.SEARCH)
assertTrue(viewState.viewMode is ViewMode.Error)
}
}

Expand All @@ -353,6 +359,7 @@ class OmnibarLayoutViewModelTest {
testee.viewState.test {
val viewState = expectMostRecentItem()
assertTrue(viewState.leadingIconState == LeadingIconState.SEARCH)
assertTrue(viewState.viewMode is ViewMode.SSLWarning)
}
}

Expand All @@ -364,6 +371,7 @@ class OmnibarLayoutViewModelTest {
testee.viewState.test {
val viewState = expectMostRecentItem()
assertTrue(viewState.leadingIconState == LeadingIconState.SEARCH)
assertTrue(viewState.viewMode is ViewMode.MaliciousSiteWarning)
}
}

Expand All @@ -375,6 +383,7 @@ class OmnibarLayoutViewModelTest {
testee.viewState.test {
val viewState = expectMostRecentItem()
assertTrue(viewState.leadingIconState == LeadingIconState.SEARCH)
assertTrue(viewState.viewMode is ViewMode.NewTab)
}
}

Expand All @@ -386,6 +395,7 @@ class OmnibarLayoutViewModelTest {
testee.viewState.test {
val viewState = awaitItem()
assertTrue(viewState.leadingIconState == LeadingIconState.SEARCH)
assertTrue(viewState.viewMode is ViewMode.Browser)
}
}

Expand Down

0 comments on commit 364cfab

Please sign in to comment.