diff --git a/frontend/playwright.api.config.ts b/frontend/playwright.api.config.ts
index 1de4307fa..ee11c47f1 100644
--- a/frontend/playwright.api.config.ts
+++ b/frontend/playwright.api.config.ts
@@ -19,7 +19,7 @@ export default defineConfig({
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
- workers: process.env.CI ? 1 : undefined,
+ workers: process.env.CI ? 4 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
@@ -41,11 +41,11 @@ export default defineConfig({
dependencies: ['setup'],
},
- {
- name: 'firefox',
- use: { ...devices['Desktop Firefox'], storageState: 'playwright/.auth/user.json' },
- dependencies: ['setup'],
- },
+ // {
+ // name: 'firefox',
+ // use: { ...devices['Desktop Firefox'], storageState: 'playwright/.auth/user.json' },
+ // dependencies: ['setup'],
+ // },
{
name: 'webkit',
diff --git a/frontend/playwright.mock.config.ts b/frontend/playwright.mock.config.ts
index d737aceb8..cfbd11fed 100644
--- a/frontend/playwright.mock.config.ts
+++ b/frontend/playwright.mock.config.ts
@@ -19,7 +19,7 @@ export default defineConfig({
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
- workers: process.env.CI ? 1 : undefined,
+ workers: process.env.CI ? 4 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
@@ -38,10 +38,10 @@ export default defineConfig({
use: { ...devices['Desktop Chrome'] },
},
- {
- name: 'firefox',
- use: { ...devices['Desktop Firefox'] },
- },
+ // {
+ // name: 'firefox',
+ // use: { ...devices['Desktop Firefox'] },
+ // },
{
name: 'webkit',
diff --git a/frontend/playwright/tests/api/auth.setup.ts b/frontend/playwright/tests/api/auth.setup.ts
index b05c0f5ad..c42ccff9e 100644
--- a/frontend/playwright/tests/api/auth.setup.ts
+++ b/frontend/playwright/tests/api/auth.setup.ts
@@ -1,16 +1,18 @@
import { test as setup } from '@playwright/test';
import path from 'path';
+import { ROUTE_PATH } from '@/constants/routePath';
+
const authFile = path.join(__dirname, '../../../playwright/.auth/user.json');
setup('authenticate', async ({ page }) => {
const username = process.env.EMAIL || '';
const password = process.env.PASSWORD || '';
- await page.goto('/sign-in');
+ await page.goto(ROUTE_PATH.signIn);
await page.locator('input[name="email"]').fill(username);
await page.locator('input[name="password"]').fill(password);
await page.getByRole('button', { name: '로그인 하기' }).click();
- await page.waitForURL('/home');
+ await page.waitForURL(ROUTE_PATH.home);
await page.context().storageState({ path: authFile });
});
diff --git a/frontend/playwright/tests/api/postNewChecklist.spec.ts b/frontend/playwright/tests/api/postNewChecklist.spec.ts
index 12217038f..12520d170 100644
--- a/frontend/playwright/tests/api/postNewChecklist.spec.ts
+++ b/frontend/playwright/tests/api/postNewChecklist.spec.ts
@@ -1,9 +1,11 @@
import { expect, test } from '@playwright/test';
+import { ROUTE_PATH } from '@/constants/routePath';
+
import { DefaultChecklistTabsNames, FirstCategoryQuestion } from '../constants/constants';
test('체크리스트가 인풋을 채우고 제출할 수 있다.', async ({ page }) => {
- await page.goto('/checklist/new');
+ await page.goto(ROUTE_PATH.checklistNew);
const tabs = page.locator('.tab');
const roomInfoTab = tabs.nth(0);
diff --git a/frontend/playwright/tests/api/renderTab.spec.ts b/frontend/playwright/tests/api/renderTab.spec.ts
index 607927827..bc25eabbf 100644
--- a/frontend/playwright/tests/api/renderTab.spec.ts
+++ b/frontend/playwright/tests/api/renderTab.spec.ts
@@ -1,5 +1,7 @@
import test, { expect } from '@playwright/test';
+import { ROUTE_PATH } from '@/constants/routePath';
+
import {
DefaultChecklistTabsNames,
DefaultQuestionSelectTabsNames,
@@ -8,7 +10,7 @@ import {
} from '../constants/constants';
test('체크리스트 생성 페이지에 들어가면 탭과 질문들이 잘 렌더링된다.', async ({ page }) => {
- await page.goto('/checklist/new');
+ await page.goto(ROUTE_PATH.checklistNew);
const tabs = page.locator('.tab');
await expect(tabs).toHaveCount(6, { timeout: 3000 });
@@ -37,7 +39,7 @@ test('체크리스트 질문 선택 페이지에 들어가면 탭과 질문들
});
test('체크리스트 편집 페이지에 들어가면 탭과 질문들이 잘 렌더링된다.', async ({ page }) => {
- await page.goto('/checklist');
+ await page.goto(ROUTE_PATH.checklistList);
await page.getByTestId('checklist-card').nth(0).click();
const checklistEditButton = page.locator('button[id="checklistEditButton"]');
await checklistEditButton.click();
diff --git a/frontend/playwright/tests/mock/postNewChecklist.spec.ts b/frontend/playwright/tests/mock/postNewChecklist.spec.ts
index 18b4747c2..d6c507b28 100644
--- a/frontend/playwright/tests/mock/postNewChecklist.spec.ts
+++ b/frontend/playwright/tests/mock/postNewChecklist.spec.ts
@@ -1,8 +1,10 @@
import { test } from '@playwright/test';
+import { ROUTE_PATH } from '@/constants/routePath';
+
test('빈 체크리스트를 제출할 수 있다.', async ({ page }) => {
- await page.goto('/checklist/new');
+ await page.goto(ROUTE_PATH.checklistNew);
await page.getByRole('button', { name: '저장' }).click();
await page.getByRole('button', { name: '체크리스트 저장하기' }).click();
- await page.waitForURL('/checklist');
+ await page.waitForURL(ROUTE_PATH.checklistList);
});
diff --git a/frontend/public/index.html b/frontend/public/index.html
index e538d0011..4e8d10c59 100644
--- a/frontend/public/index.html
+++ b/frontend/public/index.html
@@ -9,7 +9,7 @@
-
+
-
-
-
-
-
+
+
+
+
+
diff --git a/frontend/src/apis/checklist.ts b/frontend/src/apis/checklist.ts
index 0d16a9c0b..7e18eca45 100644
--- a/frontend/src/apis/checklist.ts
+++ b/frontend/src/apis/checklist.ts
@@ -18,13 +18,14 @@ export const getChecklistAllQuestions = async () => {
export const getChecklistDetail = async (id: number) => {
const response = await fetcher.get({ url: BASE_URL + ENDPOINT.CHECKLIST_ID_V1(id) });
- const data = await response.json();
- return data as ChecklistInfo;
+ const data = (await response.json()) as ChecklistInfo;
+ data.room = Object.fromEntries(Object.entries(data.room).filter(([, value]) => value !== null));
+ return data;
};
export const getChecklists = async (isLikeFiltered: boolean = false) => {
const response = await fetcher.get({
- url: BASE_URL + (isLikeFiltered ? ENDPOINT.CHECKLISTS_LIKE : ENDPOINT.CHECKLISTS),
+ url: BASE_URL + (isLikeFiltered ? ENDPOINT.CHECKLISTS_LIKE_V1 : ENDPOINT.CHECKLISTS_V1),
});
const data = await response.json();
return data.checklists.map(mapObjNullToUndefined).slice(0, 10);
@@ -40,7 +41,7 @@ export const postChecklist = async (checklist: ChecklistPostForm) => {
export const putChecklist = async (id: number, checklist: ChecklistPostForm) => {
const mappedRoomInfo = roomInfoApiMapper(checklist.room);
const mappedChecklist = { ...checklist, room: mappedRoomInfo };
- const response = await fetcher.put({ url: BASE_URL + ENDPOINT.CHECKLIST_ID(id), body: mappedChecklist });
+ const response = await fetcher.put({ url: BASE_URL + ENDPOINT.CHECKLIST_ID_V1(id), body: mappedChecklist });
return response;
};
diff --git a/frontend/src/apis/fetcher.ts b/frontend/src/apis/fetcher.ts
index 4cde556e8..48cf4bca7 100644
--- a/frontend/src/apis/fetcher.ts
+++ b/frontend/src/apis/fetcher.ts
@@ -1,3 +1,5 @@
+import { captureException } from '@sentry/react';
+
import APIError from '@/apis/error/APIError';
import { deleteToken, postReissueAccessToken } from '@/apis/user';
import { API_ERROR_MESSAGE } from '@/constants/messages/apiErrorMessage';
@@ -38,7 +40,9 @@ const handleError = async (response: Response, requestProps: RequestProps) => {
return handleUnauthorizedError(response, requestProps, errorCode);
}
- throw new APIError(response.status, errorCode);
+ const apiError = new APIError(response.status, errorCode);
+ captureException(apiError);
+ throw apiError;
};
const handleUnauthorizedError = async (response: Response, requestProps: RequestProps, errorCode: string) => {
diff --git a/frontend/src/apis/url.ts b/frontend/src/apis/url.ts
index 2108f462a..6b56d34db 100644
--- a/frontend/src/apis/url.ts
+++ b/frontend/src/apis/url.ts
@@ -7,6 +7,7 @@ export const ENDPOINT = {
// checklist
CHECKLISTS: '/checklists',
CHECKLISTS_LIKE: '/checklists/like',
+ CHECKLISTS_LIKE_V1: '/v1/checklists/like',
CHECKLISTS_V1: '/v1/checklists',
CHECKLIST_QUESTION: '/checklists/questions',
CHECKLIST_ALL_QUESTION: '/custom-checklist/all',
diff --git a/frontend/src/assets/assets.tsx b/frontend/src/assets/assets.tsx
index b842e2bc5..60cdffe81 100644
--- a/frontend/src/assets/assets.tsx
+++ b/frontend/src/assets/assets.tsx
@@ -16,7 +16,6 @@ import Retry from '@/assets/icons/common/retry.svg';
import SmallCheck from '@/assets/icons/common/small-check.svg';
import PlusBlack from '@/assets/icons/plusMinus/plus-black.svg';
import PlusWhite from '@/assets/icons/plusMinus/plus-white.svg';
-
// room
import Building from '@/assets/icons/room/building.svg';
import Calendar from '@/assets/icons/room/calendar.svg';
diff --git a/frontend/src/assets/icons/kakao/kakao-logo.svg b/frontend/src/assets/icons/kakao/kakao-logo.svg
index d67677e39..a2a684a24 100644
--- a/frontend/src/assets/icons/kakao/kakao-logo.svg
+++ b/frontend/src/assets/icons/kakao/kakao-logo.svg
@@ -1,3 +1,3 @@
-