fix(app): classify existing web profiles for layout transition (#38117)
Co-authored-by: Brendan Allan <14191578+Brendonovich@users.noreply.github.com>
This commit is contained in:
parent
ce7f54d5e7
commit
57ddfeb756
2 changed files with 25 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { describe, expect, test } from "bun:test"
|
||||
import {
|
||||
hasExistingWebState,
|
||||
isAppUpgrade,
|
||||
layoutTransitionState,
|
||||
maximumSunsetTimeout,
|
||||
|
|
@ -23,6 +24,12 @@ describe("layout transition", () => {
|
|||
expect(layoutTransitionState(true, true, false, false)).toEqual({ available: true, notice: false })
|
||||
})
|
||||
|
||||
test("classifies web profiles from existing settings or a recorded version", () => {
|
||||
expect(hasExistingWebState("{}", undefined)).toBe(true)
|
||||
expect(hasExistingWebState(null, "1.17.19")).toBe(true)
|
||||
expect(hasExistingWebState(null, undefined)).toBe(false)
|
||||
})
|
||||
|
||||
test("preserves explicit and default layout preferences", () => {
|
||||
expect(resolveNewLayoutDesigns(false, false, true)).toBe(false)
|
||||
expect(resolveNewLayoutDesigns(false, undefined, false)).toBe(false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue