Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] swagger바탕으로 api작성과 네비게이션바 동작하게 변경 그리고 로그인 상태 저장 로그인 상태에 따라 네비게이션 따로 보여주기 #137

Merged
merged 53 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
50f751e
[#136]feat: Home Visualizatoin으로 컴포넌트 이름 변경
seroak Sep 3, 2024
2033aa6
[#136]feat: 로그인 회원가입 api 설정
seroak Sep 3, 2024
044c87c
[#136]feat: set-cookie 라이브러리하고 jose 라이브러리 설치
seroak Sep 4, 2024
f23dc00
[#136]feat: 새로고침하면 날라가는 정보 백엔드로 부터 불러오기
seroak Sep 4, 2024
37e759f
[#136]feat: 로그인과 새로고침하면 불러오는 msw코드 작성
seroak Sep 4, 2024
b9bdda8
[#136]feat: logout 버튼 css 변경
seroak Sep 4, 2024
ca7861c
[#136]feat: 로그인 할때 사용자 이름 띄어주고 로그아웃 기능 구현
seroak Sep 4, 2024
f800290
[#136]feat: 버튼 작동되게 변경
seroak Sep 4, 2024
c255055
[#136]feat: 메인 페이지 임시로 구현
seroak Sep 4, 2024
9d74980
[#136]feat: login 페이지 기능 구현
seroak Sep 4, 2024
d896416
[#136]feat: 점검 로직 가독성있게 변경
seroak Sep 4, 2024
dbc7d65
[#136]feat: 헤더 로그인 상태에 따라 변경되게 변경
seroak Sep 4, 2024
40b7536
[#136]feat: 사용자의 상태를 저장하는 zustand 설정
seroak Sep 4, 2024
e107925
[#136]feat: msw signup 주소 변경
seroak Sep 5, 2024
90c45bb
[#136]feat: 회원가입 성공시 로그인 페이지로 이동
seroak Sep 5, 2024
07c99d2
[#136]feat: reactRouter 테스트 가능하게 변경
seroak Sep 5, 2024
87d47a3
[#136]feat: 로컬 호스트 8083으로 변경
seroak Sep 5, 2024
f30509c
[#138]feat: 정적파일 다운
seroak Sep 5, 2024
351246c
[#138]feat: 설정페이지 로고 부분 css 설정
seroak Sep 6, 2024
2a7a60d
[#136]feat: 새로고침시 get요청
seroak Sep 6, 2024
4e8420f
[#138]feat: div root body하고 일치
seroak Sep 6, 2024
ab210f0
[#138]feat: 파일이 변하면 변한 css
seroak Sep 6, 2024
b33ca96
[#138]feat: a테그 span 테그로 변경
seroak Sep 6, 2024
b94c204
[#138]feat: 로그인 api 수정
seroak Sep 6, 2024
d4839bf
[#138]feat: 설정 페이지 작업
seroak Sep 6, 2024
6db9391
[#138]feat: 설정 api주소 변경
seroak Sep 6, 2024
f13824f
[#138]feat: 시각화 api 수정
seroak Sep 6, 2024
24dd32e
[#138]feat: rightSection.css 삭제
seroak Sep 6, 2024
64d32e0
[#138]feat: rightSection.css 삭제
seroak Sep 6, 2024
e96cc3e
[#138]feat: 회원 상태관리 수정
seroak Sep 6, 2024
25c6d00
[#138]feat: msw수정 코드
seroak Sep 6, 2024
2dfb087
[#138]feat: 로컬 api로 변경
seroak Sep 6, 2024
a666c72
[#138]feat: console.log 제거
seroak Sep 6, 2024
0783ba6
[#140]feat: 설정 반응형 디자인
seroak Sep 7, 2024
ea9d513
[#140]feat: 그룹페이지 라우팅
seroak Sep 7, 2024
c379ff5
[#140]feat: 전역 css
seroak Sep 7, 2024
ca50f5b
[#140]feat: 그룹 페이지
seroak Sep 7, 2024
8ab9a96
[#140]feat: 방 컴포넌트
seroak Sep 7, 2024
ee70d4c
[#140]feat: css 이름 변경
seroak Sep 7, 2024
c364f9c
[#140]feat: css 변경
seroak Sep 7, 2024
44f0744
[#142]feat: 과제 페이지 라우팅
seroak Sep 9, 2024
7b391b8
[#142]feat: 과제페이지
seroak Sep 9, 2024
cdaa5cd
[#144]feat: 진척도 페이지 라우팅
seroak Sep 9, 2024
17b5e21
[#144]feat: 진척도 페이지
seroak Sep 9, 2024
ccd6af9
[#144]feat: 헤더와 페이지 연결
seroak Sep 9, 2024
97cfa2e
[#144]feat: build가능하게 변경
seroak Sep 9, 2024
8210cbd
Merge branch 'develop' of https://github.com/Co-due/Front into featur…
seroak Sep 10, 2024
c26c995
[#144]feat: 깃허브 액션 수정
seroak Sep 10, 2024
084f092
Merge pull request #145 from edu-pi/feature/issue144
seroak Sep 10, 2024
7ddb60b
Merge pull request #143 from edu-pi/feature/issue142
seroak Sep 10, 2024
1955eba
Merge pull request #141 from edu-pi/feature/issue140
seroak Sep 10, 2024
4ed45f4
Merge pull request #139 from edu-pi/feature/issue138
seroak Sep 10, 2024
73e6d50
[#136]feat: alert 메시지 변경
seroak Sep 10, 2024
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
8 changes: 4 additions & 4 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ on:
- master
jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 16.x ]
node-version: [20.x]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Create env file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
import { ReactNode } from "react";
import { render, screen } from "@testing-library/react";
import "@testing-library/jest-dom";
import { renderingCodeFlow } from "@/pages/Home/components/RightSection/renderingCodeFlow.tsx";
import { ForItem } from "@/pages/Home/types/forItem";
import { renderingCodeFlow } from "@/pages/Visualization/components/RightSection/renderingCodeFlow";
import { ForItem } from "@/pages/Visualization/types/codeFlow/forItem";
type Props = {
children: ReactNode;
forItem: ForItem;
};
// ForBox 컴포넌트 모킹
// ForBox의 실제 경로에서 forItem과 children인자만 가지고와서 사용한다
jest.mock("@/pages/Home/components/RightSection/components/ForBox/ForBox", () => ({ forItem, children }: Props) => (
// 실제 ForBox의 컴포넌트를 가지고 오는 것이 아닌 가짜로 만들어서 사용
<div data-testid="for-box">
For Box: {forItem.id}
<div data-testid="for-children">{children}</div>
</div>
));
jest.mock(
"@/pages/Visualization/components/RightSection/components/ForBox/ForBox",
() =>
({ forItem, children }: Props) =>
(
// 실제 ForBox의 컴포넌트를 가지고 오는 것이 아닌 가짜로 만들어서 사용
<div data-testid="for-box">
For Box: {forItem.id}
<div data-testid="for-children">{children}</div>
</div>
)
);

describe("renderingCodeFlow 함수", () => {
it("forBox 컴포넌트 하나만 출력하는 테스트", () => {
Expand Down
10 changes: 7 additions & 3 deletions __tests__/pages/home/homeUnitTest.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@ import React from "react";
import { render, screen, fireEvent, waitFor } from "@testing-library/react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import forPrintMockData from "./samples/successForAndPrintResponseBody.json";
import Home from "../../../src/pages/Home/Home";

import Home from "../../../src/pages/Visualization/Visualization";
import { MemoryRouter } from "react-router-dom";
// 브라우저API 모킹
(window as any).fetch = jest.fn();
window.alert = jest.fn();

// reactQuery를 사용하는 컴포넌트를 테스트하기 위해 컴포넌트를 렌더링 하는 함수
const renderWithQueryClient = (component: React.ReactElement) => {
const queryClient = new QueryClient();
return render(<QueryClientProvider client={queryClient}>{component}</QueryClientProvider>);
return render(
<MemoryRouter>
<QueryClientProvider client={queryClient}>{component}</QueryClientProvider>
</MemoryRouter>
);
};

describe("백엔드로 부터 Object 외에 다른 response body(code) 를 받았을 때", () => {
Expand Down
80 changes: 73 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"framer-motion": "^11.2.12",
"lodash": "^4.17.21",
"react": "^18.2.0",
"react-cookie": "^7.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.23.1",
"react-split": "^2.0.14",
Expand Down Expand Up @@ -50,6 +51,7 @@
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-fetch-mock": "^3.0.3",
"jose": "^5.8.0",
"msw": "^2.3.1",
"ts-jest": "^29.2.4",
"ts-node": "^10.9.2",
Expand Down
3 changes: 3 additions & 0 deletions public/image/icon_copy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/image/icon_delete.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/image/icon_group.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/image/icon_left_arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/image/icon_link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/image/icon_right_arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/image/icon_right_arrow2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/image/icon_search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/image/img_copywriting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/image/img_data02_nodata.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/image/img_data02_test01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/image/img_data02_test02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/image/img_data02_test03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/image/img_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/image/img_logo2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions public/image/progress01.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/image/progress02.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading