Remove alternate hosts from tooling probes
Keep the probe suite on the Material composition so browser fixtures and capture drivers no longer render or select Cupertino hosts. Record the final residual legacy arguments and implementation checks for the delivery gate.
This commit is contained in:
@@ -115,10 +115,10 @@ try {
|
||||
await send('Input.dispatchKeyEvent', { type: 'keyUp', ...key }, session);
|
||||
};
|
||||
let viewport = { width: 320, height: 640 };
|
||||
const navigate = async (host, { mode = '', theme = 'dark', scale = 2, width = 320, height = 640 } = {}) => {
|
||||
const navigate = async ({ mode = '', theme = 'dark', scale = 2, width = 320, height = 640 } = {}) => {
|
||||
viewport = { width, height };
|
||||
await send('Emulation.setEmulatedMedia', { features: [{ name: 'prefers-color-scheme', value: theme }] }, session);
|
||||
const query = new URLSearchParams({ host, theme, scale: String(scale) });
|
||||
const query = new URLSearchParams({ theme, scale: String(scale) });
|
||||
if (mode) query.set('mode', mode);
|
||||
await send('Page.navigate', { url: `http://127.0.0.1:${port}/?${query}` }, session);
|
||||
await delay(3000);
|
||||
@@ -138,9 +138,10 @@ try {
|
||||
captures.push(name);
|
||||
};
|
||||
|
||||
for (const host of ['material', 'cupertino']) {
|
||||
{
|
||||
const host = 'material';
|
||||
// The hardest case: narrow, scaled text in dark.
|
||||
await navigate(host);
|
||||
await navigate();
|
||||
requireLabels(await labels(), ['Notifications, 2 needing attention'], `${host} bell`);
|
||||
await record(`attention-${host}-dark-320-2x-bell.png`);
|
||||
|
||||
@@ -191,7 +192,7 @@ try {
|
||||
], `${host} closed sheet`);
|
||||
|
||||
// Light and the default text scale on a normal phone width.
|
||||
await navigate(host, { theme: 'light', scale: 1, width: 390, height: 844 });
|
||||
await navigate({ theme: 'light', scale: 1, width: 390, height: 844 });
|
||||
requireLabels(await labels(), ['Notifications, 2 needing attention'], `${host} light bell`);
|
||||
await record(`attention-${host}-light-390-1x-bell.png`);
|
||||
if (!(await clickLabel('Notifications, 2 needing attention', true))) throw new Error(`${host}: light bell not clickable`);
|
||||
@@ -202,7 +203,7 @@ try {
|
||||
], `${host} light sheet`);
|
||||
await record(`attention-${host}-light-390-1x-sheet.png`);
|
||||
|
||||
await navigate(host, { mode: 'empty' });
|
||||
await navigate({ mode: 'empty' });
|
||||
const emptyBell = await labels();
|
||||
requireLabels(emptyBell, ['Notifications'], `${host} empty bell`);
|
||||
if (emptyBell.some((label) => label.startsWith('Notifications,'))) throw new Error(`${host}: empty bell announced a count`);
|
||||
@@ -217,7 +218,7 @@ try {
|
||||
|
||||
// Clear all leaves the sheet open and honest: the empty copy, no Clear all
|
||||
// and no row dismiss. Closing then shows a plain bell and no remaining work.
|
||||
await navigate(host);
|
||||
await navigate();
|
||||
if (!(await clickLabel('Notifications, 2 needing attention', true))) throw new Error(`${host}: bell not clickable for Clear all`);
|
||||
await delay(1000);
|
||||
if (!(await clickScrolled('Clear all', { exact: true }))) throw new Error(`${host}: Clear all not clickable`);
|
||||
@@ -236,7 +237,7 @@ try {
|
||||
|
||||
// Opening a Decision row closes the sheet and leaves the identity in place:
|
||||
// only answering the decision clears it.
|
||||
await navigate(host);
|
||||
await navigate();
|
||||
if (!(await clickLabel('Notifications, 2 needing attention', true))) throw new Error(`${host}: bell not clickable for Decision row`);
|
||||
await delay(1000);
|
||||
if (!(await clickScrolled('Approve the release candidate'))) throw new Error(`${host}: Decision row not clickable`);
|
||||
@@ -251,7 +252,7 @@ try {
|
||||
|
||||
// Opening a Failed row dismisses its identity before opening it, so the
|
||||
// bell no longer asks for a run the operator has already looked at.
|
||||
await navigate(host);
|
||||
await navigate();
|
||||
if (!(await clickLabel('Notifications, 2 needing attention', true))) throw new Error(`${host}: bell not clickable for Failed row`);
|
||||
await delay(1000);
|
||||
if (!(await clickScrolled('Nightly audit with a label long enough'))) throw new Error(`${host}: Failed row not clickable`);
|
||||
|
||||
Reference in New Issue
Block a user