style: format state subscriptions and their adopted controls

This commit is contained in:
Sameh Khamis committed 2026-09-13 05:43:05 -07:00
1 parent 45d97376d0
commit e0652b19f2
12 files changed
+299 -88

No files matched your search

+19 -9
View File
@@ -88,7 +88,9 @@ try {
const lookup = window.__godsEyeView.styleManager._locationLookup;
window.__qaSearchRequests = [];
window.__qaLocationState = [];
window.__godsEyeView.styleManager.subscribeLocationSearch((notification) => window.__qaLocationState.push(notification));
window.__godsEyeView.styleManager.subscribeLocationSearch((notification) =>
window.__qaLocationState.push(notification),
);
lookup.search = (query, options) =>
new Promise((resolve) =>
window.__qaSearchRequests.push({ query, options, resolve }),
@@ -141,14 +143,22 @@ try {
);
}),
);
check('Location subscriptions accept only the current result and retain request identities', await page.evaluate(() => {
const seen = window.__qaLocationState;
const started = seen.filter(({ change }) => change?.type === 'started');
const found = seen.filter(({ change }) => change?.type === 'found');
return seen[0].initial && started.length === 2 && found.length === 1 &&
found[0].change.requestId === started[1].change.requestId &&
found[0].state.destination.label === 'Second landmark, Test city' && Object.isFrozen(found[0].state.destination);
}));
check(
'Location subscriptions accept only the current result and retain request identities',
await page.evaluate(() => {
const seen = window.__qaLocationState;
const started = seen.filter(({ change }) => change?.type === 'started');
const found = seen.filter(({ change }) => change?.type === 'found');
return (
seen[0].initial &&
started.length === 2 &&
found.length === 1 &&
found[0].change.requestId === started[1].change.requestId &&
found[0].state.destination.label === 'Second landmark, Test city' &&
Object.isFrozen(found[0].state.destination)
);
}),
);
check(
'cancelled POI expansion stays closed after a frame',
await page.evaluate(async (id) => {