Fix documentation header sizes And add a rustdoc-gui test confirming various header sizes. Split off from #90156. This fixes a regression in #89506 where the heading level of titles within Markdown was too high (h2) for docblocks under structs, unions, and enum impls. r? `@camelid` Demo: https://jacob.hoffman-andrews.com/rust/fix-header-sizes/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E Stable: https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E Beta: https://doc.rust-lang.org/beta/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E |
||
|---|---|---|
| .. | ||
| src | ||
| anchor-navigable.goml | ||
| auto-hide-trait-implementations.goml | ||
| basic-code.goml | ||
| basic.goml | ||
| check-code-blocks-margin.goml | ||
| check_info_sign_position.goml | ||
| code-blocks-overflow.goml | ||
| code-color.goml | ||
| code-sidebar-toggle.goml | ||
| code-tags.goml | ||
| default-settings.goml | ||
| docblock-big-code-mobile.goml | ||
| docblock-code-block-line-number.goml | ||
| docblock-table-overflow.goml | ||
| escape-key.goml | ||
| font-weight.goml | ||
| hash-item-expansion.goml | ||
| header-size.goml | ||
| headers-color.goml | ||
| huge-collection-of-constants.goml | ||
| impl-default-expansion.goml | ||
| implementors.goml | ||
| item-info-width.goml | ||
| item-summary-table.goml | ||
| jump-to-def-background.goml | ||
| label-next-to-symbol.goml | ||
| list_code_block.goml | ||
| module-items-font.goml | ||
| overflow-tooltip-information.goml | ||
| README.md | ||
| search-filter.goml | ||
| search-input-mobile.goml | ||
| search-result-color.goml | ||
| search-result-colors.goml | ||
| search-result-description.goml | ||
| search-result-display.goml | ||
| search-result-go-to-first.goml | ||
| search-result-keyword.goml | ||
| search-tab-selection-if-current-is-empty.goml | ||
| shortcuts.goml | ||
| sidebar-macro-reexport.goml | ||
| sidebar-mobile.goml | ||
| sidebar.goml | ||
| source-code-page.goml | ||
| theme-change.goml | ||
| toggle-docs-mobile.goml | ||
| toggle-docs.goml | ||
| toggle-implementors.goml | ||
| toggled-open-implementations.goml | ||
| trait-sidebar-item-order.goml | ||
| type-declation-overflow.goml | ||
The tests present here are used to test the generated HTML from rustdoc. The goal is to prevent unsound/unexpected GUI changes.
This is using the browser-ui-test framework to do so. It works as follows:
It wraps puppeteer to send commands to a web browser in order to navigate and test what's being currently displayed in the web page.
You can find more information and its documentation in its repository.
If you need to have more information on the tests run, you can use --test-args:
$ ./x.py test src/test/rustdoc-gui --stage 1 --jobs 8 --test-args --debug
There are three options supported:
--debug: allows to see puppeteer commands.--no-headless: disable headless mode so you can see what's going on.--show-text: by default, text isn't rendered because of issues with fonts, it enables it back.