File tree Expand file tree Collapse file tree 3 files changed +31
-6
lines changed Expand file tree Collapse file tree 3 files changed +31
-6
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"viewportWidth" : 1000 ,
3
- "viewportHeight" : 800
3
+ "viewportHeight" : 800 ,
4
+ "baseUrl" : " http://localhost:9091"
4
5
}
Original file line number Diff line number Diff line change 1
- const HOST = 'http ://localhost:9091' ;
1
+ // https ://docs.cypress.io/api/commands/type.html#Arguments
2
2
3
- describe ( 'My First Test' , function ( ) {
4
- it ( 'Visits the Kitchen Sink' , function ( ) {
5
- cy . visit ( HOST ) ;
3
+ describe ( 'My simple chat app test' , ( ) => {
4
+ it ( '서비스에 접속 되어야 한다' , function ( ) {
5
+ cy . visit ( '/' ) ;
6
+ } ) ;
7
+
8
+ it ( '메인 타이틀이 있어야 한다' , ( ) => {
9
+ cy . get ( '#header .h-center' ) . should ( 'have.text' , 'Simple Chat' ) ;
10
+ } ) ;
11
+
12
+ it ( '프로필 이미지 변경 되어야 한다' , ( ) => {
13
+ cy . get ( '#avatar-set button' )
14
+ . eq ( 7 )
15
+ . click ( ) ;
16
+ cy . get ( '#btn-edit' ) . click ( ) ;
17
+ } ) ;
18
+
19
+ it ( '닉네임 변경 되어야 한다' , ( ) => {
20
+ cy . get ( '#nickname-wrap input' ) . type ( '배트맨' ) ;
21
+ cy . get ( '#nickname-wrap input' ) . should ( 'have.value' , '배트맨' ) ;
22
+ } ) ;
23
+
24
+ it ( '채팅방에 입장 되어야 한다' , ( ) => {
25
+ cy . contains ( '오픈채팅입장' ) . click ( ) ;
26
+ } ) ;
27
+
28
+ it ( '채팅방 타이틀이 있어야 한다' , ( ) => {
29
+ cy . get ( '#header .h-center' ) . should ( 'have.text' , '오픈채팅방' ) ;
6
30
} ) ;
7
31
} ) ;
Original file line number Diff line number Diff line change 75
75
"start" : " webpack-dev-server --config ./config/webpack.config.dev.js --open" ,
76
76
"restart" : " webpack-dev-server --config ./config/webpack.config.dev.js" ,
77
77
"build" : " webpack --config ./config/webpack.config.prod.js" ,
78
- "cypress:open " : " cypress open"
78
+ "test:cypress " : " cypress open"
79
79
}
80
80
}
You can’t perform that action at this time.
0 commit comments