Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Commit 3ee6067

Browse files
committed
feat(e2e/site*): updated due to specification changes.
1 parent 9e9bfcb commit 3ee6067

File tree

5 files changed

+22
-13
lines changed

5 files changed

+22
-13
lines changed

e2e/site/app/page.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
import { E2ETest } from '@/component/style-create.css';
2-
import { Conflict } from '@/component/style-not-conflict.css';
1+
import { E2ETest } from '@/component/style-create';
2+
import { Conflict } from '@/component/style-not-conflict';
33
import Link from 'next/link';
4+
import cssx from 'typedcssx';
5+
6+
const css = cssx.create({
7+
page: {
8+
color: 'orange',
9+
},
10+
});
11+
412
export default function Home() {
513
return (
614
<main>
715
<h1>Typed CSS X E2E Test</h1>
16+
<h2 className={css.page}>page.tsx in cssx</h2>
817
<Link href="/server">Server Page</Link>
918
<E2ETest />
1019
<Conflict />

e2e/site/app/server/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ServerComponent } from '@/component/style-server-component.css';
1+
import { ServerComponent } from '@/component/style-server-component';
22
import Link from 'next/link';
33

44
export default function Page() {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use client';
22

3-
import Style, { max_lg } from 'typedcssx';
3+
import cssx, { max_lg } from 'typedcssx';
44

5-
const styles = Style.create({
5+
const css = cssx.create({
66
e2e: {
77
color: 'pink',
88
[max_lg]: {
@@ -11,15 +11,15 @@ const styles = Style.create({
1111
},
1212
});
1313

14-
Style.global({
14+
cssx.global({
1515
h1: {
1616
color: 'aqua',
1717
},
1818
});
1919

2020
export function E2ETest() {
2121
return (
22-
<div className={styles.e2e} data-testid="e2e-test-div">
22+
<div className={css.e2e} data-testid="e2e-test-div">
2323
Component-attach-class and Responsive-design test
2424
</div>
2525
);

e2e/site/component/style-not-conflict.css.tsx renamed to e2e/site/component/style-not-conflict.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use client';
22

3-
import Style from 'typedcssx';
3+
import cssx from 'typedcssx';
44

5-
const styles = Style.create({
5+
const css = cssx.create({
66
test_conflict: {
77
fontSize: 14,
88
color: 'pink',
@@ -11,7 +11,7 @@ const styles = Style.create({
1111

1212
export function Conflict() {
1313
return (
14-
<span className={styles.test_conflict} data-testid="e2e-test-span">
14+
<span className={css.test_conflict} data-testid="e2e-test-span">
1515
Not conflict test
1616
</span>
1717
);

e2e/site/component/style-server-component.css.tsx renamed to e2e/site/component/style-server-component.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import Style from 'typedcssx';
1+
import cssx from 'typedcssx';
22

3-
const styles = Style.create({
3+
const css = cssx.create({
44
test_server: {
55
color: 'green',
66
},
77
});
88

99
export const ServerComponent = () => {
1010
return (
11-
<p className={styles.test_server} data-testid="e2e-test-p">
11+
<p className={css.test_server} data-testid="e2e-test-p">
1212
ServerComponent
1313
</p>
1414
);

0 commit comments

Comments
 (0)