mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 09:12:18 +00:00
conformance: draw.shapes.lit shows the globe again however it ends
This commit is contained in:
1 parent
d440f5bfaf
commit
90695db611
2 files changed
+28
No files matched your search
@@ -2360,6 +2360,8 @@ export function portChecks() {
|
|||||||
async (h, r) => {
|
async (h, r) => {
|
||||||
if (h.pixels === false) return { skip: 'reads pixels' };
|
if (h.pixels === false) return { skip: 'reads pixels' };
|
||||||
r.globe.setGlobeVisible(false);
|
r.globe.setGlobeVisible(false);
|
||||||
|
// Shown again however the check ends.
|
||||||
|
try {
|
||||||
const dLat = 150 / 111320;
|
const dLat = 150 / 111320;
|
||||||
const dLon = dLat / Math.cos((AUSTIN.lat * Math.PI) / 180);
|
const dLon = dLat / Math.cos((AUSTIN.lat * Math.PI) / 180);
|
||||||
const shapes = r.draw.shapes({ id: 'conf:lit' });
|
const shapes = r.draw.shapes({ id: 'conf:lit' });
|
||||||
@@ -2422,7 +2424,9 @@ export function portChecks() {
|
|||||||
`its top and its wall shade differently (${Math.round(top)}, ${Math.round(wall)})`,
|
`its top and its wall shade differently (${Math.round(top)}, ${Math.round(wall)})`,
|
||||||
);
|
);
|
||||||
shapes.dispose();
|
shapes.dispose();
|
||||||
|
} finally {
|
||||||
r.globe.setGlobeVisible(true);
|
r.globe.setGlobeVisible(true);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ capability: 'globeVisibility' },
|
{ capability: 'globeVisibility' },
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -310,3 +310,27 @@ test('a setBase that ends while a later one’s style still loads is settled; th
|
|||||||
globalThis.fetch = original;
|
globalThis.fetch = original;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('a lit-shape check that fails still shows the globe again', async () => {
|
||||||
|
const shown = [];
|
||||||
|
const harness = {
|
||||||
|
...createStubHarness(),
|
||||||
|
// As a renderer reading pixels would; the stub draws no shapes, so the
|
||||||
|
// check fails its reads.
|
||||||
|
pixels: true,
|
||||||
|
create: async (options) => {
|
||||||
|
const r = await createStubHarness().create(options);
|
||||||
|
const destroy = r.destroy.bind(r);
|
||||||
|
r.destroy = () => {
|
||||||
|
shown.push(r.globe.isGlobeVisible());
|
||||||
|
destroy();
|
||||||
|
};
|
||||||
|
return r;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const report = await runConformance(harness, {
|
||||||
|
only: (id) => id === 'draw.shapes.lit',
|
||||||
|
});
|
||||||
|
assert.equal(report.results[0].status, 'fail');
|
||||||
|
assert.deepEqual(shown, [true]);
|
||||||
|
});
|
||||||
Reference in new issue
Block a user