完成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
+25 -10
View File
@@ -59,35 +59,50 @@ const run = async () => {
if (!(await valueOf(send, "document.querySelector('.app-toast')?.textContent.includes('请先写下动态内容')"))) {
throw new Error("F02 empty submit showed unexpected feedback");
}
await setInput(send, ".publish-form textarea", "这是一条本地动态预览。");
await click(send, ".publish-form .app-button");
await waitFor(send, "Boolean(document.querySelector('.publish-state--preview'))", "F02 did not enter honest local preview");
if (!(await valueOf(send, "document.querySelector('.publish-result')?.textContent.includes('尚未提交服务器')"))) {
throw new Error("F02 preview did not disclose that content was not published");
}
for (const size of [{ width: 320, height: 568 }, { width: 412, height: 915 }]) {
await send("Emulation.setDeviceMetricsOverride", { ...size, deviceScaleFactor: 1, mobile: true, screenWidth: size.width, screenHeight: size.height });
await open(send, "/pages/family/f04-article-list?count=50", ".article-card");
if ((await valueOf(send, "document.querySelectorAll('.article-card').length")) !== 50) throw new Error(`F04 did not render 50 articles at ${size.width}`);
await open(send, "/pages/family/f04-article-list?genealogyId=1001", ".article-card");
if ((await valueOf(send, "document.querySelectorAll('.article-card').length")) !== 3) throw new Error(`F04 did not render the scoped article owner at ${size.width}`);
if ((await valueOf(send, "document.documentElement.scrollWidth")) > size.width + 1) throw new Error(`F04 horizontal overflow at ${size.width}`);
await valueOf(send, "document.querySelector('.article-card:last-of-type').scrollIntoView()");
await open(send, "/pages/family/f07-album-list?count=30", ".album-card");
if ((await valueOf(send, "document.querySelectorAll('.album-card').length")) !== 30) throw new Error(`F07 did not render 30 albums at ${size.width}`);
await open(send, "/pages/family/f07-album-list?genealogyId=1001", ".album-card");
if ((await valueOf(send, "document.querySelectorAll('.album-card').length")) !== 3) throw new Error(`F07 did not render the scoped album owner at ${size.width}`);
if ((await valueOf(send, "document.documentElement.scrollWidth")) > size.width + 1) throw new Error(`F07 horizontal overflow at ${size.width}`);
}
await open(send, "/pages/family/f04-article-list", ".article-card");
await open(send, "/pages/family/f04-article-list?genealogyId=1001", ".article-card");
await click(send, ".article-card");
await waitFor(send, "location.hash.includes('/pages/family/f05-article-detail?articleId=101')", "F04 card did not open ID-driven F05");
await waitFor(send, "location.hash.includes('/pages/family/f05-article-detail?genealogyId=1001&articleId=101')", "F04 card did not open composite-identity F05");
await open(send, "/pages/family/f03-feed-detail?feedId=1", ".feed-comment-form textarea");
await open(send, "/pages/family/f03-feed-detail?genealogyId=1001&feedId=1", ".feed-comment-form textarea");
const before = await valueOf(send, "document.querySelectorAll('.feed-comment-card').length");
await setInput(send, ".feed-comment-form textarea", "愿家人岁岁平安,常聚常新。");
await click(send, ".feed-comment-form .app-button");
await waitFor(send, `document.querySelectorAll('.feed-comment-card').length === ${before + 1}`, "F03 comment was not appended");
await waitFor(send, "Boolean(document.querySelector('.comment-state--preview'))", "F03 did not enter comment preview");
if ((await valueOf(send, "document.querySelectorAll('.feed-comment-card').length")) !== before) throw new Error("F03 appended an unsubmitted comment");
if ((await valueOf(send, "document.querySelector('.feed-comment-form textarea').value")) !== "愿家人岁岁平安,常聚常新。") throw new Error("F03 cleared the unsubmitted comment draft");
await open(send, "/pages/family/f07-album-list", ".album-list > .app-button");
await open(send, "/pages/family/f07-album-list?genealogyId=1001", ".album-list > .app-button");
const albumCount = await valueOf(send, "document.querySelectorAll('.album-card').length");
await click(send, ".album-list > .app-button");
await waitFor(send, "Boolean(document.querySelector('.app-dialog-layer'))", "F07 create dialog did not open");
await setInput(send, ".album-dialog-field input", "清明祭祖影像");
await click(send, ".app-dialog__actions .app-button:last-child");
await waitFor(send, "document.querySelector('.album-card .album-card__copy').innerText.includes('清明祭祖影像')", "F07 created album was not added");
await waitFor(send, "document.querySelector('.album-local-preview')?.textContent.includes('清明祭祖影像')", "F07 local album preview did not render");
if ((await valueOf(send, "document.querySelectorAll('.album-card').length")) !== albumCount) throw new Error("F07 inserted an unsubmitted album into the official list");
await open(send, "/pages/family/f03-feed-detail?genealogyId=1002&feedId=1", ".feed-state--expired");
await open(send, "/pages/family/f05-article-detail?genealogyId=1002&articleId=101", ".article-state--expired");
await open(send, "/pages/family/f08-album-detail?genealogyId=1002&albumId=201", ".album-state--expired");
await open(send, "/pages/family/f09-media-upload?genealogyId=1002&albumId=201", ".media-upload-state--invalid");
process.stdout.write("F-BUSINESS-FLOW-RUNTIME-SMOKE PASS\n");
} finally {