Skip to content

Commit

Permalink
fix: use local placeholder image in fast-ssr tests (#6856)
Browse files Browse the repository at this point in the history
* use local placeholder image in fast-ssr tests

* Change files
  • Loading branch information
radium-v authored and janechu committed Jun 10, 2024
1 parent bfd5cbc commit 1aeddd7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
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
20 changes: 10 additions & 10 deletions packages/web-components/fast-ssr/src/styles/fast-style.fixture.html
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

0 comments on commit 1aeddd7

Please sign in to comment.