Skip to content

Commit

Permalink
feat: Update homepage link to result page
Browse files Browse the repository at this point in the history
  • Loading branch information
seonghunYang committed May 29, 2024
1 parent 63ea41a commit d100349
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/(sub-page)/my/components/my-result-container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function MyResultContainer() {
<UserCreditResult />
</Suspense>
<div className="flex justify-center">
<Link href="/result">
<Link data-cy="result-page-link" href="/result">
<Button label="수강현황 자세히 보기" variant="primary" size="xs" />
</Link>
</div>
Expand Down
12 changes: 7 additions & 5 deletions cypress/e2e/home_page.cy.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
describe('The Home Page', () => {
it('successfully loads', () => {
// cy.visit('/')

it('a', () => {
cy.login('admin', 'admin');
cy.visit('/my');
// 마이페이지 → 결과페이지
cy.dataCy('result-page-link').click();
});

it('critical path', () => {
// 1. 메인 -> 로그인 -> 마이 페이지
cy.login('admin', 'admin');
// 2. 마이 페이지 -> 결과 페이지

cy.login('admin', 'admin');
cy.visit('/my');
// 마이페이지 → 결과페이지
cy.dataCy('result-page-link').click();

// 1
});
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules", "cypress"]
"exclude": ["node_modules"]
}

0 comments on commit d100349

Please sign in to comment.