1 // Checks that the search results have the expected width.
2 goto: file://|DOC_PATH|/test_docs/index.html
4 write: (".search-input", "test")
5 // To be SURE that the search will be run.
7 wait-for: ".search-results-title"
8 // The width is returned by "getComputedStyle" which returns the exact number instead of the
9 // CSS rule which is "50%"...
10 assert-css: (".search-results div.desc", {"width": "295px"})
12 // As counter-intuitive as it may seem, in this width, the width is "100%", which is why
13 // when computed it's larger.
14 assert-css: (".search-results div.desc", {"width": "570px"})
16 // Check that the crate filter `<select>` is correctly handled when it goes to next line.
17 // To do so we need to update the length of one of its `<option>`.
20 // First we check the current width and position.
21 assert-css: ("#crate-search", {"width": "218px"})
22 compare-elements-position-near: (
24 ".search-results-title",
28 // FIXME: Fix and re-enable these tests!
30 // // First we check the current width and position.
31 // assert-css: ("#crate-search", {"width": "222px"})
32 // compare-elements-position-near: (
34 // "#search-settings .search-results-title",
38 // // Then we update the text of one of the `<option>`.
40 // "#crate-search option",
41 // "sdjfaksdjfaksjdbfkadsbfkjsadbfkdsbkfbsadkjfbkdsabfkadsfkjdsafa",
44 // // Then we compare again.
45 // assert-css: ("#crate-search", {"width": "640px"})
46 // compare-elements-position-near-false: (
48 // "#search-settings .search-results-title",
51 // // And we check that the `<select>` isn't bigger than its container.
52 // assert-css: ("#search", {"width": "640px"})