fix: remove redundant permission timing hints
This commit is contained in:
1 parent
3e62385a2f
commit
a19ca04061
2 files changed
+7
-7
No files matched your search
@@ -6,9 +6,10 @@ for (const mode of ['default-sandbox', 'full-access'] as const) {
|
||||
const render = (nextSend: boolean, disabled = false) => renderToStaticMarkup(<SourcePermissionControl
|
||||
mode={mode} nextSend={nextSend} disabled={disabled} onChange={async () => { throw new Error('render must not mutate policy') }} onError={() => {}} />)
|
||||
const busy = render(true)
|
||||
assert.ok(busy.includes('下次发送生效'), 'busy selector must identify future policy, not claim current policy changed')
|
||||
assert.ok(!busy.includes('下次发送生效'), 'busy selector must not add a timing hint')
|
||||
assert.equal(busy, render(false), 'busy and idle permission selectors must have identical labels and markup')
|
||||
assert.ok(!busy.includes('disabled=""'), 'a running/sending turn must not disable preference selection')
|
||||
assert.ok(!render(false).includes('下次发送生效'))
|
||||
assert.ok(render(true, true).includes('disabled=""'), 'plan/ask and load guards remain enforceable')
|
||||
}
|
||||
console.log('Next-send permission labels and enabled/disabled static rendering passed')
|
||||
console.log('Permission labels stay concise across busy/idle states; enabled/disabled static rendering passed')
|
||||
Reference in new issue
Block a user