完成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
+13 -2
View File
@@ -76,12 +76,20 @@ const run = async () => {
throw new Error('N01 initial unread count is invalid')
}
await valueOf(send, "document.querySelector('.notice-card').click()")
await waitFor(send, "location.hash.includes('/pages/notification/n02-message-detail?id=review-1&genealogyId=1001')", 'N01 first notice did not open its N02 detail')
await waitFor(send, "location.hash === '#/pages/notification/n02-message-detail?id=review-1&sourceKey=N01'", 'N01 first notice did not open the exact N02 detail route')
if (await valueOf(send, "location.hash.includes('genealogyId=')")) {
throw new Error('N01 duplicated genealogyId in the N02 detail route')
}
await waitFor(send, "Boolean(document.querySelector('.notice-state--ready'))", 'N02 detail did not render after opening the notice')
await valueOf(send, "document.querySelector('.header-back').click()")
await waitFor(send, "Boolean(document.querySelector('.notice-state--list'))", 'N01 did not return from N02')
await waitFor(send, "document.querySelectorAll('.notice-card__status.is-unread').length === 0", 'N01 did not preserve the first notice read state')
await open(send, '/pages/notification/n02-message-detail', '?id=missing', '.notice-state--expired')
if (await valueOf(send, "Boolean(document.querySelector('.action-stack'))")) {
throw new Error('N02 unknown notice exposed business actions')
}
// 步骤三:全标已读必须清除全部未读标记、隐藏页头操作,并显示项目内反馈。
await open(send, '/pages/notification/n01-message-center', '?genealogyId=1001', '.notice-state--list')
await valueOf(send, "document.querySelector('.header-action').click()")
@@ -91,7 +99,10 @@ const run = async () => {
// 步骤四:保留原有空态、成功态和错误态入口,防止新增交互覆盖挤掉页面状态冒烟。
await open(send, '/pages/family/f01-family-feed', '?state=empty&genealogyId=1001', '.feed-state--empty')
await open(send, '/pages/family/f02-publish-feed', '?state=success&genealogyId=1001', '.publish-state--success')
await open(send, '/pages/family/f02-publish-feed', '?state=preview&genealogyId=1001', '.publish-state--preview')
if (!(await valueOf(send, "document.querySelector('.publish-result')?.textContent.includes('尚未提交服务器')"))) {
throw new Error('F02 preview must disclose that the draft was not published')
}
await open(send, '/pages/notification/n01-message-center', '?state=empty', '.notice-state--empty')
await open(send, '/pages/profile/m01-profile-home', '?state=error', '.profile-state--error')