Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
a5162b8
✨ server.js 변경
eveneul Aug 25, 2025
ebfaa62
💡 과제 관련 주석 해제
eveneul Aug 25, 2025
b1ae4ab
🐛 반복 유형 기본값을 'none'에서 'daily'로 변경
eveneul Aug 25, 2025
f311a32
✨ 1) 반복 유형 선택 테스트 코드 작성
eveneul Aug 26, 2025
fb206cc
✨ 1) 반복 유형 테스트 코드 수정 및 윤년 처리 로직 추가
eveneul Aug 28, 2025
9905d59
✨ 반복 일정 아이콘 테스트 추가
eveneul Aug 28, 2025
c2f4b82
✨ 반복 종료 조건 (특정 날짜까지) 테스트 코드 구현
eveneul Aug 28, 2025
7bef1ff
✨ 반복 일정 확장 기능 추가 및 반복 아이콘 표시 로직 구현
eveneul Aug 28, 2025
4ae84c5
✨ 일정 편집 기능 개선: 편집 모드에서 기존 일정 삭제 및 성공 메시지 수정
eveneul Aug 28, 2025
29244d4
✨ 일정 편집 로직 개선: 일반 일정 처리 주석 수정 및 반복 일정 기본값 초기화
eveneul Aug 28, 2025
8f50390
✨ 반복 일정 수정 및 해제 기능 테스트 추가: 반복 일정의 제목 수정 시 해제되는 로직과 단일 일정으로 변경되는 로직에 대…
eveneul Aug 28, 2025
839b143
✏️ mockEvent 변수명 변경
eveneul Aug 28, 2025
d551365
✨ 반복 일정에서 단일 일정 삭제 기능 테스트 추가
eveneul Aug 28, 2025
e085bb0
✨ cypress 설치 및 설정,
eveneul Aug 28, 2025
02be287
✨ 매일 반복 유형 e2e 테스트코드 추가
eveneul Aug 28, 2025
58f5a80
🐛 p 태그 중첩 MUI 오류 수정
eveneul Aug 28, 2025
cc5395f
✨ 단일 일정 생성 E2E 테스트 추가
eveneul Aug 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from 'cypress';

export default defineConfig({
e2e: {
baseUrl: 'http://localhost:5173',
supportFile: 'cypress/support/e2e.ts',
specPattern: 'cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
viewportWidth: 1280,
viewportHeight: 720,
video: false,
screenshotOnRunFailure: false,
},
});
54 changes: 54 additions & 0 deletions cypress/e2e/calendar.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
describe('단일 일정 생성 E2E 테스트', () => {

Check failure on line 1 in cypress/e2e/calendar.cy.ts

View workflow job for this annotation

GitHub Actions / lint

'describe' is not defined
beforeEach(() => {

Check failure on line 2 in cypress/e2e/calendar.cy.ts

View workflow job for this annotation

GitHub Actions / lint

'beforeEach' is not defined
cy.visit('/');

Check failure on line 3 in cypress/e2e/calendar.cy.ts

View workflow job for this annotation

GitHub Actions / lint

'cy' is not defined
});

describe('사용자가 반복 일정 체크박스를 해제하고 단일 일정을 생성한다', () => {

Check failure on line 6 in cypress/e2e/calendar.cy.ts

View workflow job for this annotation

GitHub Actions / lint

'describe' is not defined
it('반복 일정 체크박스가 체크되어 있을 때 해제하고 하루만 일정을 생성한다', () => {

Check failure on line 7 in cypress/e2e/calendar.cy.ts

View workflow job for this annotation

GitHub Actions / lint

'it' is not defined
// 기본 일정 정보 입력
cy.get('#title').type('회의');

Check failure on line 9 in cypress/e2e/calendar.cy.ts

View workflow job for this annotation

GitHub Actions / lint

'cy' is not defined
cy.get('#date').type('2025-08-25');

Check failure on line 10 in cypress/e2e/calendar.cy.ts

View workflow job for this annotation

GitHub Actions / lint

'cy' is not defined
cy.get('#start-time').type('14:00');

Check failure on line 11 in cypress/e2e/calendar.cy.ts

View workflow job for this annotation

GitHub Actions / lint

'cy' is not defined
cy.get('#end-time').type('15:00');

Check failure on line 12 in cypress/e2e/calendar.cy.ts

View workflow job for this annotation

GitHub Actions / lint

'cy' is not defined
cy.get('#description').type('팀 회의');

Check failure on line 13 in cypress/e2e/calendar.cy.ts

View workflow job for this annotation

GitHub Actions / lint

'cy' is not defined
cy.get('#location').type('회의실 A');
cy.get('#category').click();
cy.get('[aria-label="업무-option"]').click();

// 반복 일정 체크박스가 체크되어 있는지 확인하고 해제
cy.get('input[type="checkbox"]').should('be.checked');
cy.contains('반복 일정').click();
cy.get('input[type="checkbox"]').should('not.be.checked');

// 일정 추가 버튼 클릭
cy.get('[data-testid="event-submit-button"]').click();

// 일정 겹침 경고 모달이 나타나면 계속 진행 버튼 클릭
cy.get('body').then(($body) => {
if ($body.find('[data-testid="overlap-continue-button"]').length > 0) {
cy.get('[data-testid="overlap-continue-button"]').click();
}
});

// 성공 메시지 확인
cy.contains('일정이 추가되었습니다.').should('be.visible');

// 일정 목록에 단일 일정만 표시되는지 확인
cy.get('[data-testid="event-list"]').should('contain', '회의');
cy.get('[data-testid="event-list"]').should('contain', '2025-08-25');
cy.get('[data-testid="event-list"]').should('contain', '14:00 - 15:00');

// 월간 뷰에서 해당 날짜에만 일정이 표시되는지 확인
cy.get('[data-testid="month-view"]').contains('25').parent().should('contain', '회의');

// 다른 날짜에는 일정이 표시되지 않는지 확인
cy.get('[data-testid="month-view"]').contains('26').parent().should('not.contain', '회의');

// 반복 아이콘이 표시되지 않는지 확인
cy.get('[data-testid="month-view"]').find('[data-testid="repeat-icon"]').should('not.exist');

// 일정 목록에서 반복 정보가 표시되지 않는지 확인
cy.get('[data-testid="event-list"]').should('not.contain', '반복:');
});
});
});
5 changes: 5 additions & 0 deletions cypress/fixtures/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
28 changes: 28 additions & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/// <reference types="cypress" />
// ***********************************************
// This example commands.ts shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************

declare global {
namespace Cypress {
interface Chainable {
/**
* Custom command to select DOM element by data-testid attribute
* @example cy.getByTestId('submit-button')
*/
getByTestId(testId: string): Chainable<JQuery<HTMLElement>>;

Check warning on line 19 in cypress/support/commands.ts

View workflow job for this annotation

GitHub Actions / lint

'testId' is defined but never used
}
}
}

Cypress.Commands.add('getByTestId', (testId: string) => {
return cy.get(`[data-testid="${testId}"]`);
});

export {};
20 changes: 20 additions & 0 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/e2e.ts is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands';

// Alternatively you can use CommonJS syntax:
// require('./commands')
8 changes: 8 additions & 0 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress"]
},
"include": ["**/*.ts"]
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"test": "vitest",
"test:ui": "vitest --ui",
"test:coverage": "vitest run --coverage",
"test:e2e": "cypress run",
"test:e2e:ui": "cypress open",
"test:e2e:headed": "cypress run --headed",
"build": "tsc -b && vite build",
"lint:eslint": "eslint . --ext ts,tsx --report-unused-disable-directives",
"lint:tsc": "tsc --pretty",
Expand Down Expand Up @@ -41,6 +44,7 @@
"@vitest/coverage-v8": "^2.0.3",
"@vitest/ui": "^3.2.4",
"concurrently": "^8.2.2",
"cypress": "^15.0.0",
"eslint": "^9.30.0",
"eslint-config-prettier": "^10.1.5",
"eslint-plugin-cypress": "^5.1.0",
Expand Down
Loading
Loading