-
Notifications
You must be signed in to change notification settings - Fork 6
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] playwright E2E 테스트 적용: basic setting #61
Conversation
✅ Deploy Preview for caucse ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
e2e테스트 세팅 고생하셨습니다!! 코멘트에 의견만 주시고 바로 머지해도 될 것 같아요
/* Run tests in files in parallel */ | ||
fullyParallel: true, | ||
/* Fail the build on CI if you accidentally left test.only in the source code. */ | ||
forbidOnly: !!process.env.CI, |
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.
여기서는 환경변수 잘 불러와지나요?
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.
저런 식으로 빌드인 값들은 가능한 것 같더라고요. 근데 test 코드 돌리는 컴파일에서는 환경변수가 사용이 안됩니다. 길게 붙잡고 있었는데도 안되더라고요 ㅠㅠ
await page.click( | ||
'#root > div > main > div > div.css-1nqe5pb-Wrapper.egppv972 > a.css-xetqcl-ClearLink.ec7tn3u2 > div.css-1fukgrq-Circle.egppv971', | ||
); | ||
await page.waitForURL(baseURL + PAGE_URL.Locker); |
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.
테스트 코드니까 해당 화면에서 보여지는 것을 검증하는 expect 문이 있으면 좋을 것 같아요
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.
어떠신가요??
근데 초반 틀을 이렇게 잡고 제 것도 추가한다음 나중에 개선하는 것도 괜찮은 것 같아요
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.
추가할까 했는데, await page.waitForURL(baseURL + PAGE_URL.Locker); 파트 자체가 사실 expect랑 동일한 역활을 하기는 합니다. 그래도 어느 정도의 검증이 필요할 것 같으니까 내일 중으로 조금 더 세밀하게 만들어 보겠습니다.
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.
저도 비슷한 생각이긴한데 await page.waitForURL(baseURL + PAGE_URL.Locker);
자체는 페이지 이동 완료하면 성공하는 것 같아서 그 페이지에 뜨는 데이터를 검증하는 것도 괜찮아 보이네요
근데 이번 이슈에선 merge 하고 다음 이슈에서 개선하는 방향이 좋을 것 같아요!
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.
넵 알겠습니다! 내일 오전 중으로 본 PR 처리할게요!
await page.getByText('개인정보 관리').click(); | ||
await page.waitForURL(baseURL + PAGE_URL.SettingProfile); | ||
await page.click(settingBackButton); | ||
await page.waitForURL(baseURL + PAGE_URL.Setting); |
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.
여기도 위와 같이 expect가 추가되면 좋을 것 같아요!
|
||
test.beforeEach(signinTester); | ||
test('setting', settingRouterTester); | ||
test('locker', lockerRouterTester); |
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.
이렇게 분리가 되네요 코드 분리 완전깔끔 👍👍
.github/workflows/playwright.yml
Outdated
push: | ||
branches: [ main, master ] | ||
pull_request: | ||
branches: [ main, master ] |
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.
기본 세팅같은데 master는 지워도 되겠네요!
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.
한번 지워볼게요!
🚩 관련 이슈
resolve #59
📋 PR Checklist
📌 유의사항
✅ 테스트 결과
1.mp4