完成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
+3 -3
View File
@@ -111,7 +111,7 @@ const run = async () => {
const current = await metrics(send)
assert(!current.horizontalOverflow, `${size.width}x${size.height}: horizontal overflow`)
assert(current.context && current.search && current.firstCard, `${size.width}x${size.height}: missing baseline content`)
assert(current.cardCount === 3, `${size.width}x${size.height}: expected three members`)
assert(current.cardCount === 6, `${size.width}x${size.height}: expected six members`)
await valueOf(send, 'scrollTo(0, document.documentElement.scrollHeight)')
await sleep(50)
const lastBottom = await valueOf(send, "document.querySelector('.directory-card:last-child').getBoundingClientRect().bottom")
@@ -131,7 +131,7 @@ const run = async () => {
assert((await metrics(send)).state === 'error', 'Error state did not render')
assert(!await valueOf(send, "Boolean(document.querySelector('.directory-search'))"), 'Error state must not expose search')
await valueOf(send, "document.querySelector('.directory-content .app-button').click()")
await waitFor(send, "document.querySelectorAll('.directory-card').length === 3 && Boolean(document.querySelector('.directory-search'))", 'Error retry did not restore the list')
await waitFor(send, "document.querySelectorAll('.directory-card').length === 6 && Boolean(document.querySelector('.directory-search'))", 'Error retry did not restore the list')
const inputSearch = async (value) => {
await valueOf(send, `(() => {
@@ -146,7 +146,7 @@ const run = async () => {
await inputSearch('不存在')
await waitFor(send, "Boolean(document.querySelector('.directory-state--empty'))", 'No-result search did not render the empty state')
await inputSearch('')
await waitFor(send, "document.querySelectorAll('.directory-card').length === 3", 'Cleared search did not restore all members')
await waitFor(send, "document.querySelectorAll('.directory-card').length === 6", 'Cleared search did not restore all members')
await openState(send, '?genealogyId=1001')
const final = await metrics(send)