fix(studio): deploy complete interactive gallery and rounded switches
This commit is contained in:
1 parent
a1dc8ecd91
commit
5da1e33ee1
5 files changed
+65
-37
No files matched your search
@@ -134,8 +134,21 @@ try {
|
||||
`Component gallery page ${page + 1} failed: ${await gallery.text()}`,
|
||||
);
|
||||
const artifact = await gallery.json();
|
||||
if (!(await fetch(origin + artifact.url)).ok)
|
||||
throw Error(`Gallery page ${page + 1} did not render.`);
|
||||
const rendered = await fetch(origin + artifact.url);
|
||||
if (!rendered.ok) throw Error(`Gallery page ${page + 1} did not render.`);
|
||||
const html = await rendered.text();
|
||||
const count = (
|
||||
html.match(/<section class="sample" data-gallery-component=/g) ?? []
|
||||
).length;
|
||||
if (
|
||||
count !== (page === 6 ? 8 : 16) ||
|
||||
!html.includes("bindPreview()") ||
|
||||
/<div[^>]*data-component=/.test(html) ||
|
||||
!html.includes("data:image/svg+xml,")
|
||||
)
|
||||
throw Error(
|
||||
`Gallery page ${page + 1} is missing samples, icons or browser behavior.`,
|
||||
);
|
||||
}
|
||||
console.log(
|
||||
"Compiled server serves component pages, Studio assets, export-only APIs and previews on one port.",
|
||||
|
||||
Reference in new issue
Block a user