@@ -16,7 +16,7 @@ describe('메인 페이지', () => {
16
16
cy . contains ( '전체 좋아요 수' ) . should ( 'be.visible' ) ;
17
17
cy . contains ( '총 게시글 수' ) . should ( 'be.visible' ) ;
18
18
19
- cy . contains ( '2500 ' ) . should ( 'be.visible' ) ;
19
+ cy . contains ( '2,500 ' ) . should ( 'be.visible' ) ;
20
20
cy . contains ( '350' ) . should ( 'be.visible' ) ;
21
21
cy . contains ( '15' ) . should ( 'be.visible' ) ;
22
22
} ) ;
@@ -25,20 +25,26 @@ describe('메인 페이지', () => {
25
25
cy . contains ( '테스트 게시물 1' ) . should ( 'be.visible' ) ;
26
26
cy . contains ( '테스트 게시물 2' ) . should ( 'be.visible' ) ;
27
27
28
- cy . contains ( '150' ) . should ( 'be.visible' ) ;
29
- cy . contains ( '25' ) . should ( 'be.visible' ) ;
28
+ cy . get ( 'section' ) . should ( 'contain.text' , '150' ) ;
29
+ cy . get ( 'section' ) . should ( 'contain.text' , '25' ) ;
30
+ cy . get ( 'section' ) . should ( 'contain.text' , '200' ) ;
31
+ cy . get ( 'section' ) . should ( 'contain.text' , '35' ) ;
30
32
} ) ;
31
33
32
34
it ( '정렬 및 필터 기능이 동작해야 한다' , ( ) => {
33
- cy . get ( 'select' ) . should ( 'be.visible' ) ;
34
- cy . get ( 'input[type="checkbox"]' ) . should ( 'be.visible' ) ;
35
+ cy . get ( 'button' ) . should ( 'exist' ) ;
36
+
37
+ cy . get ( 'input[type="checkbox"]' ) . should ( 'exist' ) ;
38
+ cy . contains ( '오름차순' ) . should ( 'be.visible' ) ;
39
+
35
40
cy . contains ( '새로고침' ) . should ( 'be.visible' ) ;
36
41
cy . contains ( '새로고침' ) . should ( 'be.disabled' ) ;
37
42
} ) ;
38
43
39
44
it ( '마지막 업데이트 시간이 표시되어야 한다' , ( ) => {
40
- cy . contains ( '마지막 업데이트' ) . should ( 'be.visible' ) ;
41
- cy . contains ( / \d { 4 } - \d { 2 } - \d { 2 } / ) . should ( 'be.visible' ) ;
45
+ cy . contains ( '마지막 업데이트' ) . should ( 'exist' ) ;
46
+
47
+ cy . get ( 'body' ) . should ( 'contain.text' , '2025' ) ;
42
48
} ) ;
43
49
44
50
it ( '로그아웃 기능이 동작해야 한다' , ( ) => {
0 commit comments