feat(n7web): add pet NFC workflow and glass UI
This commit is contained in:
@@ -54,15 +54,17 @@ class FrontendVehicleStateSyncContractTests(unittest.TestCase):
|
||||
'canvas.dataset.themeAccent = `#${palette.accent.toString(16).padStart(6, "0")}`',
|
||||
self.app_source,
|
||||
)
|
||||
for blue_theme_token in (
|
||||
"accent: 0x2f80ed",
|
||||
"vehicleBody: 0x91c6f5",
|
||||
"vehicleOutline: 0x2879d8",
|
||||
"seatShell: 0x2b76c9",
|
||||
"glass: 0x4b9bea",
|
||||
"lamp: 0x2e7fd4",
|
||||
for glass_theme_token in (
|
||||
"accent: 0x7b70f5",
|
||||
"sceneBackground: 0x111426",
|
||||
"floor: 0x1a2038",
|
||||
"vehicleBody: 0x729bc9",
|
||||
"vehicleOutline: 0x73b8ff",
|
||||
"seatShell: 0x426fbd",
|
||||
"glass: 0x4d8ed2",
|
||||
"lamp: 0x4385cf",
|
||||
):
|
||||
self.assertIn(blue_theme_token, self.app_source)
|
||||
self.assertIn(glass_theme_token, self.app_source)
|
||||
self.assertNotIn("accent: 0x0e7773", self.app_source)
|
||||
self.assertNotIn("cognitive-agent:demo-role-change", self.app_source)
|
||||
|
||||
@@ -70,16 +72,21 @@ class FrontendVehicleStateSyncContractTests(unittest.TestCase):
|
||||
self.assertIn("function createTwinGroundTexture(", self.app_source)
|
||||
self.assertIn("new THREE.PlaneGeometry(30, 30)", self.app_source)
|
||||
self.assertIn(
|
||||
'surfaceGradient.addColorStop(0, "rgba(255, 255, 255, 1)")',
|
||||
"surfaceGradient.addColorStop(0, rgba(floorColor, 0.96))",
|
||||
self.app_source,
|
||||
)
|
||||
self.assertIn(
|
||||
'surfaceGradient.addColorStop(1, "rgba(255, 255, 255, 0)")',
|
||||
"surfaceGradient.addColorStop(1, rgba(floorColor, 0))",
|
||||
self.app_source,
|
||||
)
|
||||
self.assertIn("const outerRadius = size * 0.48", self.app_source)
|
||||
self.assertIn(
|
||||
"const gridColor = accent.clone().lerp(new THREE.Color(0xffffff), 0.52)",
|
||||
"const gridStrong = new THREE.Color(palette.gridStrong)",
|
||||
self.app_source,
|
||||
)
|
||||
self.assertIn("const gridSoft = new THREE.Color(palette.gridSoft)", self.app_source)
|
||||
self.assertIn(
|
||||
"gridContext.strokeStyle = rgba(major ? gridStrong : gridSoft, major ? 0.38 : 0.24)",
|
||||
self.app_source,
|
||||
)
|
||||
self.assertIn("gridContext.lineWidth = major ? 0.9 : 0.45", self.app_source)
|
||||
|
||||
Reference in New Issue
Block a user