Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/clippy_mq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@ jobs:
- name: Test metadata collection
run: cargo collect-metadata

- name: Install npm
uses: actions/setup-node@v5
with:
node-version: 22
- name: Install browser-ui-test
run: npm install
- name: Test clippy lints page
run: cargo test --test gui
env:
FORCE_GUI: 1

integration_build:
runs-on: ubuntu-latest

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@ helper.txt

# Remove jujutsu directory from search tools
.jj

# npm files
/tests/gui/node_modules
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ harness = false
name = "dogfood"
harness = false

[[test]]
name = "gui"
harness = false
path = "tests/gui/runner.rs"
crate-type = ["bin"]

[lints.rust.unexpected_cfgs]
level = "warn"
check-cfg = ['cfg(bootstrap)']
10 changes: 10 additions & 0 deletions tests/gui/js-filter.goml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question before askign the team for approval, does goml have a system to output on error for each test?
Some reviewers really don't like GUI-related things, so having a custom message be outputed if a specific assert fails would be great.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error output looks like this: https://github.com/GuillaumeGomez/browser-UI-test/blob/master/tests/ui/assert-css-color.output, so normally you have all needed information (ie, file and line and even compared values).

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This test ensures that the (JS) filters are working as expected.

go-to: |DOC_PATH|
// Check that by default, all lints are displayed except the "deprecated" ones.
store-count: ("article .lint-title", nb_lints)
store-count: ("article:not(.hidden) .lint-title", nb_visible_lints)
store-count: ("article.hidden .lint-title", nb_hidden_lints)
store-count: ("span.group-deprecated", nb_deprecated_lints)
assert: |nb_deprecated_lints| == |nb_hidden_lints|
assert: |nb_lints| == |nb_visible_lints| + |nb_deprecated_lints|
Loading