-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b68bb8
commit d207624
Showing
45 changed files
with
145 additions
and
48 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
tsup.config.ts | ||
playwright.config.ts | ||
vite.config.js | ||
dist | ||
examples |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,16 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Arrow</title> | ||
<link rel="stylesheet" href="/public/flows.css" /> | ||
</head> | ||
<body style="margin: 0"> | ||
<div style="display: grid; place-items: center; height: 100vh"> | ||
<div style="background-color: grey; width: 20px; height: 20px" class="target"></div> | ||
</div> | ||
|
||
<script type="module" src="./arrow.ts"></script> | ||
</body> | ||
</html> |
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,24 @@ | ||
import { test, expect } from "@playwright/test"; | ||
|
||
const placements = [ | ||
"top", | ||
"right", | ||
"bottom", | ||
"left", | ||
"top-start", | ||
"top-end", | ||
"right-start", | ||
"right-end", | ||
"bottom-start", | ||
"bottom-end", | ||
"left-start", | ||
"left-end", | ||
]; | ||
|
||
placements.forEach((placement) => { | ||
test(placement, async ({ page }) => { | ||
await page.goto(`/arrow/arrow.html?placement=${placement}`); | ||
|
||
expect(await page.screenshot({ scale: "css" })).toMatchSnapshot(`arrow-${placement}.png`); | ||
}); | ||
}); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.94 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-bottom-end-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.5 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-bottom-end-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+23.4 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-bottom-end-webkit-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-bottom-start-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.6 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-bottom-start-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+23.5 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-bottom-start-webkit-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.98 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-left-end-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.89 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-left-start-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+23.9 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-left-start-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+23.5 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-left-start-webkit-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.3 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-right-end-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.4 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-right-end-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.2 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-right-end-webkit-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.3 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-right-start-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24.3 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-right-start-firefox-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+24 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-right-start-webkit-darwin.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+10.2 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-top-end-chromium-darwin.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+10.2 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-top-start-chromium-darwin.png
Oops, something went wrong.
Binary file added
BIN
+24.3 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-top-start-firefox-darwin.png
Oops, something went wrong.
Binary file added
BIN
+23.7 KB
tests/arrow/arrow.spec.ts-snapshots/arrow-top-start-webkit-darwin.png
Oops, something went wrong.
Oops, something went wrong.
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,19 @@ | ||
import { init } from "../../dist"; | ||
|
||
void init({ | ||
flows: [ | ||
{ | ||
id: "flow", | ||
location: "/", | ||
steps: [ | ||
{ | ||
title: "Hello", | ||
element: ".target", | ||
placement: new URLSearchParams(window.location.search).get( | ||
"placement", | ||
) as unknown as "top", | ||
}, | ||
], | ||
}, | ||
], | ||
}); |
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
/** @type {import('vite').UserConfig} */ | ||
export default { | ||
server: { | ||
port: 3000, | ||
}, | ||
root: "./tests", | ||
publicDir: "../", | ||
}; |