Skip to content

Commit 0212ba6

Browse files
Add GUI test to ensure links have the expected color
1 parent 4683066 commit 0212ba6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

gui-tests/links-color.goml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Checks that the links have the expected color.
2+
go-to: |DOC_PATH|
3+
show-text: true
4+
5+
// First we enforce the theme to ensure we're testing in the right conditions.
6+
set-local-storage: {"rustdoc-theme": "light"}
7+
reload:
8+
9+
// The "Recent releases" and the feed icon should have the default color.
10+
assert-css: ("//a[@href='/releases']", {"color": "#000"})
11+
assert-css: ("//a[@href='/releases/feed']", {"color": "#000"})
12+
// The release links should be different.
13+
assert-css: ("li a.release .name", {"color": "#4d76ae"}, ALL)
14+
15+
go-to: |DOC_PATH| + "/crate/sysinfo/0.23.5/builds"
16+
// The builds link color should have the default color.
17+
assert-css: ("li a.release > div", {"color": "#000"}, ALL)

0 commit comments

Comments
 (0)