Skip to content

Commit

Permalink
Update tooltip.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
thednp committed Oct 25, 2024
1 parent d8656cd commit 278da5b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions test/tooltip.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,9 @@ describe("Tooltip Class Tests", () => {
instance3.show();
await vi.waitFor(() => {
expect(instance3.tooltip?.className).to.contain("show");

Check failure on line 529 in test/tooltip.test.ts

View workflow job for this annotation

GitHub Actions / Test on Node 20

test/tooltip.test.ts > Tooltip Class Tests > Can handle small devices

AssertionError: expected 'tooltip position-fixed fade bs-toolti…' to include 'show' ❯ test/tooltip.test.ts:529:46
}, 101);
}, 151);
instance3.dispose();
await new Promise(res => setTimeout(res, 251));

// vertical
await page.viewport(150, 800);
Expand All @@ -537,7 +538,7 @@ describe("Tooltip Class Tests", () => {
instance4.show();
await vi.waitFor(() => {
expect(instance4.tooltip?.className).to.contain("show");
}, 101);
}, 151);
instance4.dispose();

await new Promise(res => setTimeout(res, 251));
Expand All @@ -546,7 +547,7 @@ describe("Tooltip Class Tests", () => {
instance5.show();
await vi.waitFor(() => {
expect(instance5.tooltip?.className).to.contain("show");
}, 101);
}, 151);
instance5.dispose();

await new Promise(res => setTimeout(res, 251));
Expand All @@ -555,7 +556,7 @@ describe("Tooltip Class Tests", () => {
instance6.show();
await vi.waitFor(() => {
expect(instance6.tooltip?.className).to.contain("show");
}, 101);
}, 151);
instance6.dispose();

await new Promise(res => setTimeout(res, 251));
Expand All @@ -564,10 +565,8 @@ describe("Tooltip Class Tests", () => {
instance7.show();
await vi.waitFor(() => {
expect(instance7.tooltip?.className).to.contain("show");
}, 101);
instance7.dispose();
// is this correct config?

}, 151);
instance7.dispose();
});

it("Can dispose()", async () => {
Expand Down

0 comments on commit 278da5b

Please sign in to comment.