Skip to content

Commit 90e1a82

Browse files
committed
Update test case
1 parent b653e73 commit 90e1a82

File tree

3 files changed

+31
-6
lines changed

3 files changed

+31
-6
lines changed

frontend/cypress.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"viewportWidth": 1000,
3-
"viewportHeight": 800
3+
"viewportHeight": 800,
4+
"baseUrl": "http://localhost:9091"
45
}
Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
1-
const HOST = 'http://localhost:9091';
1+
// https://docs.cypress.io/api/commands/type.html#Arguments
22

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', '오픈채팅방');
630
});
731
});

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@
7575
"start": "webpack-dev-server --config ./config/webpack.config.dev.js --open",
7676
"restart": "webpack-dev-server --config ./config/webpack.config.dev.js",
7777
"build": "webpack --config ./config/webpack.config.prod.js",
78-
"cypress:open": "cypress open"
78+
"test:cypress": "cypress open"
7979
}
8080
}

0 commit comments

Comments
 (0)