@@ -95,8 +95,6 @@ test.describe('Home and archive', () => {
9595 expect ( resume . x ) . toBeGreaterThan ( statement . x + ( statement . width ?? 0 ) ) ;
9696 expect ( archive . x ) . toBe ( resume . x ) ;
9797 expect ( archive . y ) . toBeGreaterThan ( resume . y ) ;
98- expect ( statement . x ) . toBeGreaterThan ( 200 ) ;
99-
10098 const typography = await page . evaluate ( ( ) => {
10199 const statement = document . querySelector ( 'main p' ) ;
102100 const resume = document . querySelector ( '[aria-label="Ark 주요 탐색"] a' ) ;
@@ -107,8 +105,8 @@ test.describe('Home and archive', () => {
107105 } ;
108106 } ) ;
109107
110- expect ( typography . statement ) . toBe ( '16px ' ) ;
111- expect ( typography . resume ) . toBe ( '16px ' ) ;
108+ expect ( typography . statement ) . toBe ( '14px ' ) ;
109+ expect ( typography . resume ) . toBe ( '14px ' ) ;
112110 } ) ;
113111
114112 test ( '@smoke Archive는 날짜와 제목만의 글 목록을 제공해요' , async ( {
@@ -128,7 +126,18 @@ test.describe('Home and archive', () => {
128126 throw new Error ( 'Archive 행 간격을 측정할 수 없습니다.' ) ;
129127 }
130128
131- expect ( secondPost . y - firstPost . y ) . toBeGreaterThan ( firstPost . height ) ;
129+ await expect
130+ . poll ( async ( ) => {
131+ const currentFirstPost = await postLinks . nth ( 0 ) . boundingBox ( ) ;
132+ const currentSecondPost = await postLinks . nth ( 1 ) . boundingBox ( ) ;
133+
134+ if ( ! currentFirstPost || ! currentSecondPost ) {
135+ return 0 ;
136+ }
137+
138+ return currentSecondPost . y - currentFirstPost . y ;
139+ } )
140+ . toBeGreaterThan ( firstPost . height ) ;
132141
133142 if ( ! test . info ( ) . project . use . isMobile ) {
134143 const github = await page
@@ -177,6 +186,7 @@ test.describe('Home and archive', () => {
177186 expect ( resume ) . not . toBeNull ( ) ;
178187 expect ( archive ) . not . toBeNull ( ) ;
179188 expect ( resume ?. y ) . toBeLessThan ( 160 ) ;
180- expect ( archive ?. y ) . toBe ( resume ?. y ) ;
189+ expect ( archive ?. x ) . toBe ( resume ?. x ) ;
190+ expect ( archive ?. y ) . toBeGreaterThan ( resume ?. y ?? 0 ) ;
181191 } ) ;
182192} ) ;
0 commit comments