Commit 1cec449a authored by Christian Sadilek's avatar Christian Sadilek
Browse files

Issue #4810: Add tests

parent d6ea4775
......@@ -48,6 +48,34 @@ class SessionManagerMigrationTest {
fun `Add session with parent`() {
val store = BrowserStore()
val sessionManager = SessionManager(engine = mock(), store = store)
val parent = Session("")
assertEquals(1, sessionManager.sessions.size)
assertEquals(1, store.state.tabs.size)
// Make sure child tab was added next to parent
val child = Session("")
sessionManager.add(child, parent = parent)
assertEquals(3, sessionManager.sessions.size)
assertEquals(parent, sessionManager.all.toTypedArray()[0])
assertEquals(child, sessionManager.all.toTypedArray()[1])
assertEquals(3, store.state.tabs.size)
assertEquals("", store.state.tabs[0].content.url)
assertEquals("", store.state.tabs[1].content.url)
fun `Add custom tab session`() {
val store = BrowserStore()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment