fix: sync G01 role shortcuts

This commit is contained in:
rain
2026-07-21 13:06:36 +08:00
parent 8468cc0f89
commit 668b4ef55f
4 changed files with 212 additions and 2 deletions
+20
View File
@@ -261,10 +261,30 @@ const run = async () => {
await valueOf(send, "document.querySelectorAll('.switcher-item')[1].click()")
await waitFor(send, "!document.querySelector('.genealogy-switcher')", 'Selecting the second genealogy did not close the switcher')
assert((await valueOf(send, "document.querySelector('.current-slip')?.textContent"))?.includes('山东'), 'Selecting the second genealogy did not update the current genealogy')
assert(
(await valueOf(send, "document.querySelector('.current-meta')?.textContent"))?.includes('成员'),
'Joined genealogy did not display the member role'
)
assert(
(await valueOf(send, "document.querySelectorAll('.shortcut-item').length")) === 3,
'Joined genealogy did not hide the application-review shortcut'
)
assert(
!(await valueOf(send, "document.querySelector('.shortcut-grid')?.textContent"))?.includes('申请审核'),
'Joined genealogy still exposed application review'
)
await openSwitcher(send)
await valueOf(send, "document.querySelectorAll('.switcher-item')[0].click()")
await waitFor(send, "!document.querySelector('.genealogy-switcher')", 'Restoring the first genealogy did not close the switcher')
assert(
(await valueOf(send, "document.querySelector('.current-meta')?.textContent"))?.includes('管理员'),
'Created genealogy did not restore the administrator role'
)
assert(
(await valueOf(send, "document.querySelectorAll('.shortcut-item').length")) === 4,
'Created genealogy did not restore all four shortcuts'
)
await openSwitcher(send)
await clearClones(send)