@@ -110,6 +110,24 @@ function defineTest(f: Fixture, variant?: 'no-ssr') {
110
110
await page . getByRole ( 'button' , { name : 'Client Counter: 0' } ) . click ( )
111
111
} )
112
112
113
+ test . describe ( ( ) => {
114
+ test . skip ( f . mode === 'build' )
115
+
116
+ test ( 'server hmr' , async ( { page } ) => {
117
+ await page . goto ( f . url ( ) )
118
+ await waitForHydration ( page )
119
+ await using _ = await expectNoReload ( page )
120
+ await expect ( page . getByText ( 'Vite + RSC' ) ) . toBeVisible ( )
121
+ const editor = f . createEditor ( 'src/root.tsx' )
122
+ editor . edit ( ( s ) =>
123
+ s . replace ( '<h1>Vite + RSC</h1>' , '<h1>Vite x RSC</h1>' ) ,
124
+ )
125
+ await expect ( page . getByText ( 'Vite x RSC' ) ) . toBeVisible ( )
126
+ editor . reset ( )
127
+ await expect ( page . getByText ( 'Vite + RSC' ) ) . toBeVisible ( )
128
+ } )
129
+ } )
130
+
113
131
test ( 'image assets' , async ( { page } ) => {
114
132
await page . goto ( f . url ( ) )
115
133
await waitForHydration ( page )
@@ -122,4 +140,25 @@ function defineTest(f: Fixture, variant?: 'no-ssr') {
122
140
0 ,
123
141
)
124
142
} )
143
+
144
+ test ( 'css @js' , async ( { page } ) => {
145
+ await page . goto ( f . url ( ) )
146
+ await waitForHydration ( page )
147
+ await expect ( page . locator ( '.read-the-docs' ) ) . toHaveCSS (
148
+ 'color' ,
149
+ 'rgb(136, 136, 136)' ,
150
+ )
151
+ } )
152
+
153
+ test . describe ( ( ) => {
154
+ test . skip ( variant === 'no-ssr' )
155
+
156
+ testNoJs ( 'css @nojs' , async ( { page } ) => {
157
+ await page . goto ( f . url ( ) )
158
+ await expect ( page . locator ( '.read-the-docs' ) ) . toHaveCSS (
159
+ 'color' ,
160
+ 'rgb(136, 136, 136)' ,
161
+ )
162
+ } )
163
+ } )
125
164
}
0 commit comments