File tree Expand file tree Collapse file tree 5 files changed +38
-26
lines changed
integration/tailwindcss/tests Expand file tree Collapse file tree 5 files changed +38
-26
lines changed Original file line number Diff line number Diff line change 11import path from 'path' ;
22import { fixtures , launchAppWithPage } from './utils' ;
33
4+ rstest . setConfig ( { testTimeout : 180_000 , hookTimeout : 180_000 } ) ;
5+
46describe ( 'use tailwindcss v2' , ( ) => {
57 test ( `should show style by use tailwindcss theme` , async ( ) => {
68 const appDir = path . resolve ( fixtures , 'tailwindcss-v2' ) ;
79 const { page, clear } = await launchAppWithPage ( appDir ) ;
10+ try {
11+ const primaryColorElement = await page . waitForSelector ( '.bg-primary' ) ;
12+ const backgroundColor = await page . evaluate ( element => {
13+ const style = window . getComputedStyle ( element ) ;
14+ return style . backgroundColor ;
15+ } , primaryColorElement ) ;
816
9- const primaryColorElement = await page . waitForSelector ( '.bg-primary' ) ;
10- const backgroundColor = await page . evaluate ( element => {
11- const style = window . getComputedStyle ( element ) ;
12- return style . backgroundColor ;
13- } , primaryColorElement ) ;
14-
15- expect ( backgroundColor ) . toMatch ( / r g b \( 0 , 0 , 2 5 5 \) | # 0 0 0 0 f f | b l u e / i) ;
16-
17- await clear ( ) ;
17+ expect ( backgroundColor ) . toMatch ( / r g b \( 0 , 0 , 2 5 5 \) | # 0 0 0 0 f f | b l u e / i) ;
18+ } finally {
19+ await clear ( ) ;
20+ }
1821 } ) ;
1922} ) ;
Original file line number Diff line number Diff line change 11import path from 'path' ;
22import { fixtures , launchAppWithPage } from './utils' ;
33
4+ rstest . setConfig ( { testTimeout : 180_000 , hookTimeout : 180_000 } ) ;
5+
46describe ( 'use tailwindcss v3' , ( ) => {
57 test ( `should show style by use tailwindcss theme` , async ( ) => {
68 const appDir = path . resolve ( fixtures , 'tailwindcss-v3' ) ;
79 const { page, clear } = await launchAppWithPage ( appDir ) ;
10+ try {
11+ const primaryColorElement = await page . waitForSelector ( '.bg-primary' ) ;
12+ const backgroundColor = await page . evaluate ( element => {
13+ const style = window . getComputedStyle ( element ) ;
14+ return style . backgroundColor ;
15+ } , primaryColorElement ) ;
816
9- const primaryColorElement = await page . waitForSelector ( '.bg-primary' ) ;
10- const backgroundColor = await page . evaluate ( element => {
11- const style = window . getComputedStyle ( element ) ;
12- return style . backgroundColor ;
13- } , primaryColorElement ) ;
14-
15- expect ( backgroundColor ) . toMatch ( / r g b \( 0 , 0 , 2 5 5 \) | # 0 0 0 0 f f | b l u e / i) ;
16-
17- await clear ( ) ;
17+ expect ( backgroundColor ) . toMatch ( / r g b \( 0 , 0 , 2 5 5 \) | # 0 0 0 0 f f | b l u e / i) ;
18+ } finally {
19+ await clear ( ) ;
20+ }
1821 } ) ;
1922} ) ;
Original file line number Diff line number Diff line change 11import path from 'path' ;
22import { fixtures , launchAppWithPage } from './utils' ;
33
4+ rstest . setConfig ( { testTimeout : 180_000 , hookTimeout : 180_000 } ) ;
5+
46describe ( 'use tailwindcss v4' , ( ) => {
57 test ( `should show style by use tailwindcss theme` , async ( ) => {
68 const appDir = path . resolve ( fixtures , 'tailwindcss-v4' ) ;
79 const { page, clear } = await launchAppWithPage ( appDir ) ;
8- const primaryColorElement = await page . waitForSelector ( '.bg-primary' ) ;
9- const backgroundColor = await page . evaluate ( element => {
10- const style = window . getComputedStyle ( element ) ;
11- return style . backgroundColor ;
12- } , primaryColorElement ) ;
13-
14- expect ( backgroundColor ) . toMatch ( / r g b \( 0 , 0 , 2 5 5 \) | # 0 0 0 0 f f | b l u e / i) ;
10+ try {
11+ const primaryColorElement = await page . waitForSelector ( '.bg-primary' ) ;
12+ const backgroundColor = await page . evaluate ( element => {
13+ const style = window . getComputedStyle ( element ) ;
14+ return style . backgroundColor ;
15+ } , primaryColorElement ) ;
1516
16- await clear ( ) ;
17+ expect ( backgroundColor ) . toMatch ( / r g b \( 0 , 0 , 2 5 5 \) | # 0 0 0 0 f f | b l u e / i) ;
18+ } finally {
19+ await clear ( ) ;
20+ }
1721 } ) ;
1822} ) ;
Original file line number Diff line number Diff line change @@ -5,4 +5,5 @@ export default defineConfig({
55 'integration/rstest/**/rstest.config.{ts,mts}' ,
66 'integration/rstest/**/rstest.*.config.{ts,mts}' ,
77 ] ,
8+ reporters : [ 'default' ] ,
89} ) ;
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ export default defineConfig({
66 exclude : [ 'integration/rstest/**' ] ,
77 globals : true ,
88 retry : 1 ,
9+ reporters : [ 'default' ] ,
910 testTimeout : 60_000 ,
1011 hookTimeout : 60_000 ,
1112} ) ;
You can’t perform that action at this time.
0 commit comments