MCPcopy Create free account
hub / github.com/bytebase/bytebase / walk

Function walk

frontend/tests/e2e/sql-editor/sql-editor-admin-mode.spec.ts:640–653  ·  view source on GitHub ↗
(key: "ArrowUp" | "ArrowDown", presses = 8)

Source from the content-addressed store, hash-verified

638 // cursor-reposition no-op presses — are collapsed). Returns the recall
639 // progression.
640 const walk = async (key: "ArrowUp" | "ArrowDown", presses = 8) => {
641 const seen: string[] = [];
642 let prev = await readAdminPromptValue();
643 for (let i = 0; i < presses; i++) {
644 await page.keyboard.press(key);
645 await page.waitForTimeout(200);
646 const v = await readAdminPromptValue();
647 if (v !== prev) {
648 seen.push(v);
649 prev = v;
650 }
651 }
652 return seen;
653 };
654
655 // Up from the empty prompt must walk back through ALL prior statements,
656 // most-recent → oldest, and stop at the oldest (no wrap-around).

Callers 1

Calls 1

readAdminPromptValueFunction · 0.85

Tested by

no test coverage detected