完成50%

This commit is contained in:
2026-07-23 08:23:59 +08:00
parent 9b0ad62df4
commit f1edc6b533
218 changed files with 24318 additions and 5514 deletions
+17
View File
@@ -244,6 +244,7 @@ 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('.genealogy-card--current')?.textContent"))?.includes('汤氏宗谱'), 'Joined genealogy card did not expose the current visual state')
assert(
(await valueOf(send, "document.querySelector('.current-meta')?.textContent"))?.includes('成员'),
'Joined genealogy did not display the member role'
@@ -271,6 +272,22 @@ const run = async () => {
await openSwitcher(send)
await clearClones(send)
await valueOf(send, "document.querySelector('.genealogy-switcher__close').click()")
await valueOf(send, `(() => {
const cards = document.querySelectorAll('.genealogy-card')
if (cards.length < 2) return false
cards[0].click()
cards[1].click()
return true
})()`)
await waitFor(send, "location.href.includes('/pages/genealogy/g05-genealogy-overview?genealogyId=1001')", 'Rapid genealogy clicks did not keep the first accepted navigation target')
await valueOf(send, "document.querySelector('.header-back')?.click()")
await waitFor(send, "location.href.includes('/pages/genealogy/g01-my-genealogies')", 'G05 did not return to the existing G01 instance')
assert((await valueOf(send, "document.querySelector('.current-slip')?.textContent"))?.includes('河南'), 'Rejected second navigation overwrote the visible current genealogy')
assert((await valueOf(send, "document.querySelector('.current-meta')?.textContent"))?.includes('管理员'), 'Rejected second navigation overwrote the persisted genealogy context')
await openSwitcher(send)
await clearClones(send)
const final = await getMetrics(send)
assert(final.viewport.width === 412 && final.viewport.height === 915, 'Final viewport is not 412x915')
assert(final.itemCount === 2 && final.cloneCount === 0, 'Final state contains temporary items')