Repository navigation
test: lint test code in CI and speed up the lasso tests - #365
Merged
Merged
Conversation
CI ran clippy only on the library code, so warnings in tests piled up unseen. A new step lints the test builds CI already compiles (core with the native features, and the desktop crate with tauri-test), and the existing findings are fixed. One of them was a real test bug: the "wrapped" button layout was Variant::from(Variant), an identity conversion, so the nested-variant branch was never tested. Also drops the unused dirs dependency from core, and makes the lasso tests' getBoundingClientRect mock find an item's index among its siblings instead of querying the container on every call. That halves their time; under a full parallel run one exceeded the 5 s timeout.
This was referenced Nov 19, 2026
Hakanbaban53
approved these changes
Nov 19, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #367. Part of the 🧪 Comprehensive Testing & QA roadmap item.
Clippy on test code
CI runs clippy on the library code only, so warnings in
#[cfg(test)]code went unnoticed. A new Test code step (Linux, next to the unit tests) lints the same test builds CI already compiles:The server already gets
--all-targetsin the Embedded server UI job.Findings fixed:
native/window.rs: a real test bug.portal_string_reads_plain_and_wrapped_layoutsbuilt its "wrapped" value withVariant::from(Variant::from(..)), which is an identity conversion (useless_conversion). The value was never wrapped, so the nested-variant branch wasn't tested. It now usesVariant::Variant(Box::new(..)).engine/process.rs: struct update syntax instead of assigning a field afterDefault::default().workflow/types.rs:std::slice::from_ref(&config)instead of&[config.clone()](2×).engine/run.rs: the panicking-node test'sNone.expect()goes throughblack_box, so the panic isn't known at compile time and the test still checks what it meant to.Also removes
dirsfrom core's dependencies. Nothing in core uses it (the server still does).Cargo.lockloses that one edge.Lasso test timeout
In a full local
test:cirun, "keeps selecting newly rendered batches during one list lasso gesture" took 7.3 s and failed on the 5 s timeout. It passes on its own. The test'sgetBoundingClientRectmock ranquerySelectorAllover up to 650 items for every item, which is quadratic. Items are siblings, so the mock now takes the index among the parent's children. On their own, the grid and list cases go from 635/786 ms to 300/371 ms.Checks
On Fedora 44:
cargo fmt: clean.--all-targets: clean.processandworkflowtests: 166 passed.native::windowtests withtauri-test: pass.Frontend: the nautilus view-pane spec passes (19 tests); Prettier and ESLint are clean.
For the maintainers: today #357 and #353 each passed CI but failed together on master (fixed in #364). Enabling "Require branches to be up to date before merging", or a merge queue, in the branch protection would catch that. It's a repository setting, so it isn't in this PR.