-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor: Test Code 생성 #11
Conversation
const startText = | ||
"const { chromium } = require('playwright');\n(async() => { \n try { \n"; | ||
const endText = | ||
"\n await browser.close(); } catch (error) { \n console.error(error); } \n})();"; |
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.
넵 용섭님 이 부분 issue 생성하겠습니다! #12
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.
클라이언트측에서 담당했던 부분을 서버측에서 처리하도록 해주셨네요! 생성되는 playwright 코드를 서버에서 모두 확인할 수 있어 가독성이 높아진 것 같아요!
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.
이번 코드 작업도 수고 많으셨습니다!
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.
Wit AI가 더 정확하게 자연어를 처리할 수 있도록 띄어쓰기까지 꼼꼼하게 정리하려 해주신 것 같아요! 그런데 block의 parameter를 비교해 매핑이 이루어지므로 서버측과 클라이언트 측의 코드가 일관되게 수정되었는지 확인이 필요해보입니다!
서버측과 클라이언트 측에서 나누어 처리하던 Test Code를 생성하는 로직을 서버측에서 한번에 처리하도록 개선해주셨네요! 수고하셨습니다!
const startText = | ||
"const { chromium } = require('playwright');\n(async() => { \n try { \n"; | ||
const endText = | ||
"\n await browser.close(); } catch (error) { \n console.error(error); } \n})();"; |
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.
클라이언트측에서 담당했던 부분을 서버측에서 처리하도록 해주셨네요! 생성되는 playwright 코드를 서버에서 모두 확인할 수 있어 가독성이 높아진 것 같아요!
}; | ||
|
||
const formatNaturalLanguage = (blocks) => { | ||
return blocks.reduce( | ||
(blockContent, block) => { | ||
if (block.parameter === "id (#)") { | ||
if (block.parameter === "id(#)") { |
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.
이 수정사항 때문에 코드 생성에 오류가 발생하는 것 같습니다! UI와 데이터베이스를 확인해보면 block의 parameter가 "id (#)"로 되어있는데, 모두 띄어쓰기를 없애거나 모두 띄어쓰기를 해서 일관되게 작성할 필요가 있어보입니다!
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 Code 생성 (서버)
내용
Test Code를 생성했을 때, 완성된 코드를 서버에서 가공하여 클라이언트로 제공합니다.
항목
주의 사항
PR 전 체크리스트