Skip to content

Commit

Permalink
add test for external css file
Browse files Browse the repository at this point in the history
  • Loading branch information
tevanoff committed Dec 21, 2023
1 parent 1bbb99f commit 01a728b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
4 changes: 4 additions & 0 deletions tests/playwright/archiving-assets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,7 @@ test('Assets / percents in URLs are handled', async ({ page }) => {
test('Assets / srcset is used to determine image asset URL', async ({ page }) => {
await page.goto('/asset-paths/srcset');
});

test('Assets / external CSS files are inlined', async ({ page }) => {
await page.goto('/asset-paths/external-css-files');
});
14 changes: 14 additions & 0 deletions tests/playwright/fixtures/asset-paths/external-css-files.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="/css.urls.css" />
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
<div class="flex justify-between w-full m-10">
<div><img src="/img?url=fixtures/blue.png"/></div>
<div><img src="/img?url=fixtures/pink.png"/></div>
<div><img src="/img?url=fixtures/purple.png"/></div>
</div>
</body>
</html>
3 changes: 2 additions & 1 deletion tests/playwright/fixtures/asset-paths/query-params.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html>
<body>
<img src="/img?url=fixtures/blue.png"/>
<img src="/img?url=fixtures/pink.png"/>
<img src="/img?url=fixtures/pink.png"/>
<img src="/img?url=fixtures/purple.png"/>
</body>
</html>

0 comments on commit 01a728b

Please sign in to comment.