mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
style: format state subscriptions and their adopted controls
This commit is contained in:
1 parent
45d97376d0
commit
e0652b19f2
12 files changed
+299
-88
No files matched your search
@@ -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) => {
|
||||
|
||||
Reference in new issue
Block a user