Skip to content

Commit

Permalink
[Feature] - touroot v1.1.0 (#458)
Browse files Browse the repository at this point in the history
* [Feature] - e2e ํ…Œ์ŠคํŠธ ์ดˆ๊ธฐ ์„ค์ • ๋ฐ ์—ฌํ–‰ ๊ณ„ํš ๋“ฑ๋ก, ๋กœ๊ทธ์ธ, ๋ฉ”์ธ ํŽ˜์ด์ง€ e2e ํ…Œ์ŠคํŠธ ๊ตฌํ˜„ (#412)

* chore: cypress & eslint-plugin-cypress ์˜์กด์„ฑ ์„ค์น˜

* chore: eslint-plugin-cypress ์„ค์ • ์ถ”๊ฐ€

* chore: cypress ์‚ฌ์ „ ์„ธํŒ… ์ถ”๊ฐ€

1. baseUrl ๋ฐ viewport ์„ค์ • ์ถ”๊ฐ€

2. root tsconfig.json ๋‚ด exclude ์˜ต์…˜์— cypress ์ถ”๊ฐ€(__tests__ ๋‚ด ํ…Œ์ŠคํŠธ๋“ค type ๋ณด์žฅ์„ ์œ„ํ•ด)

3. cypress ๊ด€๋ จ declaration ์„ค์ • ์ถ”๊ฐ€

4. cypress ๋‚ด๋ถ€ tsconfig.json ์ถ”๊ฐ€

5. e2e.ts ์ถ”๊ฐ€

* feat: ์—ฌํ–‰ ๊ณ„ํš ๋“ฑ๋ก ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ๊ตฌํ˜„

* feat: ์นด์นด์˜ค ๋กœ๊ทธ์ธ ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ๊ตฌํ˜„

* feat: ๋ฉ”์ธ ํŽ˜์ด์ง€ ํ…Œ์ŠคํŠธ ์ฝ”๋“œ ๊ตฌํ˜„

* refactor(travelPlanRegister): path alias ์ ์šฉ

* chore: ci e2e ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€

* fix: ci ์Šคํฌ๋ฆฝํŠธ ์ˆ˜์ •

ci ์Šคํฌ๋ฆฝํŠธ์—์„œ e2e ํ…Œ์ŠคํŠธ ์ œ๊ฑฐ(๋กœ์ปฌ ํ™˜๊ฒฝ๊ณผ ci ํ™˜๊ฒฝ์—์„œ์˜ ํ…Œ์ŠคํŠธ ์ฐจ์ด๋กœ ์ธํ•ด ์ผ๋‹จ ๋ณด๋ฅ˜)

* [Feature] - ์—ฌํ–‰ ๊ณ„ํš ๋“ฑ๋ก ํŽ˜์ด์ง€ ๋ฆฌํŒฉํ„ฐ๋ง (#414)

* refactor: ์—ฌํ–‰ ๊ณ„ํš ๋“ฑ๋ก ํŽ˜์ด์ง€ ๋‚ด ์ƒํƒœ ์ •๋ฆฌ

form, ui, server, authorization, router ์ƒํƒœ์— ๋งž๊ฒŒ ์ •๋ฆฌ

* chore: immer, use-immer ์˜์กด์„ฑ ์ถ”๊ฐ€

* refactor(useTravelPlanDays): use-immer๋ฅผ ํ™œ์šฉํ•˜์—ฌ ์ฝ”๋“œ ๋ฆฌํŒฉํ„ฐ๋ง

* refactor(useTravelPlanDays): travelPlanDays์— ๊ฒŒ์œผ๋ฅธ ์ดˆ๊ธฐํ™” ์ ์šฉ

* refactor(useTravelPlanDays): ์žฅ์†Œ ๋‚ด todo ์ถ”๊ฐ€ ์‹œ ๊ธฐ์กด todos์— ์ถ”๊ฐ€๋งŒ ํ•˜๋„๋ก ๋ณ€๊ฒฝ

1. ์—ฌํ–‰ ๋ณ€ํ™˜, ์ˆ˜์ •, ์ถ”๊ฐ€ ๋ชจ๋‘ todos๊ฐ€ ์กด์žฌํ•˜๊ธฐ ๋•Œ๋ฌธ์— todos ํ•„๋“œ ์—ฌ๋ถ€๋ฅผ ํ™•์ธํ•˜์ง€ ์•Š์•„๋„ ๋˜์–ด ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ณ€๊ฒฝ

* fix: ํฐํŠธ import path ์ˆ˜์ • (#429)

* [Feature] - kakao bundle lazy loading ์ ์šฉ (#430)

* refactor(index.html): ์นด์นด์˜ค sdk script body ํƒœ๊ทธ๋กœ ์ด๋™

* fix: kakao sdk defer ์ œ์™ธ

defer ์ถ”๊ฐ€๋กœ ์ธํ•ด ์นด์นด์˜ค ๋กœ๊ทธ์ธ ๋ฒ„ํŠผ์„ ๋ˆ„๋ฅผ ์‹œ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์—ฌ ์ œ๊ฑฐ

* [Feature] - ๋ฐ๋ชจ๋ฐ์ด ํ”ผ๋“œ๋ฐฑ ๋ฐ˜์˜(์ง€๋‹ˆ) (#418)

* refactor(GoogleMapView): ์ฝ”๋“œ ๋ฆฌํŒฉํ„ฐ๋ง

* chore(package.json): test-e2e:run ์Šคํฌ๋ฆฝํŠธ ์ˆ˜์ •

chrome์ด ๊ธฐ๋ณธ ๋ธŒ๋ผ์šฐ์ €๋กœ ํ…Œ์ŠคํŠธ ๋˜๋„๋ก ์ˆ˜์ •

* test(travelPlanRegister): force click์œผ๋กœ ๋ณ€๊ฒฝ

* fix(useTravelPlanDays): todo๊ฐ€ ์ œ๋Œ€๋กœ ์‚ญ์ œ๋˜์ง€ ์•Š๋Š” ๋ฌธ์ œ ํ•ด๊ฒฐ

* fix(Input): ๋ชจ๋ฐ”์ผ ํ™”๋ฉด์—์„œ ํ™•๋Œ€๋˜๋Š” ํ˜„์ƒ ํ•ด๊ฒฐ

Input font-size๋ฅผ 16px๋กœ ๋ณ€๊ฒฝ

* refactor(Calendar): ์บ˜๋ฆฐ๋” ui์—์„œ ์ง€๋‚œ ๋‚ ์งœ์— ๋Œ€ํ•œ ๋ณ„๋„ ์ฒ˜๋ฆฌ ์ถ”๊ฐ€

์ด์ „ or ๋‹ค์Œ ๋‹ฌ์— ๋Œ€ํ•œ ๋‚ ์งœ๋ฅผ ์ œ๊ณตํ•˜์ง€ ์•Š๊ณ  ์˜ค๋Š˜ ๊ธฐ์ค€ ์ด์ „ ๋‚ ์งœ์— ๋Œ€ํ•ด gray text ์ฒ˜๋ฆฌ ๋ฐ disable ์ฒ˜๋ฆฌ ํ•˜๋„๋ก ๋ณ€๊ฒฝ

* refactor(GoogleMapView): ๋ถˆํ•„์š”ํ•œ console ์ œ๊ฑฐ

* test(travelPlanRegister): ๋ถˆํ•„์š”ํ•œ only ์ œ๊ฑฐ

* [Feature] - webpack ์บ์‹œ ๋ฒ„์ŠคํŒ… ์„ค์ • (#447)

* refactor(webpack): ์บ์‹œ ๋ฒ„์ŠคํŒ… ์ ์šฉ

๋นŒ๋“œ ํ•  ๋•Œ๋งˆ๋‹ค ๋ฒˆ๋“ค ํŒŒ์ผ ์ด๋ฆ„์„ ๋ณ€๊ฒฝ ์‹œ์ผœ ์บ์‹œ ๋ฌดํšจํ™” ์‹œํ‚ค๋„๋ก ๋ณ€๊ฒฝ

* refactor(webpack): chunkFilename ์ œ๊ฑฐ

* refactor(webpack): asset๋“ค์— ๋Œ€ํ•œ ํŒŒ์ผ ๊ฒฝ๋กœ ๋ฐ ํ•ด์‹œ ๊ฐ’ ์„ค์ • ๋ณ€๊ฒฝ

1. assets ๋‚ด ์œ„์น˜ ์‹œํ‚ค๋„๋ก ๋ณ€๊ฒฝ

2. hash๋ฅผ contenthash๋กœ ์ง€์ •ํ•˜์—ฌ ํŒŒ์ผ์ด ๋ณ€๊ฒฝ๋  ๋•Œ๋งŒ hash ๊ฐ’์ด ๋ณ€๊ฒฝ๋˜๋„๋ก ์ง€์ •

* [Feature] - ์ฝ”๋“œ ์Šคํ”Œ๋ฆฌํŒ… ์„ค์ • (#450)

* chore: webpack-bundle-analyzer ์˜์กด์„ฑ ์ถ”๊ฐ€

* refactor: ์ฝ”๋“œ ์Šคํ”Œ๋ฆฌํŒ… ์ ์šฉ

* refactor: ์ฝ”๋“œ ์Šคํ”Œ๋ฆฌํŒ… ํ•„์š”ํ•œ ๋ถ€๋ถ„๋งŒ ์ ์šฉํ•˜๋Š” ๊ฒƒ์œผ๋กœ ๋ณ€๊ฒฝ

์Šค์ผˆ๋ ˆํ†ค์ด ์—†๋Š” ํŽ˜์ด์ง€์ธ ๊ฒ€์ƒ‰ ์‹œ์ž‘ ํŽ˜์ด์ง€, ์—ฌํ–‰๊ธฐ & ์—ฌํ–‰ ๊ณ„ํš ์ˆ˜์ •/๋“ฑ๋ก ํŽ˜์ด์ง€๋งŒ ์ ์šฉํ•˜๋Š” ๊ฒƒ์œผ๋กœ ๋ณ€๊ฒฝ

* refactor: BundleAnalyzerPlugin ์ฃผ์„ ์ถ”๊ฐ€

* [Feature] - ์—ฌํ–‰ ๊ณ„ํš ์ƒ์„ธ ํŽ˜์ด์ง€ ์„ฑ๋Šฅ ์ตœ์ ํ™” (#453)

* refactor(GoogleMapLoadScript): LoadScript ์‚ฌ์šฉ ๋Œ€์‹  useJsApiLoader๋กœ ๋ณ€๊ฒฝ

* refactor(index.html): google map์— ๋Œ€ํ•œ preconnect ๋ฐ dns-prefetch ์˜ต์…˜ ๊ด€๋ จ link ํƒœ๊ทธ ์ถ”๊ฐ€

* refactor: ๋ถˆํ•„์š”ํ•œ ๋นˆ๋ฌธ์ž์—ด ์ œ๊ฑฐ

* [Feature] - Layout Shift ๊ฐœ์„  (#454)

* refactor(AccordionRoot): gap ๊ฐ’ ์ˆ˜์ •

* refactor(TravelogueRegisterPage): layout shift ๋ฌธ์ œ ํ•ด๊ฒฐ

* refactor(TravelogueEditPage): layout shift ๋ฌธ์ œ ํ•ด๊ฒฐ

* refactor(TravelPlanRegisterPage): layout shift ๋ฌธ์ œ ํ•ด๊ฒฐ

* refactor(TravelPlanEditPage): layout shift ๋ฌธ์ œ ํ•ด๊ฒฐ

* refactor(Input): count ์žˆ๋Š” ๊ฒฝ์šฐ ๋ฏธ๋ฆฌ ๊ณต๊ฐ„ ์ฐจ์ง€ํ•˜๋„๋ก ์ˆ˜์ •

* refactor(Input): input ๋‚ด๋ถ€์— ์žˆ๋˜ characterCount ๋ถ„๋ฆฌ

* test(Input): input ์†์„ฑ ๋ณ€๊ฒฝ์— ๋”ฐ๋ฅธ storybook ์†์„ฑ ์ˆ˜์ •

* [Feature] - ์ด๋ฏธ์ง€ ์ตœ์ ํ™” (#455)

* feat(resizeAndConvertImage): ์ด๋ฏธ์ง€ ๋ฆฌ์‚ฌ์ด์ฆˆ,ํฌ๋งท ๋ณ€ํ™˜ ํ•ด์ฃผ๋Š” util ํ•จ์ˆ˜ ๊ตฌํ˜„

* feat(TravelogueRegisterPage): ์ธ๋„ค์ผ ์ด๋ฏธ์ง€ ์—…๋กœ๋“œ์‹œ ๋ฆฌ์‚ฌ์ด์ฆˆ ๋ฐ ๋ณ€ํ™˜ํ•˜๋„๋ก ์ˆ˜์ •

* feat(useMultiImageUpload): ์—ฌํ–‰์žฅ์†Œ ์ด๋ฏธ์ง€ ์—…๋กœ๋“œ์‹œ ์ด๋ฏธ์ง€ ๋ฆฌ์‚ฌ์ด์ฆˆ ๋ฐ ๋ณ€ํ™˜ํ•˜๋„๋ก ์ˆ˜์ •

* refactor(resizeAndConvertImage):  2 depth if๋ฌธ ๊ฐœ์„ 

* refactor(resizeAndConvertImage): ํ•จ์ˆ˜ ์ฑ…์ž„ ๋ถ„๋ฆฌ

* v1.1.0

---------

Co-authored-by: simorimi <[email protected]>
Co-authored-by: choi river <[email protected]>
Co-authored-by: choi river <[email protected]>
Co-authored-by: simorimi <[email protected]>
Co-authored-by: simhorim <[email protected]>
  • Loading branch information
6 people authored Sep 26, 2024
1 parent ea18935 commit 44664c7
Show file tree
Hide file tree
Showing 60 changed files with 2,209 additions and 645 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/frontend-ci-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,20 @@ jobs:
- name: stylelint ์‹คํ–‰
run: yarn lint:styled

- name: ํ…Œ์ŠคํŠธ ์‹คํ–‰
- name: hook ํ…Œ์ŠคํŠธ ์‹คํ–‰
run: yarn test

- name: ํ…Œ์ŠคํŠธ ๊ฒฐ๊ณผ PR์— ์ฝ”๋ฉ˜ํŠธ ๋“ฑ๋ก
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: frontend/test-results/results.xml
files: |
frontend/test-results/results.xml
- name: ํ…Œ์ŠคํŠธ ์‹คํŒจ ์‹œ, ์‹คํŒจํ•œ ์ฝ”๋“œ ๋ผ์ธ์— Check ์ฝ”๋ฉ˜ํŠธ ๋“ฑ๋ก
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: frontend/test-results/results.xml
report_paths: |
frontend/test-results/results.xml
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
"plugin:compat/recommended",
"plugin:storybook/recommended",
"plugin:jest/recommended",
"plugin:cypress/recommended",
],
plugins: ["react-refresh", "prettier", "@typescript-eslint"],
ignorePatterns: ["dist", ".eslintrc.cjs"],
Expand Down
9 changes: 9 additions & 0 deletions frontend/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from "cypress";

export default defineConfig({
e2e: {
baseUrl: "http://localhost:3000",
viewportWidth: 480,
viewportHeight: 1000,
},
});
9 changes: 9 additions & 0 deletions frontend/cypress/cypress.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
declare namespace Cypress {
interface Chainable {
simulateKakaoLogin(): Chainable<Element>;
fillTravelPlanBasicInfo(title: string, date: number): Chainable<Element>;
addPlace(placeName: string): Chainable<Element>;
addTodo(todoText: string): Chainable<Element>;
submitTravelPlan(): Chainable<Element>;
}
}
5 changes: 5 additions & 0 deletions frontend/cypress/e2e/login.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe("์นด์นด์˜ค ๋กœ๊ทธ์ธ e2e ํ…Œ์ŠคํŠธ", () => {
it("์นด์นด์˜ค ๋กœ๊ทธ์ธ์ด ์™„๋ฃŒ๋˜๋ฉด ๋ฉ”์ธ ํŽ˜์ด์ง€๋กœ ์ด๋™๋œ๋‹ค.", () => {
cy.simulateKakaoLogin();
});
});
83 changes: 83 additions & 0 deletions frontend/cypress/e2e/mainPage.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import travelogueData from "@mocks/data/travelogue.json";

import { CYPRESS_SELECTOR_MAP } from "@constants/cypress";
import { ROUTE_PATHS_MAP } from "@constants/route";

describe("๋ฉ”์ธ ํŽ˜์ด์ง€ ํ…Œ์ŠคํŠธ", () => {
beforeEach(() => {
cy.intercept("GET", `${Cypress.env("BASE_URL")}travelogues*`, (req) => {
const page = (req.query.page === "0" ? 1 : req.query.page) as number;
const pageSize = 5;
const start = (page - 1) * pageSize;
const end = start + pageSize;

const paginatedData = travelogueData.slice(start, end);

req.reply({
statusCode: 200,
body: {
content: paginatedData,
},
});
}).as("getTravelogues");

cy.visit(ROUTE_PATHS_MAP.root);
});

describe("์—ฌํ–‰๊ธฐ ๋ฌดํ•œ ์Šคํฌ๋กค ํ…Œ์ŠคํŠธ", () => {
it("๋ฉ”์ธ ํŽ˜์ด์ง€๋กœ ์ง„์ž…ํ–ˆ์„๋•Œ ๋ณด์—ฌ์ง€๋Š” ์—ฌํ–‰๊ธฐ๋Š” ์ด 5๊ฐœ์ด๋‹ค.", () => {
// when
cy.wait("@getTravelogues").then(() => {
// then
cy.get(CYPRESS_SELECTOR_MAP.main.travelogueItem, { timeout: 10000 }).should(
"have.length",
5,
);
});
});

it("์Šคํฌ๋กค์„ ๋‚ด๋ฆด ๊ฒฝ์šฐ ๋ณด์—ฌ์ง€๋Š” ์—ฌํ–‰๊ธฐ๋Š” ์ด 10๊ฐœ์ด๋‹ค.", () => {
// when
cy.wait("@getTravelogues");
cy.scrollTo("bottom");
cy.wait("@getTravelogues");

// then
cy.get(CYPRESS_SELECTOR_MAP.main.travelogueItem).should("have.length", 10);
});
});

describe("ํƒœ๊ทธ ๊ด€๋ จ ํ…Œ์ŠคํŠธ", () => {
const SELECTED_CHIP_SELECTOR = '[data-cy="selected-chip"]';

it("ํƒœ๊ทธ ์„ ํƒ ๋ฐ ํ•ด์ œ๊ฐ€ ๊ฐ€๋Šฅํ•ด์•ผํ•œ๋‹ค.", () => {
// when
cy.contains("์—ฌ๋ฆ„").click();

// then
cy.get(SELECTED_CHIP_SELECTOR).should("have.length", 1);

// when
cy.contains("์—ฌ๋ฆ„").click();

// then
cy.get(SELECTED_CHIP_SELECTOR).should("have.length", 0);
});

it("์ตœ๋Œ€ ํƒœ๊ทธ ์„ ํƒ์€ 3๊ฐœ๊นŒ์ง€ ๊ฐ€๋Šฅํ•˜๋‹ค.", () => {
// when
cy.contains("์—ฌ๋ฆ„").click();
cy.contains("๊ฐ€์กฑ").click();
cy.contains("๋„๋ณด").click();

// then
cy.get(SELECTED_CHIP_SELECTOR).should("have.length", 3);

// when
cy.contains("๋ง›์ง‘").click();

// then
cy.get(SELECTED_CHIP_SELECTOR).should("have.length", 3);
});
});
});
Loading

0 comments on commit 44664c7

Please sign in to comment.