UI调整
This commit is contained in:
@@ -90,10 +90,15 @@ test("React tags and list pages preserve the original Go catalog content and nav
|
||||
const actual = main(renderPage(Component, data)),
|
||||
expected = main(fixture(name + "-go.html"));
|
||||
assert.ok(actual, name);
|
||||
// The episode label moved from the cover link into the meta-row chip.
|
||||
const coverEpisode = /^(?:全 \d+ 集|更新至 \d+ 集|连载中|已完结)$/;
|
||||
// Both sites label episodes on the cover link, in different wording; compare those links without the label.
|
||||
const coverEpisode = /^(?:全 \d+ 集|更新至 \d+ 集|连载中|已完结)$/,
|
||||
coverBadge = /^(?:\d+ 集 · )?(?:连更|完结)$/;
|
||||
assert.deepEqual(
|
||||
anchors(actual),
|
||||
anchors(actual).map((link) =>
|
||||
link.href.startsWith("/drama/") && coverBadge.test(link.text)
|
||||
? { ...link, text: "" }
|
||||
: link,
|
||||
),
|
||||
anchors(expected).map((link) =>
|
||||
link.href.startsWith("/drama/") && coverEpisode.test(link.text)
|
||||
? { ...link, text: "" }
|
||||
@@ -112,7 +117,7 @@ test("React tags and list pages preserve the original Go catalog content and nav
|
||||
name + " ad placement",
|
||||
);
|
||||
assert.match(actual, /花魁 & 第一部/);
|
||||
assert.match(actual, /<span class="hk-drama-card__meta-ep" data-status="done">完结 · 4 集<\/span>/);
|
||||
assert.match(actual, /<span class="hk-drama-card__eps" data-status="done"><b>4<\/b> 集 · 完结<\/span>/);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user