gui: Hermes's other profiles are picked on the one Hermes row again (Norethcy on X)
Norethcy on X, v0.1.4022: "Hermes 其他 profile 的配置消失了,只有默认的 Hermes Agent".1d60b165c(v0.1.3743) took the connected row's Other profiles lines out because each profile had a row of its own (hermes#<name>, from7050da0a4, Norethcy).c96f33d65(v0.1.3912, geekbb on X) then took those rows out of the Agents list (Agent.Nested) to keep Hermes one entry, but left the section out, so from v0.1.3912 a profile's model could be picked nowhere and the profiles looked gone. The profile:<name> fields were in /api/state all along (hermesProfileFields, TestHermesProfileModels), the Library still gives each profile its skills and MCP servers (hermes#<name> through agent.All), and nothing in any profile's config.yaml was touched. The opened Hermes row has its Other profiles section again: one line per profile, its name (a Chinese one as its name), its model picker (the app's model picker, Default noted as putting back what it had before magpie) and `hermes -p <id>`. Hermes stays one row, as geekbb asked. The picker note's hermes# branch is gone: no hermes# row is drawn sincec96f33d65. The "Other profiles" key is back in zh, zh-TW, ja and de. docs/subsystems/agent-wiring.md says so. Core script budget +225 (TestCoreScriptBudget): the section was in the core before1d60b165ctook it out; the Agents rows draw it, so there is no lazy page to move it to, and it is packed to the shortest form. Run on mote (the GUI files at the tree before the rebase onto origin/main 51b98b1a8; at the pushed head again where named): - hermes-profiles.test.cjs (restored from before1d60b165c, plus a profile named in Chinese whose hint is its id): chromium + webkit, en/zh/zh-TW/ja/ de, 1100 and 560px, 20 of 20 green. - Broken by hand: origin/main's app.js with this test: 20 of 20 red. - go test ./internal/gui at the pushed head: ok (TestCoreScriptBudget was red before the pack and the raise). hermes-profiles, hermes-profile-row and i18n-keys at the pushed head: green. go test ./internal/agent -run Hermes: ok. - GUI files hermes-*, agent-*, i18n-*, click-scroll in both engines (64 files, 1082 cases): 1027 pass, 55 red, all in agent-details-ready (#6373, #6369), agent-switch-accounts (#5925) and agent-menu-label (#6371); the same 55 are red on origin/main51b98b1a8run alone. Not tried: a real Hermes install with several profiles in the real app; Linux WebKitGTK; Windows. No Go code changed outside the budget constant.
This commit is contained in:
@@ -78,7 +78,7 @@ something else shows up as drift.
|
||||
- Hermes copies the launch profile's model into a new profile (`_seed_model_config`, or `--clone`'s `config.yaml`) and never reads it again. A model picked in magpie moves every other profile still on `magpie` with the model magpie had set (recorded in `stash.json` as `hermes:<path>:magpie.default`, or the connected config's model before that record) onto the new one; a profile on any other model was set by its user and stays (`hermesFollow` in [`hermes.go`](../../internal/agent/hermes.go); tjhhhh_84378 on Discord).
|
||||
- The config magpie connects is the profile `hermes` starts in: `HERMES_HOME` when it names a profile, else the one `hermes profile use` made sticky in `<root>/active_profile` (a live profile folder; `hermes model` writes the same one), else `HERMES_HOME` or the default folder (`hermesActive`; `_apply_profile_override` in Hermes's `hermes_cli/main.py`). The root's config is then one more profile. A bot on the model the connected config is on through magpie follows too, besides one on the recorded model (`hermes model` there before the bot was made).
|
||||
- Disconnect moves a profile on magpie onto its own model from when magpie connected it, else the connected config's own model (with that provider's `providers` entry when the profile lacks it, as Hermes's `launch_model_seed` does); with neither, its model goes. What it was on is kept (`hermes:<path>:off`), and connecting again puts it back when nothing has changed it, and gives a profile with no model at all magpie's (`hermesBack`). The recorded model stays through Disconnect. Before, Off emptied every such profile and `hermes` there failed at start after Off and On (tjhhhh on Discord, `TestHermesOffAndOnKeepsEveryBotsModel`, `TestHermesStickyProfile`).
|
||||
- With more than one profile, each profile other than the connected one has a field of its own, `profile:<name>` (`default` for the root), kept in the API but drawn nowhere on the connected row (`hermesProfileFields`; `hermesBot` in app.js hides it): the profile has no row in the Agents list either (below), so Hermes is one entry and a profile's model is whatever it holds or follows from the connected config (dongshanfengdongshizhcn on Discord; geekbb on X). A magpie model puts magpie's provider into that profile and stashes its own provider and model first; a model of its own is written as `model.default` and gives back the stashed provider. Default puts back the profile's model from before magpie, or keeps the one it has: Disconnect sends the same empty value. A bot picked there is recorded (`hermes:<path>:picked`) and doesn't follow the connected config's next model, and a sync keeps magpie's provider current in a bot on magpie while the connected config isn't (`TestHermesProfileModels`, `hermes-profiles.test.cjs`).
|
||||
- With more than one profile, each profile other than the connected one has a field of its own, `profile:<name>` (`default` for the root), drawn as a line of the opened row's Other profiles (its name, its picker, and `hermes -p <id>` beside it), never as a square of the row's (`hermesProfileFields`; `hermesBot` in app.js; dongshanfengdongshizhcn on Discord). The profile has no row in the Agents list (below), so Hermes is one entry (geekbb on X) and this section is the only place a profile's model is picked: from v0.1.3912 to v0.1.4024 it was drawn nowhere either, and the profiles looked gone (Norethcy on X, `hermes-profiles.test.cjs`). A magpie model puts magpie's provider into that profile and stashes its own provider and model first; a model of its own is written as `model.default` and gives back the stashed provider. Default puts back the profile's model from before magpie, or keeps the one it has: Disconnect sends the same empty value. A bot picked there is recorded (`hermes:<path>:picked`) and doesn't follow the connected config's next model, and a sync keeps magpie's provider current in a bot on magpie while the connected config isn't (`TestHermesProfileModels`, `hermes-profiles.test.cjs`).
|
||||
- Each profile other than the connected one is also an agent of its own, `hermes#<name>`, marked `Nested`: no list or picker shows it (`DetectedIn`, `ClientsIn` leave it out; geekbb on X: one Hermes entry, not a row and a model pick per bot), while `All` and `Find` still reach it for the Library. A model a user set on a profile, here or in Hermes, stays in its config.yaml and is not touched (`TestHermesProfilesAreNotListedAsAgents`). The agent is `hermesProfileAgents`, named `Hermes · <name>`; `default` for the root when a named profile is connected), the way omp's are `omp#<name>`: its one field, `model`, is the same pick as `profile:<name>`, and the Library gives it skills and MCP servers apart from the other profiles, since Hermes reads `skills/` and `mcp_servers` from each profile's own home (`targetOf` in `internal/library/targets.go`; Norethcy on X). None is listed while Hermes itself is gone (`CLIMissing`).
|
||||
- Hermes's `api_key` may be a reference, `${VAR}` or `${env:VAR}`, which Hermes expands from the `.env` beside the config (its own or a profile's) and then the environment. `Check` and a sync read the key it names (`hermesKey`): one that holds (`keyHolds`) stays and isn't drift, and so does one naming a variable magpie can't see (only a shell profile sets it), which is unknown. One naming a key the gateway doesn't take is drift, and a sync keeps the reference and writes magpie's key into that `.env` under the variable, made `0600` when there is none (`hermesKeptKey`; PaulT on Discord, `TestHermesWithAKeyInItsEnvFile`). A value with more than the one reference in it is replaced by magpie's key, as before.
|
||||
- omp's `models.yml` keeps `modelOverrides`, `discovery`, `disableStrictTools`, headers and compat flags (`ompKept`). Its `auth` and `apiKey` are magpie's, or gone.
|
||||
|
||||
@@ -2191,6 +2191,11 @@ function connectPanel(a, { fields, fieldBtn }) {
|
||||
} else if (AIR_KINDS.has(kindOf(a))) kv(t("In {agent}", { agent: a.name }), ...airSaid(a, line));
|
||||
// Claude Magpie.app (#5671), macOS only
|
||||
if (a.id === "claude-desktop" && a.isolated) kv(t("Separate app"), desktopIsolatedLine(a.isolated), ...(a.isolated.on ? [isoLazy("desktopIsolatedMore", a.isolated)] : []));
|
||||
// Hermes' other profiles, each on its own model: lines of the one Hermes
|
||||
// row, which has no row per profile (geekbb on X), yet each profile's model
|
||||
// is still picked here (Norethcy on X: v0.1.4022 lost them)
|
||||
const bots = a.fields.filter(hermesBot);
|
||||
if (bots[0]) kv(t("Other profiles"), ...bots.map((f) => line(el("span", "ag-tier", f.label), fieldBtn(f, "ag-pick"), el("span", "ag-hint", "hermes -p " + f.key.slice(8)))));
|
||||
// Claude Code's tiers, each with the /model that picks it
|
||||
if (kindOf(a) === "claude") {
|
||||
const tiers = a.fields.filter((f) => TIERS.includes(f.label) && f.options.length);
|
||||
@@ -4779,7 +4784,7 @@ function openPicker(agent, field, anchor, ev, only) {
|
||||
: field.label === COMPACT_MODEL ? "each compaction on the session's model"
|
||||
: ompAgent(agent) && OMP_OWN_PICK.includes(field.label) ? OMP_UNSET[field.label]
|
||||
: asideAccount(agent, field) ? "the account active in {agent}"
|
||||
: agent.id.startsWith("hermes#") ? "put back what {agent} had before magpie"
|
||||
: hermesBot(field) ? "put back what {agent} had before magpie"
|
||||
: "what {agent} ships with";
|
||||
options.unshift({ value: "", label: t(field.label === ADVISOR ? "Off" : "Default"), note: t(note, { agent: agent.name, field: t(field.label) }), icon: agent.icon, reset: true });
|
||||
}
|
||||
@@ -4789,7 +4794,7 @@ function openPicker(agent, field, anchor, ev, only) {
|
||||
const at = options.findIndex((o) => !o.reset);
|
||||
options.splice(at < 0 ? options.length : at, 0, { value: "\0disconnect", label: t("Disconnect from magpie"), note: t("put back what {agent} had before magpie", { agent: agent.name }), svg: UNPLUG, reset: true, run: () => askDisconnect(agent) });
|
||||
}
|
||||
const modelPicker = (["model", "small", "large", MEMORIES, SUB_MODEL, AUTO_MODE, ADVISOR, COMPACT_MODEL, "executor", "planner", ...ROLE_MODELS].includes(field.label)) && !only;
|
||||
const modelPicker = (["model", "small", "large", MEMORIES, SUB_MODEL, AUTO_MODE, ADVISOR, COMPACT_MODEL, "executor", "planner", ...ROLE_MODELS].includes(field.label) || hermesBot(field)) && !only;
|
||||
pick = { agent, field, options, groups, anchor, cursor: 0, free: !only && !field.menu, modelPicker, effortPicker, groupFilter: "all" };
|
||||
if (modelPicker) { readSpeeds(); readLoads(); }
|
||||
anchor.classList.add("open");
|
||||
|
||||
@@ -904,6 +904,7 @@ const I18N = {
|
||||
"Connected · {n} models in {agent}'s {cmd}": "已接入 · {agent} 的 {cmd} 里有 {n} 个模型",
|
||||
"Collapse": "收起",
|
||||
"Tiers": "档位",
|
||||
"Other profiles": "其他 profile",
|
||||
"Details": "详情",
|
||||
"Can't connect": "不能接入",
|
||||
"New sessions take it; switch the tiers in {cmd}.": "新开的会话生效,在 {cmd} 里切换档位。",
|
||||
@@ -6105,6 +6106,7 @@ const I18N = {
|
||||
"Connected · {n} models in {agent}'s {cmd}": "已接入 · {agent} 的 {cmd} 裡有 {n} 個模型",
|
||||
"Collapse": "收起",
|
||||
"Tiers": "檔位",
|
||||
"Other profiles": "其他 profile",
|
||||
"Details": "詳情",
|
||||
"Can't connect": "不能接入",
|
||||
"New sessions take it; switch the tiers in {cmd}.": "新開的會話生效,在 {cmd} 裡切換檔位。",
|
||||
@@ -11271,6 +11273,7 @@ const I18N = {
|
||||
"Connected · {n} models in {agent}'s {cmd}": "接続済み · {agent} の {cmd} に {n} モデル",
|
||||
"Collapse": "折りたたむ",
|
||||
"Tiers": "階層",
|
||||
"Other profiles": "ほかのプロファイル",
|
||||
"Details": "詳細",
|
||||
"Can't connect": "接続できません",
|
||||
"New sessions take it; switch the tiers in {cmd}.": "新しいセッションから反映されます。階層は {cmd} で切り替えます。",
|
||||
@@ -16455,6 +16458,7 @@ const I18N = {
|
||||
"Connected · {n} models in {agent}'s {cmd}": "Verbunden · {n} Modelle in {cmd} von {agent}",
|
||||
"Collapse": "Einklappen",
|
||||
"Tiers": "Stufen",
|
||||
"Other profiles": "Weitere Profile",
|
||||
"Details": "Details",
|
||||
"Can't connect": "Verbinden nicht möglich",
|
||||
"New sessions take it; switch the tiers in {cmd}.": "Gilt für neue Sitzungen; Stufen in {cmd} wechseln.",
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
// `git log -L` of this file.
|
||||
const (
|
||||
appScriptBudget = 1_086_267 // app.js: 1,080,614 at 8016205e3, with the 5,653 of room it had
|
||||
coreScriptBudget = 1_268_023 // every core script at 8016205e3, the old measure 682 over its cap there (#5918); +367 for the model test on a chosen account (tmr11235), no page left to move it to; +151 for the provider menu's "Only on this device" item and its four translations; +458 for Settings › About's Report a problem row and its translations; +113 for withScheme, the one rule every typed address goes through (eachg0 on X), cut to the shortest form that keeps it whole; +10 for the kept whole's tooltip (Musikrv77852 on X), the past-cycle line reused for it, no page left to move it to; +1,112 for Codex's Open button and its Open Codex with menu (Yink88564391 on X), packed to the shortest form, no page left to move them to; +168 for Discover's long lists drawn in part (the owner, 11-13), after the rest of its hook moved into plugingrid.js, imported when Plugins first draws; +296 for the cap toggle and Smart sentences that say what they do and the Sign in on another computer row (Wing8Aqua on X), packed to the shortest form, no page left to move them to; +333 for In turn's figure in a provider's editor and its words naming the message that goes round (Wing8Aqua on X), the figure itself in rotfig.js, imported when In turn is first shown, the hook packed to the shortest form; +236 for a lone capped Codex account's row saying its turns go to the fallbacks when Codex is connected (not_4O4 on X), the two helpers inlined, no page left to move it to; +717 for omp's advisor (Awad_Yoo on X, #6408): its three rows moved into ompadvisor.js, imported when an omp's settings show, and what is left is the import, the role's " · off" and the Settings line's name, packed to the shortest form; +468 for a plugin's own file import (auth.import) in the import sheet, in the plugin's words (marchen_cc on X), packed to one statement; importSay is read as the Providers rows draw, so it has no lazy page to go to, and nothing else was moved out; +180 for Claude Magpie's own Claude Code folder (xMopf7RF on X, #6459): its Advanced fold in claudemagpie.js, imported when it first shows, and what is left is the import and the fold's place in the Separate app line, 216 bytes packed to the shortest form, less the 36 of room there was; +81 for the Use Claude Magpie button on Claude Desktop's row (xMopf7RF on X), drawn by claudemagpie.js too, what is left the one line that places it (#2710)
|
||||
coreScriptBudget = 1_268_248 // every core script at 8016205e3, the old measure 682 over its cap there (#5918); +367 for the model test on a chosen account (tmr11235), no page left to move it to; +151 for the provider menu's "Only on this device" item and its four translations; +458 for Settings › About's Report a problem row and its translations; +113 for withScheme, the one rule every typed address goes through (eachg0 on X), cut to the shortest form that keeps it whole; +10 for the kept whole's tooltip (Musikrv77852 on X), the past-cycle line reused for it, no page left to move it to; +1,112 for Codex's Open button and its Open Codex with menu (Yink88564391 on X), packed to the shortest form, no page left to move them to; +168 for Discover's long lists drawn in part (the owner, 11-13), after the rest of its hook moved into plugingrid.js, imported when Plugins first draws; +296 for the cap toggle and Smart sentences that say what they do and the Sign in on another computer row (Wing8Aqua on X), packed to the shortest form, no page left to move them to; +333 for In turn's figure in a provider's editor and its words naming the message that goes round (Wing8Aqua on X), the figure itself in rotfig.js, imported when In turn is first shown, the hook packed to the shortest form; +236 for a lone capped Codex account's row saying its turns go to the fallbacks when Codex is connected (not_4O4 on X), the two helpers inlined, no page left to move it to; +717 for omp's advisor (Awad_Yoo on X, #6408): its three rows moved into ompadvisor.js, imported when an omp's settings show, and what is left is the import, the role's " · off" and the Settings line's name, packed to the shortest form; +468 for a plugin's own file import (auth.import) in the import sheet, in the plugin's words (marchen_cc on X), packed to one statement; importSay is read as the Providers rows draw, so it has no lazy page to go to, and nothing else was moved out; +180 for Claude Magpie's own Claude Code folder (xMopf7RF on X, #6459): its Advanced fold in claudemagpie.js, imported when it first shows, and what is left is the import and the fold's place in the Separate app line, 216 bytes packed to the shortest form, less the 36 of room there was; +81 for the Use Claude Magpie button on Claude Desktop's row (xMopf7RF on X), drawn by claudemagpie.js too, what is left the one line that places it (#2710); +225 for the Hermes row's Other profiles lines (Norethcy on X), which 1d60b165c took out while each profile had a row and c96f33d65 left with no place at all, packed to the shortest form; the dead hermes# Default note went with it, and the Agents rows draw it, so there is no page to move it to
|
||||
)
|
||||
|
||||
// codeBytes is how many bytes of b are code: its blank lines, its lines
|
||||
|
||||
@@ -1,11 +1,18 @@
|
||||
// Run with Node's test runner and Playwright on the module path; see README.md.
|
||||
// The connected Hermes row has no control for its other profiles: each is an
|
||||
// agent row of its own (hermes#<name>, hermes-profile-row.test.cjs), so two
|
||||
// controls never pick one profile's model (Norethcy on X). The API still has
|
||||
// the "profile:<name>" fields (dongshanfengdongshizhcn on Discord); the row
|
||||
// draws none, no "Other profiles" section and no "hermes -p" line. In every
|
||||
// language, at a normal and a narrow width, in both engines. No backend: the
|
||||
// API is faked here.
|
||||
// Hermes keeps more than one profile (hermes -p <name>), each with its own
|
||||
// config.yaml, and magpie's Hermes row picked the model of one of them only
|
||||
// (dongshanfengdongshizhcn on Discord). Each other profile comes as a field
|
||||
// keyed "profile:<name>": connected, the opened row has an Other profiles
|
||||
// section with one line per profile (its name, its model picker, the
|
||||
// command that runs it), and no square of the row's own. Hermes is one row
|
||||
// in the Agents list (geekbb on X), so this section is the only place a
|
||||
// profile's model is picked; v0.1.4022 drew it nowhere and the profiles
|
||||
// looked gone (Norethcy on X). A profile named in Chinese reads as its name
|
||||
// and its command says its id. A click opens the app's model picker with
|
||||
// Default first, noted as putting back what the profile had before magpie; a
|
||||
// model picked is posted for that profile alone. With one profile only there
|
||||
// is no section. No click scrolls the page. In every language, at a normal
|
||||
// and a narrow width, in both engines. No backend: the API is faked here.
|
||||
const assert = require("node:assert/strict");
|
||||
const fs = require("node:fs/promises");
|
||||
const path = require("node:path");
|
||||
@@ -18,10 +25,10 @@ const hermes = (id, bots) => ({
|
||||
id, name: "Hermes", path: "/test/.hermes/config.yaml", icon: "hermes", wired: true,
|
||||
fields: [
|
||||
{ key: "model", label: "model", value: "magpie/v/glm", options: models },
|
||||
...bots.map((b) => ({ key: "profile:" + b, label: b, value: b === "coder" ? "kimi-k3.5" : "magpie/v/glm", quiet: true, options: [{ value: "kimi-k3.5" }, ...models] })),
|
||||
...bots.map(([b, label = b]) => ({ key: "profile:" + b, label, value: b === "coder" ? "kimi-k3.5" : "magpie/v/glm", quiet: true, options: [{ value: "kimi-k3.5" }, ...models] })),
|
||||
],
|
||||
});
|
||||
const fresh = () => ({ agents: [hermes("hermes", ["a-profile-with-a-long-name", "coder"]), hermes("hermes-one", [])], profiles: [] });
|
||||
const fresh = () => ({ agents: [hermes("hermes", [["a-profile-with-a-long-name"], ["coder"], ["u5c0f-u52a9-u624b", "小助手"]]), hermes("hermes-one", [])], profiles: [] });
|
||||
|
||||
function server(lang, sets) {
|
||||
let cur = fresh();
|
||||
@@ -64,7 +71,7 @@ const one = '.row.agent[data-id="hermes-one"]';
|
||||
for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) {
|
||||
for (const lang of Object.keys(W)) {
|
||||
for (const width of [1100, 560]) {
|
||||
test(`${engine} ${lang} ${width}px: the Hermes row has no control for its other profiles`, async (t) => {
|
||||
test(`${engine} ${lang} ${width}px: each Hermes profile picks its own model`, async (t) => {
|
||||
const w = W[lang];
|
||||
const browser = await (engine === "webkit" ? webkit.launch() : chromium.launch({ channel: "chromium" }));
|
||||
const page = await browser.newPage({ viewport: { width, height: 800 } });
|
||||
@@ -91,14 +98,36 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
|
||||
assert.equal(await page.locator(`${one} .ag-exp`).innerText().then((s) => s.includes(w.head)), false);
|
||||
assert.equal(await page.locator(`${one} .field[data-key^="profile:"]`).count(), 0);
|
||||
|
||||
// the connected row has no profile controls either: each other profile
|
||||
// is its own row (hermes#<name>), where its model is picked
|
||||
await page.locator(`${row} .ag-link`).click();
|
||||
await page.locator(`${row} .ag-exp`).waitFor();
|
||||
assert.equal((await page.locator(`${row} .ag-exp`).innerText()).includes(w.head), false);
|
||||
assert.equal(await page.locator(`${row} .field[data-key^="profile:"]`).count(), 0);
|
||||
assert.equal((await page.locator(`${row} .ag-exp`).innerText()).includes("hermes -p"), false);
|
||||
assert.ok((await page.locator(`${row} .ag-exp`).innerText()).includes(w.head));
|
||||
const keys = await page.locator(`${row} .ag-exp .field.ag-pick[data-key^="profile:"]`).evaluateAll((es) => es.map((e) => e.dataset.key));
|
||||
assert.deepEqual(keys, ["profile:a-profile-with-a-long-name", "profile:coder", "profile:u5c0f-u52a9-u624b"]);
|
||||
// a profile named in Chinese: its name, and the id hermes -p takes
|
||||
const zh = page.locator(`${row} .ag-exp .field.ag-pick[data-key="profile:u5c0f-u52a9-u624b"]`).locator("xpath=..");
|
||||
assert.equal(await zh.locator(".ag-tier").textContent(), "小助手");
|
||||
assert.equal(await zh.locator(".ag-hint").textContent(), "hermes -p u5c0f-u52a9-u624b");
|
||||
const pick = page.locator(`${row} .ag-exp .field.ag-pick[data-key="profile:coder"]`);
|
||||
const line = pick.locator("xpath=..");
|
||||
assert.equal(await line.locator(".ag-tier").textContent(), "coder");
|
||||
assert.equal(await line.locator(".ag-hint").textContent(), "hermes -p coder");
|
||||
assert.equal(await pick.locator(".v").textContent(), "kimi-k3.5");
|
||||
// a long name is cut short, not pushing its picker out
|
||||
const long = page.locator(`${row} .ag-exp .field.ag-pick[data-key="profile:a-profile-with-a-long-name"]`).locator("xpath=..").locator(".ag-tier");
|
||||
assert.ok(await long.evaluate((e) => e.scrollWidth > e.clientWidth && getComputedStyle(e).textOverflow === "ellipsis"));
|
||||
assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth), "the Agents view overflows");
|
||||
|
||||
// the app's model picker, Default first, noted as putting back the profile's own
|
||||
const y = await page.evaluate(() => scrollY);
|
||||
await pick.click();
|
||||
await page.locator("#pop:not([hidden]) #list li").first().waitFor();
|
||||
assert.equal(await page.evaluate(() => scrollY), y, "the click scrolled the page");
|
||||
assert.equal(await page.locator("#pop").evaluate((e) => e.classList.contains("model-picker")), true);
|
||||
const first = await page.locator("#pop #list li").first().innerText();
|
||||
assert.ok(first.includes(w.def) && first.includes(w.note), first);
|
||||
await page.locator("#pop #list li", { hasText: "Flash" }).first().click();
|
||||
await page.waitForFunction(() => document.querySelector('.row.agent[data-id="hermes"] .ag-exp .field[data-key="profile:coder"] .v')?.textContent === "Flash");
|
||||
assert.deepEqual(sets, [{ agent: "hermes", field: "profile:coder", value: "magpie/v/flash" }]);
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user