File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 5
5
createFixture ,
6
6
js ,
7
7
mdx ,
8
+ css ,
8
9
} from "./helpers/create-fixture" ;
9
10
import type { Fixture , AppFixture } from "./helpers/create-fixture" ;
10
11
import { PlaywrightFixture } from "./helpers/playwright-fixture" ;
@@ -62,8 +63,10 @@ headers:
62
63
Cache-Control: no-cache
63
64
---
64
65
66
+ import stylesheetHref from "../app.css"
67
+
65
68
export const links = () => [
66
- { rel: "stylesheet", href: "app.css" }
69
+ { rel: "stylesheet", href: stylesheetHref }
67
70
]
68
71
69
72
import { useLoaderData } from ' @remix-run / react';
@@ -86,6 +89,13 @@ export function ComponentUsingData() {
86
89
"app/routes/basic.mdx" : mdx `
87
90
# This is some basic markdown!
88
91
` . trim ( ) ,
92
+
93
+ "app/app.css" : css `
94
+ body {
95
+ background-color: #eee;
96
+ color: #000;
97
+ }
98
+ ` ,
89
99
} ,
90
100
} ) ;
91
101
appFixture = await createAppFixture ( fixture ) ;
@@ -113,6 +123,8 @@ export function ComponentUsingData() {
113
123
expect ( await app . getHtml ( "title" ) ) . toMatch ( "My First Post" ) ;
114
124
expect ( await app . getHtml ( "#loader" ) ) . toMatch ( / M a m b o N u m b e r : .+ 5 / s) ;
115
125
expect ( await app . getHtml ( "#handle" ) ) . toMatch ( "abc" ) ;
116
- expect ( await app . getHtml ( 'link[rel="stylesheet"]' ) ) . toMatch ( "app.css" ) ;
126
+ expect ( await app . getHtml ( 'link[rel="stylesheet"]' ) ) . toMatch (
127
+ / a p p - [ \d A - Z ] + \. c s s /
128
+ ) ;
117
129
} ) ;
118
130
} ) ;
You can’t perform that action at this time.
0 commit comments