Search the widget picker by widget name or the app it comes from
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KNP1cMweg13VdKrtriNJ5C
This commit is contained in:
6 files changed
+97
-18
No files matched your search
@@ -34,6 +34,15 @@ const BASE = process.env.BASE || "http://localhost:8000";
|
||||
await longpress(".clock");
|
||||
await p.click(".sheet-item >> text=Add widget");
|
||||
await p.waitForSelector(".widget-list li");
|
||||
// search the picker by widget name and by the app it comes from
|
||||
const widgetNames = () => p.$$eval(".widget-list .widget-name", (ns) => ns.map((n) => n.firstChild.textContent));
|
||||
await p.fill(".widget-search", "cal"); await settle();
|
||||
assert.deepEqual(await widgetNames(), ["Calendar"]);
|
||||
await p.fill(".widget-search", "goo"); await settle();
|
||||
assert.deepEqual(await widgetNames(), ["Weather"]);
|
||||
await p.fill(".widget-search", "zzz"); await settle();
|
||||
assert.equal(await p.textContent(".sheet .empty"), "No widgets match.");
|
||||
await p.fill(".widget-search", ""); await settle();
|
||||
await p.click(".widget-list li:first-child"); await settle();
|
||||
assert.equal(await p.getAttribute(".widget-slot", "data-wid"), "100");
|
||||
assert.equal(await p.textContent(".widget-label"), "Clock");
|
||||
|
||||
Reference in new issue
Block a user