Merge branch 'german/refactor-navara-photoreal-release' into german/navara-refactor

This commit is contained in:
German Khokhlov committed 2026-11-10 22:15:50 +04:00
commit 1d10ba242d
9 files changed
+440 -6

No files matched your search

+36
View File
@@ -375,6 +375,20 @@ const mutants = [
);
},
],
[
'released photoreal tiles still answer surface queries',
'surface.sampleHeightDetailed: leaving photoreal',
(e) => {
replace(e.maps, 'setPhotorealTiles', (set) => async (source) => {
await set(source);
if (source === null)
e.fake.script('sampleHeightDetailed', () => ({
height: 50,
source: 'tiles',
}));
});
},
],
];
for (const [name, killedBy, mutate] of mutants) {
@@ -400,6 +414,28 @@ for (const [name, killedBy, mutate] of mutants) {
});
}
test('released tile surface check runs without a tileset fixture', async () => {
const engine = createFakeEngine();
try {
const check = createContractSuite(engine, {
...fakeContractOptions(engine),
fixtures: null,
mapSources: null,
}).find(({ name }) =>
name.startsWith('surface.sampleHeightDetailed: leaving photoreal'),
);
assert.ok(check);
await check.run();
engine.fake.script('sampleHeightDetailed', () => ({
height: 50,
source: 'tiles',
}));
await assert.rejects(check.run(), /released photoreal tiles/);
} finally {
engine.destroy();
}
});
test('tiles-only ground pixels on terrain are detected without a tileset fixture or a picking defect', async () => {
for (const drawsOnTerrain of [false, true]) {
const engine = createFakeEngine();