-
Notifications
You must be signed in to change notification settings - Fork 1
Vitest 3 optimizing #524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
karancs06
wants to merge
56
commits into
develop_v4
Choose a base branch
from
vitest-3-optimizing
base: develop_v4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,740
−5,565
Open
Vitest 3 optimizing #524
Changes from 39 commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
870843e
vitest 3
karancs06 8b91d1e
fix: update node version
karancs06 62448e5
fix
karancs06 d4b9dfa
fix: before each
karancs06 0e5a423
fix
karancs06 7d27c12
fix: resolve remaining test timeouts in fieldToolbar and multipleElem…
karancs06 f307dc2
fix: resolve test timeouts by adding missing mocks for async operations
karancs06 3f4ead8
fix: comprehensive mock improvements for CI reliability
karancs06 8c56c3a
perf: optimize multipleElementAddButton tests - remove unnecessary sl…
karancs06 dba1087
new
karancs06 97538fe
skipping failures
karancs06 3d55bcb
optimizing in vitest 3
karancs06 7c2eec7
unskipping
karancs06 c1d60e0
Merge branch 'develop_v4' into vitest-3-optimizing
karancs06 82e85af
feat: adding profiler
karancs06 e5f44d0
fix: optimization
karancs06 1f9c713
fix: field wrapper test
karancs06 df9e4ab
increased timeout
karancs06 d085513
fix: mocked waitforhoveroutline
karancs06 674274a
fix:field toolbar test
karancs06 ccbaba6
fix:field toolbar test
karancs06 e499012
fix: unskipping
karancs06 99fb760
fix:increase timeout
karancs06 9610153
fix:increase timeout
karancs06 5808874
fix:increase timeout
karancs06 4ef0e13
fix: optimize optimized
karancs06 b8f5308
fix: merging all hover test
karancs06 2a6c8f5
feat: timeout done
karancs06 93feb16
fix: passing all
karancs06 f0d4fa1
fix: errors
karancs06 03a278f
fix: error
karancs06 ef8f1eb
coverage
karancs06 3027a1c
optimze coverage
karancs06 5e8dc83
some coverage files removed
karancs06 c3be530
removing unwanted changes
karancs06 f57966f
removing unwanted test changes
karancs06 7e22344
increased timeout
karancs06 21c3216
removed redundant cases for hover and click
karancs06 68fd341
fix: optimizing
karancs06 431043a
fix: changes
karancs06 4b51315
fix: changes requested done
karancs06 9e42937
fix
karancs06 e3e80e6
reporter fro ci removed
karancs06 cabfb93
test times reduced
karancs06 d84e14a
timeout increased
karancs06 59e65fb
new case added
karancs06 5c7b09e
timeout reduced
karancs06 dfef4a5
Merge branch 'develop_v4' into vitest-3-optimizing
karancs06 3fc25d1
merge pass
karancs06 31faa0e
adding logs
karancs06 e9010c6
removing .only
karancs06 efe0c1f
removing optimizing
karancs06 3593f68
optimizing
karancs06 f3de332
modified act
karancs06 30e1510
Revert "adding logs"
karancs06 138535a
removing performance.now
karancs06 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,48 @@ | ||
| import { describe, test, expect, beforeEach, afterEach, vi } from "vitest"; | ||
| import { waitForHoverOutline } from "./utils"; | ||
|
|
||
| describe("waitForHoverOutline", () => { | ||
| beforeEach(() => { | ||
| // Clear DOM before each test | ||
| document.body.innerHTML = ""; | ||
| }); | ||
|
|
||
| afterEach(() => { | ||
| // Clean up after each test | ||
| document.body.innerHTML = ""; | ||
| vi.clearAllMocks(); | ||
| }); | ||
|
|
||
| test("should resolve when hover outline exists with style attribute", async () => { | ||
| // Create hover outline element with style | ||
| const hoverOutline = document.createElement("div"); | ||
| hoverOutline.setAttribute("data-testid", "visual-builder__hover-outline"); | ||
| hoverOutline.setAttribute("style", "top: 10px; left: 10px; width: 100px; height: 50px;"); | ||
| document.body.appendChild(hoverOutline); | ||
|
|
||
| // Should resolve immediately since element exists with style | ||
| await expect(waitForHoverOutline()).resolves.not.toThrow(); | ||
| }); | ||
|
|
||
| test("should wait for hover outline to appear", async () => { | ||
| // Initially no element | ||
| const promise = waitForHoverOutline(); | ||
|
|
||
| // Add element after a short delay | ||
| setTimeout(() => { | ||
| const hoverOutline = document.createElement("div"); | ||
| hoverOutline.setAttribute("data-testid", "visual-builder__hover-outline"); | ||
| hoverOutline.setAttribute("style", "top: 10px; left: 10px;"); | ||
| document.body.appendChild(hoverOutline); | ||
| }, 100); | ||
|
|
||
| // Should resolve once element appears | ||
| await expect(promise).resolves.not.toThrow(); | ||
| }); | ||
|
|
||
| test("should timeout if element does not exist", async () => { | ||
| // No element created - should timeout after default waitFor timeout | ||
| await expect(waitForHoverOutline()).rejects.toThrow(); | ||
| }, 10000); | ||
| }); | ||
|
|
This file contains hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.