fix: add headroom to dashboard bar scales
This commit is contained in:
1 parent
ed456e6a5d
commit
63b387f679
5 files changed
+96
-10
No files matched your search
@@ -248,10 +248,21 @@ test('operator UI exposes role-aware accounts, executive drill-through, original
|
||||
assert.match(app, /business_route_id/);
|
||||
assert.match(app, /data-operations-status|dataset\.operationsStatus/);
|
||||
assert.match(app, /data-operations-business|dataset\.operationsBusiness/);
|
||||
assert.match(app, /function operationsDashboardRankScale/);
|
||||
assert.match(app, /operationsDashboardRankBar/);
|
||||
assert.match(app, /operations-dashboard-rank-bar/);
|
||||
assert.match(app, /sort\(\(left, right\) => Number\(right\.total/);
|
||||
assert.doesNotMatch(app, /完成率|operationsDashboardCompletionRate|operationsDashboardDays/);
|
||||
const rankScaleSource = app.slice(
|
||||
app.indexOf('function operationsDashboardRankScale('),
|
||||
app.indexOf('function operationsDashboardRankBar(')
|
||||
);
|
||||
const rankScale = Function(`${rankScaleSource}\nreturn operationsDashboardRankScale;`)() as (maximum: number) => number;
|
||||
assert.equal(rankScale(0), 1);
|
||||
assert.equal(rankScale(1), 2);
|
||||
assert.equal(rankScale(43), 50);
|
||||
assert.equal(rankScale(100), 120);
|
||||
assert.equal(rankScale(359), 400);
|
||||
assert.match(app, /function operationsDashboardReadableResult/);
|
||||
assert.match(app, /function operationsDashboardReadableInput/);
|
||||
assert.match(app, /原始输入/);
|
||||
|
||||
@@ -1225,8 +1225,8 @@ test('operator page has a login gate and uses the durable task API', async () =>
|
||||
const inpage = await readFile(new URL('../../chrome-extension/ltjt-order-assistant/inpage.js', import.meta.url), 'utf8');
|
||||
assert.match(index, /id="loginPanel"/);
|
||||
assert.match(index, /id="workbench"[^>]*hidden/);
|
||||
assert.match(index, /styles\.css\?v=20260902-dashboard-bar-chart-1/);
|
||||
assert.match(index, /app\.js\?v=20260902-dashboard-bar-chart-1/);
|
||||
assert.match(index, /styles\.css\?v=20260902-dashboard-nice-scale-1/);
|
||||
assert.match(index, /app\.js\?v=20260902-dashboard-nice-scale-1/);
|
||||
assert.match(index, /id="statusDetailsPopover"/);
|
||||
assert.match(index, /id="statusDetailsRefresh"/);
|
||||
assert.match(app, /apiRequest\(`\/api\/tasks\?\$\{params\.toString\(\)\}`/);
|
||||
|
||||
Reference in new issue
Block a user