diff --git a/test/e2e/app-dir/app/app/css/css-page/page.server.js b/test/e2e/app-dir/app/app/css/css-page/page.server.js
index bfef13a4b5c0..2fbdf86dedd5 100644
--- a/test/e2e/app-dir/app/app/css/css-page/page.server.js
+++ b/test/e2e/app-dir/app/app/css/css-page/page.server.js
@@ -1,5 +1,13 @@
import './style.css'
+import styles from './style.module.css'
export default function Page() {
- return
Page
+ return (
+ <>
+ Page
+
+ CSSM
+
+ >
+ )
}
diff --git a/test/e2e/app-dir/app/app/css/css-page/style.module.css b/test/e2e/app-dir/app/app/css/css-page/style.module.css
new file mode 100644
index 000000000000..3991f65d58d1
--- /dev/null
+++ b/test/e2e/app-dir/app/app/css/css-page/style.module.css
@@ -0,0 +1,3 @@
+.mod {
+ color: blue;
+}
diff --git a/test/e2e/app-dir/index.test.ts b/test/e2e/app-dir/index.test.ts
index 5d4d0f307a79..e22823c3d79d 100644
--- a/test/e2e/app-dir/index.test.ts
+++ b/test/e2e/app-dir/index.test.ts
@@ -1080,9 +1080,24 @@ describe('app dir', () => {
})
})
- describe.skip('server pages', () => {
- it('should support global css inside server pages', async () => {})
- it('should support css modules inside server pages', async () => {})
+ describe('server pages', () => {
+ it('should support global css inside server pages', async () => {
+ const browser = await webdriver(next.url, '/css/css-page')
+ expect(
+ await browser.eval(
+ `window.getComputedStyle(document.querySelector('h1')).color`
+ )
+ ).toBe('rgb(255, 0, 0)')
+ })
+
+ it('should support css modules inside server pages', async () => {
+ const browser = await webdriver(next.url, '/css/css-page')
+ expect(
+ await browser.eval(
+ `window.getComputedStyle(document.querySelector('#cssm')).color`
+ )
+ ).toBe('rgb(0, 0, 255)')
+ })
})
describe('client layouts', () => {