mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
feat(globe): engine-agnostic maps checks and maps.current
The contract suite gains maps checks (opt-in with mapSources: two imagery sources and a photoreal one the engine can show): setPhotorealTiles(null) brings back the last base imagery, the last imagery or photoreal call decides what shows, and a released photoreal source no longer shows or counts. They observe the new maps.current(), the source objects on screen as passed. The fake engine follows the same semantics; qa-globe-contract runs the checks on the app engine with the startup tileset and reapplies the app's map stack afterwards. The contract documents map sources as engine-neutral descriptions whose prebuilt members only the engine kind that built them uses.
This commit is contained in:
1 parent
12c9651a67
commit
ab0acb0e09
6 files changed
+160
-14
No files matched your search
@@ -191,6 +191,7 @@ test('the contract carries what the shell infrastructure needs', () => {
|
||||
'camera.livePosition',
|
||||
'camera.height',
|
||||
'maps.releasePhotorealTiles',
|
||||
'maps.current',
|
||||
])
|
||||
assert.ok(GLOBE_ENGINE_MEMBERS.includes(member), member);
|
||||
const engine = createFakeEngine();
|
||||
@@ -209,8 +210,13 @@ test('the fake engine passes the engine contract suite', async (t) => {
|
||||
const engine = createFakeEngine();
|
||||
const checks = createContractSuite(engine, {
|
||||
waitFrames: async (count) => engine.fake.frames(count),
|
||||
mapSources: {
|
||||
imagery: [{ kind: 'osm' }, { kind: 'esri-imagery' }],
|
||||
photoreal: { kind: 'photoreal' },
|
||||
},
|
||||
});
|
||||
assert.ok(checks.length >= 15);
|
||||
assert.ok(checks.some(({ name }) => name.startsWith('maps:')));
|
||||
assert.equal(new Set(checks.map((check) => check.name)).size, checks.length);
|
||||
for (const check of checks) await t.test(check.name, () => check.run());
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user