장식 배경 이미지를 WebP로 바꿔 화면 이미지 전송량을 줄인다
학습자 대시보드 장식 14개와 로그인·회기 배경 2개를 같은 이름의 WebP(품질 90, 투명도 무손실)로 바꿔 합계 8,504,051→968,652 bytes로 줄인다. 사이드바 배경은 1,168,196→152,228 bytes다. 옛 PNG는 이전 세대 CSS가 참조하므로 남기고, 공유 미리보기(og:image)는 PNG를 유지한다. 시각 게이트의 자산 이름 기대값을 함께 바꾼다.
This commit is contained in:
parent
371c297953
commit
14061d25e9
19 changed files with 24 additions and 24 deletions
|
|
@ -1028,11 +1028,11 @@ test.describe("layout visual gate @single-run", () => {
|
|||
nav: nav ? getComputedStyle(nav).backgroundImage : "",
|
||||
};
|
||||
});
|
||||
expect(lightAssets.card).toContain("card-leaf-sprig-light.png");
|
||||
expect(lightAssets.card).toContain("card-leaf-sprig-light.webp");
|
||||
expect(lightAssets.cardSurface).not.toBeNull();
|
||||
expect(lightAssets.cardSurface!.boxShadow).not.toBe("none");
|
||||
expect(lightAssets.shellBody).toContain("background-light-corner.png");
|
||||
expect(lightAssets.nav).toContain("background-light-sidebar.png");
|
||||
expect(lightAssets.shellBody).toContain("background-light-corner.webp");
|
||||
expect(lightAssets.nav).toContain("background-light-sidebar.webp");
|
||||
await page.screenshot({
|
||||
path: path.join(SHOT_DIR, "learner-home__1200-reference-light.png"),
|
||||
fullPage: true,
|
||||
|
|
@ -1046,7 +1046,7 @@ test.describe("layout visual gate @single-run", () => {
|
|||
.poll(() =>
|
||||
page.locator(".vg-shell--learner-dashboard .vg-shell__body").evaluate((element) => getComputedStyle(element).backgroundImage),
|
||||
)
|
||||
.toContain("background-light-corner.png");
|
||||
.toContain("background-light-corner.webp");
|
||||
await page.screenshot({
|
||||
path: path.join(SHOT_DIR, "learner-home__390-reference-light.png"),
|
||||
fullPage: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue