-
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.
✅ Move common test function to util.ts
- Loading branch information
Showing
19 changed files
with
113 additions
and
158 deletions.
There are no files selected for viewing
10 changes: 3 additions & 7 deletions
10
packages/react-kakao-maps-sdk/__test__/addMapClickEvent.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
10 changes: 3 additions & 7 deletions
10
packages/react-kakao-maps-sdk/__test__/addMapClickEventWithMarker.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
11 changes: 5 additions & 6 deletions
11
packages/react-kakao-maps-sdk/__test__/addMapControl.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
16 changes: 6 additions & 10 deletions
16
packages/react-kakao-maps-sdk/__test__/addMapCustomControl.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 |
---|---|---|
@@ -1,33 +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}` | ||
import { getTestUrl, waitNetworkIdleWithTimeout } from "./util" | ||
|
||
test("ScreenShot 렌더링 결과 비교", async ({ page }, testInfo) => { | ||
const url = getUrl( | ||
const url = getTestUrl( | ||
"addMapCustomControl", | ||
testInfo.config.updateSnapshots === "all", | ||
) | ||
await page.goto(url, { waitUntil: "networkidle" }) | ||
await expect(page).toHaveScreenshot() | ||
|
||
await page.locator("#btnSkyview").click() | ||
await page.waitForLoadState("networkidle") | ||
await waitNetworkIdleWithTimeout(page) | ||
await expect(page).toHaveScreenshot() | ||
|
||
await page.locator("#btnRoadmap").click() | ||
await page.waitForLoadState("networkidle") | ||
await waitNetworkIdleWithTimeout(page) | ||
await expect(page).toHaveScreenshot() | ||
|
||
await page.getByAltText("확대").click() | ||
await page.getByAltText("확대").click() | ||
await page.getByAltText("확대").click() | ||
await page.waitForLoadState("networkidle") | ||
await waitNetworkIdleWithTimeout(page) | ||
await expect(page).toHaveScreenshot() | ||
|
||
await page.getByAltText("축소").click() | ||
await page.waitForLoadState("networkidle") | ||
await waitNetworkIdleWithTimeout(page) | ||
await expect(page).toHaveScreenshot() | ||
}) |
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
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
18 changes: 7 additions & 11 deletions
18
packages/react-kakao-maps-sdk/__test__/changeOverlay1.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
20 changes: 8 additions & 12 deletions
20
packages/react-kakao-maps-sdk/__test__/changeOverlay2.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
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
15 changes: 3 additions & 12 deletions
15
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
Oops, something went wrong.