完成50%
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user