-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✅ Add E2E enableDisableZoomInOut test
update E2E disableMapDragMove test remove E2E snapshots update packages/react-kakao-maps-sdk/.gitignore - #61
- Loading branch information
Showing
67 changed files
with
80 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Map } from "react-kakao-maps-sdk" | ||
import useKakaoLoader from "./useKakaoLoader" | ||
import { useState } from "react" | ||
|
||
export default function EnableDisableZoomInOut() { | ||
useKakaoLoader() | ||
const [zoomable, setZoomable] = useState<boolean>(true) | ||
|
||
return ( | ||
<Map // 지도를 표시할 Container | ||
id="map" | ||
center={{ | ||
// 지도의 중심좌표 | ||
lat: 33.450701, | ||
lng: 126.570667, | ||
}} | ||
style={{ | ||
// 지도의 크기 | ||
width: "100%", | ||
height: "350px", | ||
}} | ||
level={3} // 지도의 확대 레벨 | ||
zoomable={zoomable} | ||
> | ||
<p> | ||
<button onClick={() => setZoomable(false)}>지도 확대/축소 끄기</button>{" "} | ||
<button onClick={() => setZoomable(true)}>지도 확대/축소 켜기</button> | ||
</p> | ||
</Map> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ node_modules/ | |
/test-results/ | ||
/playwright-report/ | ||
/playwright/.cache/ | ||
|
||
/__test__/*-snapshots |
Binary file removed
BIN
-187 KB
...est__/addMapControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-chromium-linux.png
Binary file not shown.
Binary file removed
BIN
-214 KB
...test__/addMapControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-179 KB
..._test__/addMapControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-webkit-linux.png
Binary file not shown.
Binary file removed
BIN
-188 KB
...addMapCustomControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-chromium-linux.png
Binary file not shown.
Binary file removed
BIN
-215 KB
.../addMapCustomControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-180 KB
..._/addMapCustomControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-webkit-linux.png
Binary file not shown.
Binary file removed
BIN
-894 KB
...addMapCustomControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-chromium-linux.png
Binary file not shown.
Binary file removed
BIN
-216 KB
.../addMapCustomControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-181 KB
..._/addMapCustomControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-webkit-linux.png
Binary file not shown.
Binary file removed
BIN
-188 KB
...addMapCustomControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-3-chromium-linux.png
Binary file not shown.
Binary file removed
BIN
-215 KB
.../addMapCustomControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-3-firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-180 KB
..._/addMapCustomControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-3-webkit-linux.png
Binary file not shown.
Binary file removed
BIN
-94.6 KB
...addMapCustomControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-4-chromium-linux.png
Binary file not shown.
Binary file removed
BIN
-117 KB
.../addMapCustomControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-4-firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-87.1 KB
..._/addMapCustomControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-4-webkit-linux.png
Binary file not shown.
Binary file removed
BIN
-109 KB
...addMapCustomControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-5-chromium-linux.png
Binary file not shown.
Binary file removed
BIN
-135 KB
.../addMapCustomControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-5-firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-102 KB
..._/addMapCustomControl.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-5-webkit-linux.png
Binary file not shown.
Binary file removed
BIN
-188 KB
...k/__test__/basicMap.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-chromium-linux.png
Binary file not shown.
Binary file removed
BIN
-215 KB
...dk/__test__/basicMap.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-180 KB
...sdk/__test__/basicMap.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-webkit-linux.png
Binary file not shown.
Binary file removed
BIN
-174 KB
...k/__test__/basicMap.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-chromium-linux.png
Binary file not shown.
Binary file removed
BIN
-209 KB
...dk/__test__/basicMap.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-firefox-linux.png
Binary file not shown.
Binary file removed
BIN
-164 KB
...sdk/__test__/basicMap.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-webkit-linux.png
Binary file not shown.
Binary file removed
BIN
-193 KB
..._test__/changeLevel.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-chromium-linux.png
Binary file not shown.
Binary file removed
BIN
-221 KB
...__test__/changeLevel.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-185 KB
.../__test__/changeLevel.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-webkit-linux.png
Diff not rendered.
Binary file removed
BIN
-311 KB
..._test__/changeLevel.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-chromium-linux.png
Diff not rendered.
Binary file removed
BIN
-327 KB
...__test__/changeLevel.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-14.7 KB
.../__test__/changeLevel.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-webkit-linux.png
Diff not rendered.
Binary file removed
BIN
-302 KB
..._test__/changeLevel.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-3-chromium-linux.png
Diff not rendered.
Binary file removed
BIN
-332 KB
...__test__/changeLevel.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-3-firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-285 KB
.../__test__/changeLevel.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-3-webkit-linux.png
Diff not rendered.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-191 KB
.../disableMapDragMove.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-chromium-linux.png
Diff not rendered.
Binary file removed
BIN
-219 KB
..._/disableMapDragMove.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-183 KB
...__/disableMapDragMove.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-webkit-linux.png
Diff not rendered.
Binary file removed
BIN
-191 KB
.../disableMapDragMove.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-chromium-linux.png
Diff not rendered.
Binary file removed
BIN
-219 KB
..._/disableMapDragMove.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-183 KB
...__/disableMapDragMove.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-webkit-linux.png
Diff not rendered.
Binary file removed
BIN
-175 KB
.../disableMapDragMove.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-3-chromium-linux.png
Diff not rendered.
Binary file removed
BIN
-213 KB
..._/disableMapDragMove.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-3-firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-167 KB
...__/disableMapDragMove.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-3-webkit-linux.png
Diff not rendered.
29 changes: 29 additions & 0 deletions
29
packages/react-kakao-maps-sdk/__test__/enableDisableZoomInOut.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { test, expect } from "@playwright/test" | ||
|
||
const getUrl = (id: string, isUpdateSanpShots: boolean = false) => | ||
isUpdateSanpShots | ||
? `http://127.0.0.1:5252/samples/${id}.html` | ||
: `/samples/${id}` | ||
|
||
test("ScreenShot 렌더링 결과 비교", async ({ page }, testInfo) => { | ||
const url = getUrl( | ||
"enableDisableZoomInOut", | ||
testInfo.config.updateSnapshots === "all", | ||
) | ||
await page.goto(url, { waitUntil: "networkidle" }) | ||
await expect(page).toHaveScreenshot("firstRender.png") | ||
|
||
await page.getByText("지도 확대/축소 끄기").click() | ||
await page.locator("#map").hover() | ||
await page.mouse.wheel(0, 1000) | ||
await page.waitForLoadState("networkidle") | ||
expect(await page.screenshot()).toMatchSnapshot("firstRender.png") | ||
await expect(page).toHaveScreenshot() | ||
|
||
await page.getByText("지도 확대/축소 켜기").click() | ||
await page.locator("#map").hover() | ||
await page.mouse.wheel(0, 300) | ||
await page.waitForLoadState("networkidle") | ||
expect(await page.screenshot()).not.toMatchSnapshot("firstRender.png") | ||
await expect(page).toHaveScreenshot() | ||
}) |
Binary file removed
BIN
-190 KB
...dk/__test__/mapInfo.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-chromium-linux.png
Diff not rendered.
Binary file removed
BIN
-218 KB
...sdk/__test__/mapInfo.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-183 KB
...-sdk/__test__/mapInfo.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-webkit-linux.png
Diff not rendered.
Binary file removed
BIN
-214 KB
...dk/__test__/mapInfo.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-chromium-linux.png
Diff not rendered.
Binary file removed
BIN
-243 KB
...sdk/__test__/mapInfo.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-205 KB
...-sdk/__test__/mapInfo.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-webkit-linux.png
Diff not rendered.
Binary file removed
BIN
-916 KB
...dk/__test__/mapInfo.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-3-chromium-linux.png
Diff not rendered.
Binary file removed
BIN
-969 KB
...sdk/__test__/mapInfo.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-3-firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-873 KB
...-sdk/__test__/mapInfo.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-3-webkit-linux.png
Diff not rendered.
Binary file removed
BIN
-192 KB
...dk/__test__/moveMap.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-chromium-linux.png
Diff not rendered.
Binary file removed
BIN
-221 KB
...sdk/__test__/moveMap.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-185 KB
...-sdk/__test__/moveMap.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-1-webkit-linux.png
Diff not rendered.
Binary file removed
BIN
-204 KB
...dk/__test__/moveMap.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-chromium-linux.png
Diff not rendered.
Binary file removed
BIN
-230 KB
...sdk/__test__/moveMap.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-185 KB
...-sdk/__test__/moveMap.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-2-webkit-linux.png
Diff not rendered.
Binary file removed
BIN
-188 KB
...dk/__test__/moveMap.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-3-chromium-linux.png
Diff not rendered.
Binary file removed
BIN
-221 KB
...sdk/__test__/moveMap.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-3-firefox-linux.png
Diff not rendered.
Binary file removed
BIN
-181 KB
...-sdk/__test__/moveMap.spec.ts-snapshots/ScreenShot-렌더링-결과-비교-3-webkit-linux.png
Diff not rendered.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters