-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Introduce a crate to write unit tests of Dioxus apps #5323
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
hovinen
wants to merge
71
commits into
DioxusLabs:main
Choose a base branch
from
hovinen:introduce-testing-library
base: main
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.
Open
Changes from 14 commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
23a9be0
Introduce a testing library for Dioxus
hovinen cb1c416
Flesh out crate docs
hovinen 5f66041
Fix doctests
hovinen 0a82eff
Fix typos
hovinen 75f52bb
Fix clippy warnings
hovinen 68f601f
Fix doc warnings
hovinen 1166bf2
Introduce a higher level interface including waiting for conditions
hovinen 76c629b
Add some documentation
hovinen 61a6705
Add not matcher
hovinen e7767e5
a bit more composable
ealmloff 8b7683e
WIP: Support assertions in fluent interface
hovinen 2b950f6
WIP: Go back to type erasure
hovinen 1a204da
Fix remaining problems
hovinen dcbb8d3
Make Waitable private again
hovinen 5f797b8
WIP: Support matching on collections
hovinen 1ab204e
Fix remaining problems matching on collections
hovinen ed386e9
Move conditions to a separate module
hovinen b4d9798
Eliminate ImmediateCondition as a trait, fold methods into normal imp…
hovinen a97fe28
Update docs
hovinen 54bc071
Update more docs
hovinen 896806f
Fix doctests
hovinen 11b4d9d
Improve documentation further
hovinen b7b5d5f
Fix doctest
hovinen 03ed7a8
Clippy
hovinen 0d64fe2
Add more docs
hovinen 09220bf
More examples
hovinen af1c629
Fix doctests
hovinen 9d29175
Make not() return the concrete type NotMatcher so that assertions usi…
hovinen 0b9f7eb
More docs
hovinen f0cd255
Make assertion failure descriptions somewhat reasonable and make AllE…
hovinen d38954d
Resolve TODOs
hovinen 2da3523
Remove Waitable impl for AllElementsCondition
hovinen 4c8c982
Flesh out more docs
hovinen c737a9f
Doc fixes
hovinen 5527093
Add warning to docs
hovinen f698c43
Expand warning with correct implementation
hovinen cb887ca
Clarify root()
hovinen 1bc4838
Merge branch 'main' into introduce-testing-library
hovinen 3d721f0
Reduce duplication
hovinen 741f601
Cargo.lock
hovinen f78f003
Reduce lines
hovinen 66f8c74
Move feature spec to test package
hovinen dd66555
Review comment
hovinen bc72605
Fix typos
hovinen 4a7627d
Fix doc links
hovinen a2a152a
Fix doctests
hovinen e414385
Merge branch 'main' into introduce-testing-library
hovinen 793903b
Update Cargo.lock
hovinen dc4cd4f
Merge branch 'main' into introduce-testing-library
hovinen 58e9ab3
Reintroduce taffy dependency
hovinen 7ab8351
Update with 0.7.6 API changes
hovinen 58a1946
Import taffy exactly the way blitz-dom does
hovinen 4f87b72
Remove taffy dependency
hovinen ce71740
Use workspace tokio dependency
hovinen 30d1644
Merge branch 'main' into introduce-testing-library
hovinen 8debf08
Remove spuriously added line
hovinen fe65b54
Cargo.lock
hovinen d56dccb
Use sequential StyleThreading as per https://github.com/DioxusLabs/bl…
hovinen 7b02593
Methods in ElementCondition and AllElementsCondition now take &self
hovinen 8691398
Merge branch 'main' into introduce-testing-library
hovinen 49d58f3
Use matchers from test-that rather than own matchers
hovinen c110ffa
Update tests
hovinen 5e596a2
Adjust dep version
hovinen d37fc27
Upgrade test-that dependency
hovinen f7d1933
Put matchers in matchers module and reexport them
hovinen 270b4ee
Merge branch 'main' into introduce-testing-library
hovinen e9ece73
Have query take a shared reference rather than an exclusive reference
hovinen 63dbfd0
Add test of multiple parallel queries, and make testers in the doctes…
hovinen 745e0a2
Move query up in test
hovinen 95cc52f
Remove unneeded lifetime parameter
hovinen d84801e
Bump test-that dependency to 0.5.1
hovinen 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,23 @@ | ||
| [package] | ||
| name = "dioxus-test" | ||
| version = { workspace = true } | ||
| authors = ["Bradford Hovinen"] | ||
| edition = "2024" | ||
| description = "Test library for Dioxus based on native renderer" | ||
| license = "MIT OR Apache-2.0" | ||
| repository = "https://github.com/DioxusLabs/dioxus/" | ||
| homepage = "https://dioxuslabs.com/learn/0.7/getting_started" | ||
| keywords = ["dom", "ui", "gui", "react", "testing"] | ||
|
|
||
| [dependencies] | ||
| blitz-dom = { workspace = true } | ||
| dioxus-core = { workspace = true } | ||
| dioxus-html = { workspace = true } | ||
| dioxus-native-dom = { workspace = true } | ||
| taffy = { workspace = true } | ||
| tokio = { workspace = true } | ||
| tracing = { workspace = true } | ||
|
|
||
| [dev-dependencies] | ||
| dioxus = { workspace = true } | ||
| tokio = { version = "1.48", features = ["rt", "macros"] } |
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.