Show the view control with icons only
- Write, Source, Read, and Split show icons only, at every width. - Each control keeps its accessible name and a tooltip with its shortcut. - UI-056 records the rule. It replaces the names of UI-049.
This commit is contained in:
@@ -128,11 +128,11 @@ await runSmoke("layout/viewModes", async ({ browser }) => {
|
||||
await chooseView(page, "Split");
|
||||
}
|
||||
|
||||
// Narrow panes show only the icons. The names stay for assistive technology and tooltips.
|
||||
// The side panes give way first. A 520-pixel window then leaves the pane less than 560 pixels.
|
||||
// The controls show icons only, at every width (UI-056). The names stay for assistive technology and tooltips.
|
||||
assert.equal(await page.locator(".chrome-bar").evaluate(bar => [...bar.querySelectorAll(".view-modes button, button.split")].map(button => button.textContent.trim()).join("")), "");
|
||||
// The side panes give way first in a narrow window.
|
||||
await page.setViewportSize({ width: 520, height: 600 });
|
||||
await page.locator("aside.left").waitFor({ state: "detached" });
|
||||
await page.waitForFunction(() => getComputedStyle(document.querySelector(".view-modes .label")).display === "none");
|
||||
assert.equal(await radio("Read").getAttribute("aria-label"), "Read");
|
||||
assert.ok(await page.locator(".chrome-bar").evaluate(node => node.scrollWidth <= node.clientWidth + 1));
|
||||
await page.locator(".chrome-bar").screenshot({ path: `${output}/bar-narrow.png` });
|
||||
|
||||
Reference in New Issue
Block a user