Skip to content

Commit

Permalink
Test wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mbraak committed Dec 10, 2023
1 parent dcb7660 commit 75d48a9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
9 changes: 9 additions & 0 deletions devserver/test_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
<script src="tree.jquery.js"></script>
<script src="/example_data.js"></script>
<style>
.wide-tree {
font-size: 20px;
}

.wide-tree ul.jqtree-tree ul.jqtree_common {
margin-left: 128px;
}
</style>
</head>
<body>
<div id="tree1"></div>
Expand Down
18 changes: 15 additions & 3 deletions src/playwright/playwright.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,9 @@ test.describe("autoscroll when the container is scrollable", () => {
const container = document.createElement("div");
container.id = "container";
container.style.height = "200px";
container.style.width = "60px";
container.style.width = "400px";
container.style.overflowY = "scroll";
container.classList.add('wide-tree');
document.body.replaceChild(container, treeElement);
container.appendChild(treeElement);
Expand Down Expand Up @@ -267,9 +268,9 @@ test.describe("autoscroll when the container is scrollable", () => {
// eslint-disable-next-line playwright/no-wait-for-timeout
await page.waitForTimeout(200);

await page.mouse.move(100, 50);
await page.mouse.move(410, 50);
// eslint-disable-next-line playwright/no-wait-for-timeout
await page.waitForTimeout(50);
await page.waitForTimeout(100);

expect(
await page
Expand All @@ -278,6 +279,17 @@ test.describe("autoscroll when the container is scrollable", () => {
).toBeGreaterThan(0);
});

test("it moves a nodes after scrolling horizontally", async ({ page }) => {

Check warning on line 282 in src/playwright/playwright.test.ts

View workflow job for this annotation

GitHub Actions / runner-job

Test has no assertions
await moveMouseToNode(page, "Coelophysoids");
await page.mouse.down();

// eslint-disable-next-line playwright/no-wait-for-timeout
await page.waitForTimeout(200);

await page.mouse.move(410, 50);
// todo: scroll and move
});

test("scrollToNode scrolls to a node", async ({ page }) => {
expect(
await page
Expand Down

0 comments on commit 75d48a9

Please sign in to comment.