about summary refs log tree commit diff
path: root/src/test/rustdoc-gui
AgeCommit message (Collapse)AuthorLines
2022-06-20rustdoc: optimize loading of source sidebarJacob Hoffman-Andrews-6/+6
The source sidebar has a setting to remember whether it should be open or closed. Previously, this setting was handled in source-script.js, which is loaded with `defer`, meaning it is often run after the document is rendered. Since CSS renders the source sidebar as closed by default, changing this after the initial render results in a relayout. Instead, handle the setting in storage.js, which is the first script to load and is the only script that blocks render. This avoids a relayout and means navigating between files with the sidebar open is faster.
2022-06-20Improve loading of crates.js and sidebar-items.jsJacob Hoffman-Andrews-5/+5
Now that the "All Crates" dropdown is only rendered on the search results page, there is no need to load crates.js on most pages. Load it only on crate pages. Also, add the `defer` attribute so it does not block page rendering. For sidebar-items.js, move the script tag to `<head>`. Since it already has the defer attribute it won't block loading. The defer attribute does preserve ordering between scripts, so instead of the callback on load, it can set a global variable on load, which is slightly simpler. Also, since it is required to finish rendering the page, beginning its load earlier is better. Remove generation and handling of sidebar-vars. Everything there can be computed with information available in JS via other means. Remove the "other" wrapper in the sidebar. It was unnecessary. Remove excess script fields
2022-06-14Add GUI test for sidebar items expand/collapseGuillaume Gomez-1/+24
2022-06-07Update rustdoc-gui READMEGuillaume Gomez-5/+15
2022-05-31Rollup merge of #97089 - GuillaumeGomez:improve-settings-theme-display, r=jshaDylan DPC-0/+60
Improve settings theme display This is a follow-up of #96958. In this PR, I changed how the theme radio buttons are displayed and improved their look as well. It now looks like this: ![Screenshot from 2022-05-17 20-46-20](https://user-images.githubusercontent.com/3050060/168887703-a01e3bd5-9644-4012-ac11-2ae7bacd6be6.png) ![Screenshot from 2022-05-17 20-46-12](https://user-images.githubusercontent.com/3050060/168887707-132f8b2d-1163-462f-b7dd-f861121bdee7.png) You can test it [here](https://rustdoc.crud.net/imperio/improve-settings-theme-display/doc/foo/index.html). r? `@jsha`
2022-05-30Add line number click GUI testGuillaume Gomez-1/+11
2022-05-30Improve source-code-page.goml GUI test codeGuillaume Gomez-3/+3
2022-05-30Add GUI test for `<details>`/`<summary>` displayGuillaume Gomez-0/+35
2022-05-30Add GUI test for settings displayGuillaume Gomez-0/+60
2022-05-28Add GUI test for javascript disabled display of settings pageGuillaume Gomez-0/+6
2022-05-24Add GUI test for click on setting textGuillaume Gomez-2/+8
2022-05-17Add GUI test for search crate filter select CSS propertiesGuillaume Gomez-0/+31
2022-05-17Add GUI test for search result "title"Guillaume Gomez-0/+3
2022-05-14Update GUI testsGuillaume Gomez-34/+20
2022-05-12Rollup merge of #96939 - GuillaumeGomez:settings-css, r=notriddleMatthias Krüger-0/+5
Fix settings page CSS In https://github.com/rust-lang/rust/pull/96741, I moved the CSS loading outside of `settings.js`. The result was that on the settings page, there isn't the settings CSS anymore: ![Screenshot from 2022-05-11 11-09-24](https://user-images.githubusercontent.com/3050060/167817969-6750931b-3e6e-4178-b5a9-ee3851e983be.png) I also used this opportunity to remove unused CSS rules (we don't have `<select>` elements anymore in the settings). cc `@jsha` r? `@notriddle`
2022-05-11Ensure that the settings CSS is loaded on the settings pageGuillaume Gomez-0/+5
2022-05-10Clean up rustdoc GUI testGuillaume Gomez-2/+1
2022-05-06Rollup merge of #96754 - notriddle:notriddle/impl-dups, r=GuillaumeGomezGuillaume Gomez-0/+23
rustdoc: ensure HTML/JS side implementors don't have dups Fixes #94641 Rendered: - https://notriddle.com/notriddle-rustdoc-test/impl-dups/std/iter/trait.Iterator.html - https://notriddle.com/notriddle-rustdoc-test/impl-dups/core/iter/trait.Iterator.html
2022-05-06Rollup merge of #96748 - GuillaumeGomez:reexports-in-search, r=notriddleGuillaume Gomez-9/+42
Fixes reexports in search Fixes #96681. At some point we stopped reexporting items in search so this PR fixes it. It also adds a regression test. r? ```@notriddle```
2022-05-06Add missing newlineMichael Howell-1/+1
2022-05-06Add GUI test for search reexportsGuillaume Gomez-9/+42
2022-05-05rustdoc: ensure HTML/JS side implementors don't have dupsMichael Howell-0/+23
2022-05-05rustdoc: add test case assertions for ArrowDown highlight first resultMichael Howell-0/+4
2022-05-05rustdoc: fix keyboard shortcuts and console log on search pageMichael Howell-0/+20
2022-05-05rustdoc: change the "In Function Signatures" to context-sensitiveMichael Howell-4/+12
* If it's just `-> a`, use "In Function Return Types" * If it's just `a b`, use "In Function Parameters" * Otherwise, still use "In Function Signatures"
2022-05-05Use STARTS_WITH, since it's more specificMichael Howell-4/+4
Co-Authored-By: Guillaume Gomez <guillaume1.gomez@gmail.com>
2022-05-05rustdoc: when running a function-signature search, tweak the tab barMichael Howell-23/+32
2022-04-30Extend settings test to ensure settings text is as expectedGuillaume Gomez-0/+29
2022-04-30Add GUI test for settings menuGuillaume Gomez-9/+56
2022-04-14clarify doc(cfg) wordingAndy Russell-3/+3
The current "This is supported" wording implies that it's possible to still use the item on other configurations, but in an unsupported way. Changing this to "Available" removes this ambiguity.
2022-04-05Add GUI test to ensure that the width of the item-info does not overflow its ↵Guillaume Gomez-0/+38
parent
2022-03-31Rollup merge of #95470 - GuillaumeGomez:fix-gui-spurious-test, r=notriddleDylan DPC-2/+1
Fix last rustdoc-gui spurious test This should the last spurious failing GUI test from https://github.com/rust-lang/rust/issues/93784. r? ``@notriddle``
2022-03-30Fix last rustdoc-gui spurious testGuillaume Gomez-2/+1
2022-03-25Replace wait-for instructions for rustdoc GUI tests with wait-for-cssGuillaume Gomez-36/+19
2022-03-19Remove animation on source sidebarGuillaume Gomez-1/+0
2022-03-15Add URL GUI testsGuillaume Gomez-0/+6
2022-03-15Merge both "search-result-color" GUI testsGuillaume Gomez-19/+20
2022-03-13Auto merge of #94320 - GuillaumeGomez:sidebar-display, r=jshabors-0/+22
Fix sidebar elements display The bug can be seen more easily when the javascript is disabled: ![Screenshot from 2022-02-24 12-18-28](https://user-images.githubusercontent.com/3050060/155514578-cbefd3dd-f006-47e9-bc76-7c26d7e823e8.png) r? `@jsha`
2022-03-11Update GUI testGuillaume Gomez-1/+8
2022-03-10Rollup merge of #94740 - GuillaumeGomez:unify-impl-blocks, r=notriddleMatthias Krüger-9/+9
Unify impl blocks by wrapping them into a div The blanket and "auto traits" sections are wrapped into a `div` with an ID. This PR fixes this incoherence by wrapping each impl section (the "deref impl" and the "inherent impl" sections were missing it). It'll also make some tests simpler to write. r? `````@notriddle`````
2022-03-09Fix spurious CI failuresGuillaume Gomez-1/+4
2022-03-08Update GUI tests for impl blocks path changesGuillaume Gomez-9/+9
2022-03-07Add GUI test to ensure that line numbers text is aligned to the rightGuillaume Gomez-0/+3
2022-03-05Add GUI test for source code viewer scroll handlingGuillaume Gomez-0/+49
2022-02-25Extend toggle GUI test a bitGuillaume Gomez-2/+26
2022-02-24Add test for source sidebar elements displayGuillaume Gomez-0/+22
2022-02-20Rollup merge of #94002 - GuillaumeGomez:duplicated-sidebar-macro, r=notriddleMatthias Krüger-0/+21
rustdoc: Avoid duplicating macros in sidebar Fixes #93912. cc ``````@jsha`````` (for the GUI test) r? ``````@camelid``````
2022-02-17Rollup merge of #93780 - GuillaumeGomez:links-in-sidebar, r=jshaMatthias Krüger-26/+26
Generate list instead of div items in sidebar Fixes #92986. Surprisingly, we didn't have much CSS for this... [Demo](https://rustdoc.crud.net/imperio/links-in-sidebar/std/index.html). r? `@jsha`
2022-02-16Update rustdoc tests to adapt to changes to the sidebarGuillaume Gomez-26/+26
2022-02-15Fix GUI testGuillaume Gomez-1/+1