-
Notifications
You must be signed in to change notification settings - Fork 18
[Playground] Component - button to display a given input #171 #236
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
[Playground] Component - button to display a given input #171 #236
Conversation
Test ResultsTests
|
Test Results✔️ Tests 35 / 35 - passed in 17.2s |
Test ResultsTests
|
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 을 로컬에서 테스트하려면 어떻게 하는지에 대한 인스트럭션을 PR 본문에 올려주세요.
그리고 그걸 바탕으로 GitHub Actions workflow 도 업데이트해야 할 거예요.
src/AzureOpenAIProxy.PlaygroundApp/Components/UI/DebugButtonComponent.razor
Outdated
Show resolved
Hide resolved
로컬에서 돌려보니 테스트 실패합니다~ |
카운터 페이지 말고 별도의 페이지를 하나 만들어서 거기서 Fluent UI 레이아웃을 적용해 보는 게 좋을 거예요. |
5c1eb63
to
f010810
Compare
코드 컨플릭 났습니다.
|
a91518e
to
c31cb09
Compare
c31cb09
to
ed1e262
Compare
별도의 /tests 페이지를 만들어 Playwright E2E 테스트 코드를 작성했습니다. 컴포넌트처럼 Tests 페이지에도 Fluent UI를 적용하려 했으나, Fluent UI의 RadioGroup 컴포넌트가 다양한 타입(double, DateTime 등)을 지원하지 않아서, 다양한 inputType(int, double, string)을 테스트하기 위해 Tests 페이지에는 Fluent UI를 사용하지 않았습니다. |
Playwright 테스트를 로컬에서 실행하는 방법에 대한 인스트럭션을 PR 본문에 추가했습니다.
|
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.
현재 브랜치의 코드베이스가 머지 컨플릭 처리하면서 꼬여있습니다. 최신 코드베이스로 새로 브랜치 딴 후에 본인의 변경사항만 보이게끔 수정해 보세요.
bUnit은 사용하지 않도록 하겠습니다. bUnit을 쓰게 되면 테스트 프로젝트가 플레이그라운드 프로젝트에 의존성이 생기는데 현재 이 부분에 문제가 있어서요.
플레이그라운드 테스트 코드에만 |
2385e0a
to
fa76d0f
Compare
bUnit 테스트를 삭제하고, Playwright 테스트만 유지한 상태로 다시 커밋했습니다.
Playwright 테스트용 /tests 페이지를 생성하고, 비어 있는 페이지에 테스트용 컴포넌트를 추가했습니다. 앞으로 다른 플레이그라운드 테스트 코드를 작성할 때, /tests 페이지에서 각 테스트에 개별적으로 접근할 수 있는 메뉴를 추가하는 것이 좋을까요? 아니면 모든 테스트 컴포넌트를 한 페이지에 배치하는 방식이 더 효율적일까요? |
현재 상태로 냅두셔도 됩니다. 이건 다른 사람들이 추가하는 컴포넌트 값을 확인하기 위한 테스트용 버튼이고 이 버튼 말고 자기들이 추가하는 컴포넌트와 버튼과 연결시켜서 해당 컴포넌트가 제대로 작동하는지 확인하는 용도기 때문에 궁극적으로는 없어질 컴포넌트입니다. |
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.
코멘트 남겼습니다.
src/AzureOpenAIProxy.PlaygroundApp/Components/Pages/Tests.razor
Outdated
Show resolved
Hide resolved
60ffafb
to
1b99f1a
Compare
코드에 대한 설명을 코멘트에 남겼습니다. 수정하거나 보완할 부분이 있는지 검토 부탁드립니다. |
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.
Fluent UI 컴포넌트로 바꿔보세요.
src/AzureOpenAIProxy.PlaygroundApp/Components/UI/DebugButtonComponent.razor
Outdated
Show resolved
Hide resolved
src/AzureOpenAIProxy.PlaygroundApp/Components/UI/TargetComponent.razor
Outdated
Show resolved
Hide resolved
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.
코멘트 남겨뒀습니다!
src/AzureOpenAIProxy.PlaygroundApp/Components/Layout/MainLayout.razor
Outdated
Show resolved
Hide resolved
src/AzureOpenAIProxy.PlaygroundApp/Components/UI/DebugButtonComponent.razor
Outdated
Show resolved
Hide resolved
src/AzureOpenAIProxy.PlaygroundApp/Components/UI/DebugTargetComponent.razor
Outdated
Show resolved
Hide resolved
test/AzureOpenAIProxy.PlaygroundApp.Tests/UI/DebugButtonComponentTests.cs
Show resolved
Hide resolved
test/AzureOpenAIProxy.PlaygroundApp.Tests/UI/DebugButtonComponentTests.cs
Outdated
Show resolved
Hide resolved
src/AzureOpenAIProxy.PlaygroundApp/Components/UI/DebugButtonComponent.razor
Outdated
Show resolved
Hide resolved
test/AzureOpenAIProxy.PlaygroundApp.Tests/Pages/TestsPageTests.cs
Outdated
Show resolved
Hide resolved
src/AzureOpenAIProxy.PlaygroundApp/Components/UI/DebugButtonComponent.razor
Show resolved
Hide resolved
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.
고생하셨습니다! LGTM!
Issue
#171
Description
버튼을 클릭하면 파라미터로 전달된 입력값을 화면에 표시하는 UI 컴포넌트를 구현했습니다.
Summary of Changes
DebugButtonComponent
Debug
버튼을 클릭하면 입력값이 우측 상단의 팝업 알림(Toast)에 출력됩니다.테스트 페이지
/tests
페이지를 추가했습니다.DebugButtonComponent
를 포함하고 있으며, 사용자가 선택한 값이Debug
버튼 클릭 시 화면에 표시되도록 구성했습니다.Playwright 테스트
How to Test
How to Run Playwright Tests Locally
다음 명령어는 로컬에서 모든 테스트(유닛 테스트 및 통합 테스트)를 한 번에 실행합니다.
이 스크립트는 애플리케이션을 빌드한 후, 먼저 유닛 테스트를 실행하고, 이어서 통합 테스트(Playwright 테스트 포함)를 실행합니다. 테스트가 모두 완료되면 실행 중인 애플리케이션을 자동으로 종료합니다.
Reference