Conversation
- @lit/context 라이브러리 의존성 추가 - 카카오 맵 컨텍스트 생성을 위한 map-context.ts 파일 구현 - 컨텍스트 관련 인덱스 파일 생성
- 카카오 맵 생성 시 map-created 이벤트가 발생하는지 확인하는 테스트 케이스 구현 - component-index.html 파일에 스타일 추가 및 데이터 속성 수정
- 카카오 맵 컴포넌트를 위한 map.ts 파일 구현 - 맵 관련 속성과 이벤트 처리 로직 추가 - LatLng 및 Point 타입 정의 추가 - map-context.ts에 MapContext 타입 추가 - index.ts에서 맵 컴포넌트와 관련된 모듈 내보내기
… to .gitignore - package.json에 Cypress 테스트 스크립트 추가 - .gitignore에 스크린샷 디렉토리 추가
- 카카오 맵 컴포넌트의 다양한 이벤트(위치 이동, 줌, 클릭 등)에 대한 테스트 케이스 추가 - 드래그 가능 및 줌 가능 속성에 대한 테스트 구현 - 맵 타입 ID 속성 처리 테스트 추가
- mapTypeId 속성을 문자열에서 숫자로 변경하고, 속성 변환 로직 추가 - kakao.maps.MapTypeId에 대한 변환 기능 구현
There was a problem hiding this comment.
Pull Request Overview
This PR resolves issue #8 by adding comprehensive Cypress tests for the Kakao map component and updating context and export modules accordingly.
- Added Cypress tests to verify event handling (map-created, click, dragging, zoom, etc.) in the Kakao map component.
- Introduced a map context via lit's createContext.
- Updated package export indices to include the new map components and context.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/kakao-map-components/cypress/src/components/map/map.component.ts | Added event-based Cypress tests for the Kakao map component. |
| packages/kakao-map-components/src/context/map-context.ts | Added a new context for the Kakao map using lit's createContext. |
| packages/kakao-map-components/src/context/index.ts | Exported the new map context. |
| packages/kakao-map-components/src/components/map/index.ts | Exported the Kakao map component. |
| packages/kakao-map-components/src/index.ts | Updated index exports to include the map component. |
Comments suppressed due to low confidence (1)
packages/kakao-map-components/cypress/src/components/map/map.component.ts:7
- [nitpick] The test title 'should fires map-created event when map is created' contains a grammatical error. Consider changing it to 'should fire map-created event when map is created'.
7 + it('should fires map-created event when map is created', () => {
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨ |
will be fixed
will be fixed
It won't be fixed.
will be fixed |
- 카카오맵 컴포넌트에 에러 처리 메서드 추가 - KakaoMapError, KakaoMapAPIError, KakaoMapContainerError, KakaoMapOptionsError 클래스 구현 - LatLng 및 Point 타입을 확인하는 타입 가드 함수 추가 - 에러 발생 시 'kakao-map-error' 이벤트 전파 기능 추가
There was a problem hiding this comment.
Pull Request Overview
This PR resolves #8 by implementing a Kakao Map web component along with a shared map context and comprehensive tests for event handling and map controls.
- Introduces the KakaoMap web component with map controls and events.
- Adds a map context for component communication.
- Provides extensive component tests to verify proper event handling.
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/kakao-map-components/cypress/src/components/map/map.component.ts | Adds comprehensive tests covering various map events and properties. |
| packages/kakao-map-components/src/context/map-context.ts | Sets up a shared map context using Lit's createContext. |
| packages/kakao-map-components/src/types/errors.ts | Defines custom error types for handling KakaoMap errors. |
| packages/kakao-map-components/src/types/guards.ts | Implements type guards for LatLng and Point interfaces. |
| packages/kakao-map-components/src/context/index.ts | Exports map context for ease of use. |
| packages/kakao-map-components/src/components/map/index.ts | Exports the KakaoMap component. |
| packages/kakao-map-components/src/index.ts | Updates index exports to include the map component. |
| cy.get('@created').should('be.called'); | ||
| }); | ||
|
|
||
| it('should fires proper events when moving location', () => { |
There was a problem hiding this comment.
[nitpick] Change 'should fires' to 'should fire' in the test description for grammatical correctness.
| it('should fires proper events when moving location', () => { | |
| it('should fire proper events when moving location', () => { |
| cy.get('@idle').should('be.called'); | ||
| }); | ||
|
|
||
| it('should fires proper events when zooming map', () => { |
There was a problem hiding this comment.
[nitpick] Change 'should fires' to 'should fire' in the test description for grammatical correctness.
| it('should fires proper events when zooming map', () => { | |
| it('should fire proper events when zooming map', () => { |
| cy.get('@idle').should('be.called'); | ||
| }); | ||
|
|
||
| it('should fires proper events when clicking map', () => { |
There was a problem hiding this comment.
[nitpick] Change 'should fires' to 'should fire' in the test description for grammatical correctness.
| it('should fires proper events when clicking map', () => { | |
| it('should fire proper events when clicking map', () => { |
User description
Close #8
PR Type
Enhancement, Tests
Description
Implement kakao-map web component
Add map context for component communication
Include comprehensive event handling and map controls
Add extensive component tests
Changes walkthrough 📝
7 files
Implement Kakao Map web componentCreate map context for sharing map instanceExport map contextDefine LatLng type interfaceDefine Point type interfaceExport map componentAdd map component exports1 files
Add comprehensive map component tests1 files
Update test environment styles3 files
Add dependency and test scriptsAdd npm-run-all dev dependencyUpdate lockfile with new dependencies