rust/src/test/rustdoc-gui
bors 277bb6653b Auto merge of #102237 - GuillaumeGomez:sidebar-links-color, r=notriddle
Migrate sidebar links color to CSS variables and unify themes with ayu

Part of https://github.com/rust-lang/rust/pull/98460.

This PR does two things:
 1. Migrate more theme CSS rules toward CSS variables.
 2. Remove `a.current` specific colors depending on the kind of the item behind the link. The `ayu` theme was already doing it this way and I think it makes much more sense like this.

You can test it [here](https://rustdoc.crud.net/imperio/sidebar-links-color/lib2/struct.Foo.html) by hovering other module's items in the sidebar (or check the selector `a.current`).

cc `@jsha`
r? `@notriddle`
2022-10-01 08:14:25 +00:00
..
src rustdoc: add gui test for no-docblock margins 2022-09-30 10:47:18 -07:00
anchor-navigable.goml rustdoc: remove bad CSS font-weight on .impl, .method, etc 2022-09-28 16:18:12 -07:00
anchors.goml
auto-hide-trait-implementations.goml
basic-code.goml rustdoc: give .line-number / .line-numbers meaningful names 2022-09-26 11:48:03 -07:00
basic.goml
check_info_sign_position.goml
check-code-blocks-margin.goml rustdoc: update test cases for changed item-decl HTML 2022-09-19 13:39:31 -07:00
check-stab-in-docblock.goml Improve GUI tests by using variables 2022-09-23 18:12:37 +02:00
code-blocks-overflow.goml rustdoc: fix GUI tests to deal with slightly changed width 2022-09-23 09:18:07 -07:00
code-color.goml
code-sidebar-toggle.goml
code-tags.goml
codeblock-tooltip.goml
default-settings.goml
docblock-big-code-mobile.goml
docblock-code-block-line-number.goml rustdoc: give .line-number / .line-numbers meaningful names 2022-09-26 11:48:03 -07:00
docblock-details.goml Remove useless color assertions on 0px borders 2022-09-19 20:14:09 -07:00
docblock-table-overflow.goml rustdoc: fix GUI tests to deal with slightly changed width 2022-09-23 09:18:07 -07:00
docblock-table.goml
duplicate-macro-reexport.goml
escape-key.goml
font-weight.goml rustdoc: remove bad CSS font-weight on .impl, .method, etc 2022-09-28 16:18:12 -07:00
hash-item-expansion.goml
headers-color.goml rustdoc: clean up .out-of-band/.in-band CSS 2022-09-25 13:48:17 -07:00
headings.goml Remove useless color assertions on 0px borders 2022-09-19 20:14:09 -07:00
huge-collection-of-constants.goml
impl-default-expansion.goml
implementors.goml Round offset to whole integer 2022-09-25 14:58:49 -07:00
item-info-alignment.goml
item-info-overflow.goml rustdoc: fix GUI tests to deal with slightly changed width 2022-09-23 09:18:07 -07:00
item-info.goml rustdoc: fix GUI tests to deal with slightly changed width 2022-09-23 09:18:07 -07:00
item-summary-table.goml
javascript-disabled.goml
jump-to-def-background.goml
label-next-to-symbol.goml rustdoc: clean up DOM by removing .dockblock-short p 2022-09-13 16:03:11 -07:00
links-color.goml Add GUI test for links colors 2022-09-16 18:26:48 +02:00
list_code_block.goml
mobile.goml
module-items-font.goml
no-docblock.goml rustdoc: add gui test for no-docblock margins 2022-09-30 10:47:18 -07:00
notable-trait.goml rustdoc: fix GUI tests to deal with slightly changed width 2022-09-23 09:18:07 -07:00
overflow-tooltip-information.goml
pocket-menu.goml
README.md
run-on-hover.goml
rust-logo.goml
search-filter.goml
search-form-elements.goml
search-input-mobile.goml
search-reexport.goml
search-result-color.goml Add GUI regression test for search results colors 2022-09-27 20:23:00 +02:00
search-result-description.goml
search-result-display.goml rustdoc: fix GUI tests to deal with slightly changed width 2022-09-23 09:18:07 -07:00
search-result-go-to-first.goml
search-result-keyword.goml
search-tab-change-title-fn-sig.goml
settings.goml
shortcuts.goml
sidebar-links-color.goml Add GUI test for sidebar links color 2022-09-30 13:29:40 +02:00
sidebar-macro-reexport.goml
sidebar-mobile-scroll.goml rustdoc: update test cases for <section> tags in traits 2022-09-30 11:58:58 -07:00
sidebar-mobile.goml
sidebar-source-code-display.goml rustdoc: update test case now that the UI animation is removed 2022-09-29 15:40:24 -07:00
sidebar-source-code.goml
sidebar.goml rustdoc: add regression test for sidebar width jank 2022-09-23 08:35:14 -07:00
source-anchor-scroll.goml rustdoc: adjust test to cope with slightly different scrolling behaviour 2022-09-21 16:44:33 -07:00
source-code-page.goml rustdoc: give .line-number / .line-numbers meaningful names 2022-09-26 11:48:03 -07:00
src-font-size.goml rustdoc: remove bad CSS font-weight on .impl, .method, etc 2022-09-28 16:18:12 -07:00
theme-change.goml
theme-in-history.goml
toggle-click-deadspace.goml Update tests for new browser-ui-test version 2022-09-11 22:09:23 +02:00
toggle-docs-mobile.goml
toggle-docs.goml
toggle-implementors.goml
toggled-open-implementations.goml
trait-sidebar-item-order.goml
type-declation-overflow.goml Rollup merge of #102199 - GuillaumeGomez:improve-rustdoc-gui-tests, r=notriddle 2022-09-24 07:38:58 +02:00
where-whitespace.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 --test-args --debug

If you don't want to run in headless mode (helpful to debug sometimes), you can use --no-headless:

$ ./x.py test src/test/rustdoc-gui --stage 1 --test-args --no-headless

To see the supported options, use --help.

Important to be noted: if the chromium instance crashes when you run it, you might need to use --no-sandbox to make it work:

$ ./x.py test src/test/rustdoc-gui --stage 1 --test-args --no-sandbox