Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "use local placeholder image in fast-ssr tests",
"packageName": "@microsoft/fast-ssr",
"email": "[email protected]",
"dependentChangeType": "none"
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions packages/web-components/fast-ssr/server/server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Readable } from "stream";
import express, { Request, Response } from "express";
import fs from "fs";
import path from "path";
import { Readable } from "stream";

import express, { Request, Response } from "express";

const __dirname = path.resolve(path.dirname(""));
const PORT = 8080;
Expand Down Expand Up @@ -74,4 +75,7 @@ app.get("/fast-command-buffer.js", (req: Request, res: Response) =>
res
)
);
app.get("/placeholder.png", (req, res) =>
res.sendFile(path.resolve(__dirname, "./server/placeholder.png"))
);
app.listen(PORT);
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
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))));}"
></fast-style>
<img src="https://via.placeholder.com/300x200/414141" />
<img src="/placeholder.png" />
<div
style="
padding: 0 10px 10px;
Expand Down Expand Up @@ -217,7 +217,7 @@ <h2>Heading</h2>
<template shadowroot="open">
<fast-command-buffer></fast-command-buffer>
<fast-style data-style-id="fast-card"></fast-style>
<img src="https://via.placeholder.com/300x200/414141" />
<img src="/placeholder.png" />
<div
style="
padding: 0 10px 10px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
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))));}"
></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)">
<h2>Heading</h2>
<p>
Expand Down Expand Up @@ -199,7 +199,7 @@ <h2>Heading</h2>
<fast-card style="width: 300px">
<template shadowroot="open">
<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)">
<h2>Heading</h2>
<p>
Expand All @@ -223,7 +223,7 @@ <h2>Heading</h2>
<fast-card style="width: 300px">
<template shadowroot="open">
<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)">
<h2>Heading</h2>
<p>
Expand All @@ -247,7 +247,7 @@ <h2>Heading</h2>
<fast-card style="width: 300px">
<template shadowroot="open">
<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)">
<h2>Heading</h2>
<p>
Expand All @@ -271,7 +271,7 @@ <h2>Heading</h2>
<fast-card style="width: 300px">
<template shadowroot="open">
<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)">
<h2>Heading</h2>
<p>
Expand All @@ -295,7 +295,7 @@ <h2>Heading</h2>
<fast-card style="width: 300px">
<template shadowroot="open">
<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)">
<h2>Heading</h2>
<p>
Expand All @@ -319,7 +319,7 @@ <h2>Heading</h2>
<fast-card style="width: 300px">
<template shadowroot="open">
<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)">
<h2>Heading</h2>
<p>
Expand All @@ -343,7 +343,7 @@ <h2>Heading</h2>
<fast-card style="width: 300px">
<template shadowroot="open">
<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)">
<h2>Heading</h2>
<p>
Expand All @@ -367,7 +367,7 @@ <h2>Heading</h2>
<fast-card style="width: 300px">
<template shadowroot="open">
<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)">
<h2>Heading</h2>
<p>
Expand All @@ -391,7 +391,7 @@ <h2>Heading</h2>
<fast-card style="width: 300px">
<template shadowroot="open">
<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)">
<h2>Heading</h2>
<p>
Expand Down
Loading