mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
Request frames again while waiting for tiles and transitions
A request-mode globe updates its tile state only on drawn frames, so tile and UI readiness that never asked for one waited until something else drew: imagery, weather and ground scenarios took several times longer. The idle checks measure through their own passive observer and are not affected.
This commit is contained in:
1 parent
555906da6b
commit
97e192ebce
2 files changed
+7
-4
No files matched your search
@@ -287,7 +287,7 @@ test('camera readiness also waits for the startup cover to stop intercepting cli
|
||||
});
|
||||
});
|
||||
|
||||
test('tile and UI polling never request globe frames', async (t) => {
|
||||
test('tile and UI polling request frames so a request-mode globe progresses', async (t) => {
|
||||
const { engine } = pageEngine(t);
|
||||
const previous = globalThis.document;
|
||||
globalThis.document = { getAnimations: () => [] };
|
||||
@@ -295,9 +295,8 @@ test('tile and UI polling never request globe frames', async (t) => {
|
||||
if (previous === undefined) delete globalThis.document;
|
||||
else globalThis.document = previous;
|
||||
});
|
||||
t.mock.method(engine.render, 'request', () => {
|
||||
assert.fail('passive readiness requested a frame');
|
||||
});
|
||||
const reasons = [];
|
||||
t.mock.method(engine.render, 'request', (reason) => reasons.push(reason));
|
||||
const page = {
|
||||
async waitForFunction(predicate) {
|
||||
assert.equal(predicate(), true);
|
||||
@@ -306,4 +305,5 @@ test('tile and UI polling never request globe frames', async (t) => {
|
||||
};
|
||||
await whenTilesLoaded(page);
|
||||
await whenUiSettled(page);
|
||||
assert.deepEqual(reasons, ['qa-tile-readiness', 'qa-ui-readiness']);
|
||||
});
|
||||
Reference in new issue
Block a user