-
Notifications
You must be signed in to change notification settings - Fork 1
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
Main page/#97 #99
Main page/#97 #99
Changes from all commits
1edfe47
44dd657
84a8541
62b2bae
7d6467f
6dea3b1
6da9b99
1b23713
8f79497
dd9ef9c
8ad10af
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,14 +22,12 @@ export default function RootLayout({ | |
href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard.css" | ||
rel="stylesheet" | ||
/> | ||
<link href="https://webfontworld.github.io/vitro/VitroCore.css" rel="stylesheet" /> | ||
</head> | ||
<body> | ||
<div className="bg-white"> | ||
<Provider> | ||
<MSWComponent> | ||
<NavigationBar /> | ||
{children} | ||
</MSWComponent> | ||
<MSWComponent>{children}</MSWComponent> | ||
</Provider> | ||
</div> | ||
<Toaster /> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,51 @@ | ||
import Image from 'next/image'; | ||
import mainBookBackground from '../public/assets/main-book-background.png'; | ||
import mainMyongjiLogo from '../public/assets/main-myongji-logo.png'; | ||
import graduationCap from '../public/assets/graduation-cap.png'; | ||
import Responsive from './ui/responsive'; | ||
import NavigationBar from './ui/view/molecule/navigation-bar'; | ||
import Button from './ui/view/atom/button/button'; | ||
import Link from 'next/link'; | ||
|
||
export default function Home() { | ||
export default function HomePage() { | ||
return ( | ||
<main className="flex min-h-screen flex-col items-center justify-between p-24"> | ||
<Link | ||
href="/dashboard" | ||
className="flex items-center gap-5 self-start rounded-lg bg-blue-500 px-6 py-3 text-sm font-medium text-white transition-colors hover:bg-blue-400 md:text-base" | ||
> | ||
<span>dashboard</span> | ||
</Link> | ||
</main> | ||
<div className="bg-primary w-[100vw] h-[100vh] overflow-hidden relative"> | ||
<NavigationBar /> | ||
<Responsive minWidth={768}> | ||
<Image src={mainBookBackground} alt="main-book-background" className="fixed right-0 w-[60%] z-0" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. width과 height를 지정하지않았는데 warning이 발생하지 않았나요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 넵 경고는 뜨지 않는데 혹시 문제가 될까요? |
||
</Responsive> | ||
<Image | ||
src={mainMyongjiLogo} | ||
alt="main-myongji-logo" | ||
width={120} | ||
height={120} | ||
className="absolute top-24 right-4" | ||
/> | ||
<div className="relative h-full flex flex-col items-center justify-center gap-6 z-1"> | ||
<p className="text-center flex flex-col gap-4"> | ||
<div className="relative"> | ||
<div className="z-2 text-3xl font-bold sm:text-7xl relative text-white" style={{ fontFamily: 'VitroCore' }}> | ||
<span className="text-etc-yellow" style={{ fontFamily: 'VitroCore' }}> | ||
졸 | ||
</span> | ||
업을 | ||
<span className="text-etc-yellow" style={{ fontFamily: 'VitroCore' }}> | ||
부 | ||
</span> | ||
탁해 | ||
</div> | ||
<Image | ||
src={graduationCap} | ||
alt="graduation-cap" | ||
className="absolute bottom-2 left-8 sm:bottom-10 sm:left-[-24px] sm:w-[52px] sm:h-[52px] w-[36px] h-[36px]" | ||
/> | ||
</div> | ||
<div className="text-md sm:text-lg text-gray-400 font-medium">명지인을 위한 간편 졸업요건 검사 사이트</div> | ||
</p> | ||
<Link href="/grade-upload"> | ||
<Button label="검사 시작" variant="dark" size="xl" /> | ||
</Link> | ||
</div> | ||
</div> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ type Story = StoryObj<typeof meta>; | |
|
||
export const AddSenario: Story = { | ||
play: async ({ step }) => { | ||
await step('사용자가 추가를 클릭하면 lecture search drawer 창이 띄워진다', async () => { | ||
await step('사용자가 과목 추가를 클릭하면 lecture search drawer 창이 띄워진다', async () => { | ||
const toggleLectureSearch = await screen.findByTestId('toggle-lecture-search'); | ||
await userEvent.click(toggleLectureSearch); | ||
|
||
|
@@ -67,14 +67,20 @@ export const AddSenario: Story = { | |
await delay(3000); | ||
expect(addButton[0]).toBeDisabled(); | ||
}); | ||
await step('drawer 외부 overlay를 클릭하면 drawer가 닫힌다', async () => { | ||
const drawerOverlay = await screen.findByTestId('drawer-overlay'); | ||
await userEvent.click(drawerOverlay); | ||
const toggleLectureSearch = await screen.findByTestId('toggle-lecture-search'); | ||
expect(toggleLectureSearch).toBeInTheDocument(); | ||
}); | ||
Comment on lines
+70
to
+75
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. decorator를 사용해서 play 전에 특정 로직을 실행시킬 수 있습니다! 그래서 decorator에 play 전에 drawer를 닫는 로직을 넣어봤습니다. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
}, | ||
}; | ||
|
||
export const SearchSenario: Story = { | ||
play: async ({ step }) => { | ||
await step('사용자가 추가를 클릭하면 lecture search drawer 창이 띄워진다', async () => { | ||
await step('사용자가 과목 추가를 클릭하면 lecture search drawer 창이 띄워진다', async () => { | ||
const toggleLectureSearch = await screen.findByTestId('toggle-lecture-search'); | ||
await userEvent.click(toggleLectureSearch); | ||
|
||
const lectureSearch = await screen.findByTestId('lecture-search'); | ||
expect(lectureSearch).toBeInTheDocument(); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<NavigationBar />
는 메인페이지에도 적용되어야하는 요소 같은데 (sub-page)의 layout으로 옮겨주신 이유가 무엇인가요?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main page에서는 전체 페이지를 감싸는 요소가 있는데 이 안에서 navigation bar가 존재해야 하기때문에 main page가 존재하지 않는 sub page의 layout으로 옮겨줬습니다!