[fenix] For https://github.com/mozilla-mobile/fenix/issues/22078 Selecting search group in Jump back in switches active tab
parent
008e453d6a
commit
b1cb88fff7
@ -0,0 +1,23 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.tabstray
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
class TabsTrayStoreReducerTest {
|
||||
@Test
|
||||
fun `GIVEN focusGroupTabId WHEN ConsumeFocusGroupTabIdAction THEN focusGroupTabId must be consumed`() {
|
||||
val initialState = TabsTrayState(focusGroupTabId = "id")
|
||||
val expectedState = initialState.copy(focusGroupTabId = null)
|
||||
|
||||
val resultState = TabsTrayReducer.reduce(
|
||||
initialState,
|
||||
TabsTrayAction.ConsumeFocusGroupTabIdAction
|
||||
)
|
||||
|
||||
assertEquals(expectedState, resultState)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue