Skip to content

Commit ea05be2

Browse files
Update GUI test
1 parent 107e039 commit ea05be2

File tree

1 file changed

+14
-32
lines changed

1 file changed

+14
-32
lines changed

src/test/rustdoc-gui/search-result-display.goml

+14-32
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ size: (900, 1000)
44
write: (".search-input", "test")
55
// To be SURE that the search will be run.
66
press-key: 'Enter'
7-
wait-for: ".search-results-title"
7+
wait-for: "#crate-search"
88
// The width is returned by "getComputedStyle" which returns the exact number instead of the
99
// CSS rule which is "50%"...
1010
assert-css: (".search-results div.desc", {"width": "295px"})
@@ -17,36 +17,18 @@ assert-css: (".search-results div.desc", {"width": "570px"})
1717
// To do so we need to update the length of one of its `<option>`.
1818
size: (900, 900)
1919

20-
// First we check the current width and position.
21-
assert-css: ("#crate-search", {"width": "218px"})
22-
compare-elements-position-near: (
23-
"#crate-search",
24-
".search-results-title",
25-
{"y": 5},
26-
)
20+
// First we check the current width, height and position.
21+
assert-css: ("#crate-search", {"width": "223px"})
22+
assert-css: (".search-results-title", {"height": "44px", "width": "336px"})
2723

28-
// FIXME: Fix and re-enable these tests!
24+
// Then we update the text of one of the `<option>`.
25+
text: (
26+
"#crate-search option",
27+
"sdjfaksdjfaksjdbfkadsbfkjsadbfkdsbkfbsadkjfbkdsabfkadsfkjdsafa",
28+
)
2929

30-
// // First we check the current width and position.
31-
// assert-css: ("#crate-search", {"width": "222px"})
32-
// compare-elements-position-near: (
33-
// "#crate-search",
34-
// "#search-settings .search-results-title",
35-
// {"y": 5},
36-
// )
37-
//
38-
// // Then we update the text of one of the `<option>`.
39-
// text: (
40-
// "#crate-search option",
41-
// "sdjfaksdjfaksjdbfkadsbfkjsadbfkdsbkfbsadkjfbkdsabfkadsfkjdsafa",
42-
// )
43-
//
44-
// // Then we compare again.
45-
// assert-css: ("#crate-search", {"width": "640px"})
46-
// compare-elements-position-near-false: (
47-
// "#crate-search",
48-
// "#search-settings .search-results-title",
49-
// {"y": 5},
50-
// )
51-
// // And we check that the `<select>` isn't bigger than its container.
52-
// assert-css: ("#search", {"width": "640px"})
30+
// Then we compare again to confirm the height didn't change.
31+
assert-css: ("#crate-search", {"width": "527px"})
32+
assert-css: (".search-results-title", {"height": "44px", "width": "640px"})
33+
// And we check that the `<select>` isn't bigger than its container (".search-results-title").
34+
assert-css: ("#search", {"width": "640px"})

0 commit comments

Comments
 (0)