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: when pr, e2e test github actions ci #487

Merged
merged 6 commits into from
Sep 22, 2023

Conversation

2taesung
Copy link
Contributor

@2taesung 2taesung commented Sep 19, 2023

Related issue

#402

Result

image

Work list

  • view e2e test github actions CI(yml 파일)
  • 기존 home.spec.ts failed 부분 제거

Discussion

  • e2e test를 통과하지 못할 경우 merge 제한 등과 같은 정책 고민 필요

@2taesung 2taesung requested review from a team as code owners September 19, 2023 12:02
Copy link
Contributor

@ss-won ss-won left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 입니다~

Copy link
Contributor

@KyuTae98 KyuTae98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e2e 좋습니다!!!

Copy link
Contributor

@ytaek ytaek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -8,17 +8,4 @@ test.describe("home", () => {
test("has title", async ({ page }) => {
await expect(page).toHaveTitle(/Githru/);
});

test("check BranchSelector", async ({ page }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요건 왜 지워졌나용?

Copy link
Contributor Author

@2taesung 2taesung Sep 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

일주일 전 소원님이 작업하신 내용과 충돌이 발생했는데
해당 테스트 코드의 목적과 완전 달라져 삭제했습니다.

  • 기존
    하드코딩으로
const branchList = ['dev', 'feat', 'edit'];
  • 변경(현재)
    동적으로 전체 commit들의 branch 종류들을 가져와 branchList에 할당.

그래서 동적으로 데이터를 가져오기 때문에 실제 e2e test에서 결과를 정적으로 체크함에 어려움이 있었습니다. 해결책으로 모킹을 여러 방면으로 고민해봤으나 e2e test에서 함수나 컴포넌트를 모킹하는 방식은 옳은 방법이 아닌 것 같아. 방법에 더 고민이 필요해 제거했습니다!

만약 CI가 이미 있었다면 소원님이 작업하시면서 해당 내용이 failed가 떠서 당시에 바로 의논해볼 수 있었을 것 같아. 'CI가 필요했었구나!' 라는 생각이 추가로 들었습니다! 참고로 소원님이 작업해주신 방향이 맞다고 생각하고 그에 맞게 대응할 수 있는 테스트를 고민해봐야할 것 같습니다!!

Comment on lines +19 to +20
- name: Setup Playwright
uses: microsoft/playwright-github-action@v1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@2taesung 2taesung merged commit 196d9ef into githru:main Sep 22, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants