This commit is contained in:
@@ -240,6 +240,37 @@ describe('GuideFloorBasemap projection', () => {
|
||||
expect(await loadGuideFloorBasemapManifest()).toBeNull()
|
||||
})
|
||||
|
||||
it('uses the sole valid floor basemap when the published GLB version is newer', () => {
|
||||
const basemap = createBasemap()
|
||||
const manifest = {
|
||||
schemaVersion: GUIDE_FLOOR_BASEMAP_SCHEMA_VERSION,
|
||||
render: {
|
||||
projection: GUIDE_FLOOR_BASEMAP_PROJECTION,
|
||||
projectionVersion: GUIDE_FLOOR_BASEMAP_PROJECTION_VERSION
|
||||
},
|
||||
floors: [basemap],
|
||||
routeAssets: []
|
||||
}
|
||||
|
||||
expect(findGuideFloorBasemap(manifest, 'L1', 'v2')).toEqual(basemap)
|
||||
})
|
||||
|
||||
it('does not guess a basemap when a floor has multiple nonmatching versions', () => {
|
||||
const older = createBasemap()
|
||||
const newer = { ...createBasemap(), modelVersion: 'v2' }
|
||||
const manifest = {
|
||||
schemaVersion: GUIDE_FLOOR_BASEMAP_SCHEMA_VERSION,
|
||||
render: {
|
||||
projection: GUIDE_FLOOR_BASEMAP_PROJECTION,
|
||||
projectionVersion: GUIDE_FLOOR_BASEMAP_PROJECTION_VERSION
|
||||
},
|
||||
floors: [older, newer],
|
||||
routeAssets: []
|
||||
}
|
||||
|
||||
expect(findGuideFloorBasemap(manifest, 'L1', 'v3')).toBeNull()
|
||||
})
|
||||
|
||||
it('requires an orthographic floor entry under the schema 4 render identity', () => {
|
||||
const basemap = createBasemap()
|
||||
const manifest = {
|
||||
|
||||
Reference in New Issue
Block a user