fix: use local placeholder image in fast-ssr tests (#6856)

* use local placeholder image in fast-ssr tests

* Change files
This commit is contained in:
John Kreitlow 2023-11-03 10:42:11 -07:00 коммит произвёл GitHub
Родитель a7144c6319
Коммит 0eb5c61c4a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 25 добавлений и 14 удалений

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "none",
"comment": "use local placeholder image in fast-ssr tests",
"packageName": "@microsoft/fast-ssr",
"email": "863023+radium-v@users.noreply.github.com",
"dependentChangeType": "none"
}

Двоичные данные
packages/web-components/fast-ssr/server/placeholder.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.6 KiB

Просмотреть файл

@ -1,7 +1,8 @@
import { Readable } from "stream";
import express, { Request, Response } from "express";
import fs from "fs"; import fs from "fs";
import path from "path"; import path from "path";
import { Readable } from "stream";
import express, { Request, Response } from "express";
const __dirname = path.resolve(path.dirname("")); const __dirname = path.resolve(path.dirname(""));
const PORT = 8080; const PORT = 8080;
@ -74,4 +75,7 @@ app.get("/fast-command-buffer.js", (req: Request, res: Response) =>
res res
) )
); );
app.get("/placeholder.png", (req, res) =>
res.sendFile(path.resolve(__dirname, "./server/placeholder.png"))
);
app.listen(PORT); app.listen(PORT);

Просмотреть файл

@ -141,7 +141,7 @@
border-radius: calc(var(--control-corner-radius) * 1px); border-radius: calc(var(--control-corner-radius) * 1px);
box-shadow: 0 0 calc((var(--elevation) * 0.225px) + 2px) rgba(0, 0, 0, calc(0.11 * (2 - var(--background-luminance, 1)))), 0 calc(var(--elevation) * 0.4px) calc((var(--elevation) * 0.9px)) rgba(0, 0, 0, calc(0.13 * (2 - var(--background-luminance, 1))));}" box-shadow: 0 0 calc((var(--elevation) * 0.225px) + 2px) rgba(0, 0, 0, calc(0.11 * (2 - var(--background-luminance, 1)))), 0 calc(var(--elevation) * 0.4px) calc((var(--elevation) * 0.9px)) rgba(0, 0, 0, calc(0.13 * (2 - var(--background-luminance, 1))));}"
></fast-style> ></fast-style>
<img src="https://via.placeholder.com/300x200/414141" /> <img src="/placeholder.png" />
<div <div
style=" style="
padding: 0 10px 10px; padding: 0 10px 10px;
@ -217,7 +217,7 @@
<template shadowroot="open"> <template shadowroot="open">
<fast-command-buffer></fast-command-buffer> <fast-command-buffer></fast-command-buffer>
<fast-style data-style-id="fast-card"></fast-style> <fast-style data-style-id="fast-card"></fast-style>
<img src="https://via.placeholder.com/300x200/414141" /> <img src="/placeholder.png" />
<div <div
style=" style="
padding: 0 10px 10px; padding: 0 10px 10px;

Просмотреть файл

@ -138,7 +138,7 @@
border-radius: calc(var(--control-corner-radius) * 1px); border-radius: calc(var(--control-corner-radius) * 1px);
box-shadow: 0 0 calc((var(--elevation) * 0.225px) + 2px) rgba(0, 0, 0, calc(0.11 * (2 - var(--background-luminance, 1)))), 0 calc(var(--elevation) * 0.4px) calc((var(--elevation) * 0.9px)) rgba(0, 0, 0, calc(0.13 * (2 - var(--background-luminance, 1))));}" box-shadow: 0 0 calc((var(--elevation) * 0.225px) + 2px) rgba(0, 0, 0, calc(0.11 * (2 - var(--background-luminance, 1)))), 0 calc(var(--elevation) * 0.4px) calc((var(--elevation) * 0.9px)) rgba(0, 0, 0, calc(0.13 * (2 - var(--background-luminance, 1))));}"
></fast-style> ></fast-style>
<img src="https://via.placeholder.com/300x200/414141" /> <img src="/placeholder.png" />
<div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)"> <div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)">
<h2>Heading</h2> <h2>Heading</h2>
<p> <p>
@ -199,7 +199,7 @@
<fast-card style="width: 300px"> <fast-card style="width: 300px">
<template shadowroot="open"> <template shadowroot="open">
<fast-style style-id="fast-card"></fast-style> <fast-style style-id="fast-card"></fast-style>
<img src="https://via.placeholder.com/300x200/414141" /> <img src="/placeholder.png" />
<div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)"> <div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)">
<h2>Heading</h2> <h2>Heading</h2>
<p> <p>
@ -223,7 +223,7 @@
<fast-card style="width: 300px"> <fast-card style="width: 300px">
<template shadowroot="open"> <template shadowroot="open">
<fast-style style-id="fast-card"></fast-style> <fast-style style-id="fast-card"></fast-style>
<img src="https://via.placeholder.com/300x200/414141" /> <img src="/placeholder.png" />
<div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)"> <div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)">
<h2>Heading</h2> <h2>Heading</h2>
<p> <p>
@ -247,7 +247,7 @@
<fast-card style="width: 300px"> <fast-card style="width: 300px">
<template shadowroot="open"> <template shadowroot="open">
<fast-style style-id="fast-card"></fast-style> <fast-style style-id="fast-card"></fast-style>
<img src="https://via.placeholder.com/300x200/414141" /> <img src="/placeholder.png" />
<div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)"> <div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)">
<h2>Heading</h2> <h2>Heading</h2>
<p> <p>
@ -271,7 +271,7 @@
<fast-card style="width: 300px"> <fast-card style="width: 300px">
<template shadowroot="open"> <template shadowroot="open">
<fast-style style-id="fast-card"></fast-style> <fast-style style-id="fast-card"></fast-style>
<img src="https://via.placeholder.com/300x200/414141" /> <img src="/placeholder.png" />
<div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)"> <div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)">
<h2>Heading</h2> <h2>Heading</h2>
<p> <p>
@ -295,7 +295,7 @@
<fast-card style="width: 300px"> <fast-card style="width: 300px">
<template shadowroot="open"> <template shadowroot="open">
<fast-style style-id="fast-card"></fast-style> <fast-style style-id="fast-card"></fast-style>
<img src="https://via.placeholder.com/300x200/414141" /> <img src="/placeholder.png" />
<div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)"> <div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)">
<h2>Heading</h2> <h2>Heading</h2>
<p> <p>
@ -319,7 +319,7 @@
<fast-card style="width: 300px"> <fast-card style="width: 300px">
<template shadowroot="open"> <template shadowroot="open">
<fast-style style-id="fast-card"></fast-style> <fast-style style-id="fast-card"></fast-style>
<img src="https://via.placeholder.com/300x200/414141" /> <img src="/placeholder.png" />
<div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)"> <div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)">
<h2>Heading</h2> <h2>Heading</h2>
<p> <p>
@ -343,7 +343,7 @@
<fast-card style="width: 300px"> <fast-card style="width: 300px">
<template shadowroot="open"> <template shadowroot="open">
<fast-style style-id="fast-card"></fast-style> <fast-style style-id="fast-card"></fast-style>
<img src="https://via.placeholder.com/300x200/414141" /> <img src="/placeholder.png" />
<div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)"> <div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)">
<h2>Heading</h2> <h2>Heading</h2>
<p> <p>
@ -367,7 +367,7 @@
<fast-card style="width: 300px"> <fast-card style="width: 300px">
<template shadowroot="open"> <template shadowroot="open">
<fast-style style-id="fast-card"></fast-style> <fast-style style-id="fast-card"></fast-style>
<img src="https://via.placeholder.com/300x200/414141" /> <img src="/placeholder.png" />
<div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)"> <div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)">
<h2>Heading</h2> <h2>Heading</h2>
<p> <p>
@ -391,7 +391,7 @@
<fast-card style="width: 300px"> <fast-card style="width: 300px">
<template shadowroot="open"> <template shadowroot="open">
<fast-style style-id="fast-card"></fast-style> <fast-style style-id="fast-card"></fast-style>
<img src="https://via.placeholder.com/300x200/414141" /> <img src="/placeholder.png" />
<div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)"> <div style="padding: 0 10px 10px; color: var(--neutral-foreground-rest)">
<h2>Heading</h2> <h2>Heading</h2>
<p> <p>