@@ -3,29 +3,14 @@ describe('로그인 필수 기능', () => {
33 cy . fixture ( 'posts' ) . then ( ( posts ) => {
44 cy . intercept ( 'GET' , / \/ s e l l - p o s t (?: \? | $ ) / , {
55 statusCode : 200 ,
6- body : posts . list ,
6+ body : { data : posts . list } ,
77 } ) . as ( 'getPosts' ) ;
88
99 cy . intercept ( 'GET' , / \/ s e l l - p o s t \/ d e t a i l \/ \d + / , {
1010 statusCode : 200 ,
11- body : posts . detail ,
11+ body : { data : posts . detail } ,
1212 } ) . as ( 'getPostDetail' ) ;
1313 } ) ;
14-
15- cy . intercept ( 'GET' , / \/ r e p a i r \/ s e a r c h / , {
16- statusCode : 200 ,
17- body : [
18- {
19- id : '1' ,
20- name : '테스트 수리점' ,
21- address : '서울시 강남구' ,
22- phone : '02-1234-5678' ,
23- lat : 37.5 ,
24- lng : 127.0 ,
25- placeUrl : 'https://example.com' ,
26- } ,
27- ] ,
28- } ) . as ( 'getRepairShops' ) ;
2914 } ) ;
3015
3116 describe ( '구매 상세 페이지' , ( ) => {
@@ -66,28 +51,6 @@ describe('로그인 필수 기능', () => {
6651 } ) ;
6752 } ) ;
6853
69- describe ( '수리점 찾기 페이지' , ( ) => {
70- beforeEach ( ( ) => {
71- cy . visit ( '/repair' ) ;
72- } ) ;
73-
74- it ( '주소 검색 후 수리점 목록이 표시된다' , ( ) => {
75- cy . get ( 'input[placeholder*="주소"]' ) . should ( 'not.be.disabled' ) . type ( '강남역{enter}' ) ;
76- cy . wait ( '@getRepairShops' ) ;
77-
78- cy . contains ( '테스트 수리점' ) . should ( 'be.visible' ) ;
79- } ) ;
80-
81- it ( '비로그인 상태에서 수리점 찜 버튼 클릭 시 로그인 모달이 표시된다' , ( ) => {
82- cy . get ( 'input[placeholder*="주소"]' ) . should ( 'not.be.disabled' ) . type ( '강남역{enter}' ) ;
83- cy . wait ( '@getRepairShops' ) ;
84-
85- cy . get ( 'button[aria-label="찜"]' ) . first ( ) . click ( ) ;
86-
87- cy . contains ( '로그인이 필요합니다' ) . should ( 'be.visible' ) ;
88- } ) ;
89- } ) ;
90-
9154 describe ( '헤더 네비게이션' , ( ) => {
9255 it ( '비로그인 상태에서 루핏톡 메뉴 클릭 시 로그인 모달이 표시된다' , ( ) => {
9356 cy . visit ( '/' ) ;
0 commit comments