Fix wallpaper transparency, Recents setup guide, and drawer animation
This commit is contained in:
1 parent
2fa7bd745b
commit
216c80252d
14 files changed
+474
-86
No files matched your search
@@ -38,6 +38,14 @@ const serve = () => new Promise((resolve) => {
|
||||
await p.waitForSelector(".hint");
|
||||
await shot(p, "00-blank-home");
|
||||
assert.ok(!(await p.$(".clock")), "home has no built-in clock");
|
||||
const demoBg = await p.evaluate(() => ({
|
||||
hasDemo: document.documentElement.classList.contains("demo"),
|
||||
htmlBgImage: getComputedStyle(document.documentElement).backgroundImage,
|
||||
bodyBgColor: getComputedStyle(document.body).backgroundColor,
|
||||
}));
|
||||
assert.ok(demoBg.hasDemo, "desktop mode adds .demo class");
|
||||
assert.ok(demoBg.htmlBgImage.includes("linear-gradient"), "desktop mode keeps gradient backdrop");
|
||||
assert.equal(demoBg.bodyBgColor, "rgba(0, 0, 0, 0)", "body itself stays transparent");
|
||||
const longpress = async (sel, fy = 0.5) => {
|
||||
const r = await p.locator(sel).first().boundingBox();
|
||||
await p.mouse.move(r.x + r.width / 2, r.y + r.height * fy);
|
||||
@@ -51,7 +59,9 @@ const serve = () => new Promise((resolve) => {
|
||||
const homeApps = () => p.$$eval(".slots .name", (ns) => ns.map((n) => n.textContent));
|
||||
// long press on the blank home: add apps through the drawer's pick mode
|
||||
await longpress(".hint");
|
||||
await p.evaluate(() => { document.querySelector(".sheet-overlay").__tag = "overlay"; });
|
||||
await p.click(".sheet-item >> text=Add apps"); await settle();
|
||||
assert.equal(await p.$eval(".drawer", (d) => d.__tag), undefined, "drawer does not recycle sheet-overlay");
|
||||
for (const i of [4, 8, 12]) await p.click(`.apps .tile:nth-child(${i})`);
|
||||
await settle();
|
||||
assert.equal(await p.$$eval(".apps .tile.on", (ts) => ts.length), 3);
|
||||
|
||||
Reference in new issue
Block a user