rust/src/test/rustdoc-gui
Dylan DPC f19aad85a8
Rollup merge of #86542 - GuillaumeGomez:line-numbers-aligned-with-content, r=jyn514
Line numbers aligned with content

We had the issue a few times in the past where the source code pages' content wasn't aligned with the line numbers but completely below. This test will prevent this change to go unnoticed.

The first commit comes from https://github.com/rust-lang/rust/pull/86541 so it needs it to be merged first.

r? `@jsha`
2021-06-23 00:20:22 +02:00
..
src Add test to ensure font-weight is applied correctly 2021-06-13 21:50:11 +02:00
basic-code.goml Update browser-ui-test version 2021-06-19 14:19:39 +02:00
basic.goml Move rustdoc-gui rust libraries into their own folder and prepare the field for more libraries 2021-05-11 20:56:16 +02:00
check_info_sign_position.goml Update browser-ui-test version 2021-06-19 14:19:39 +02:00
code-sidebar-toggle.goml Update browser-ui-test version 2021-06-19 14:19:39 +02:00
escape-key.goml Update browser-ui-test version 2021-06-22 11:11:45 +02:00
font-weight.goml Update browser-ui-test version 2021-06-19 14:19:39 +02:00
hash-item-expansion.goml Update browser-ui-test version 2021-06-22 11:11:45 +02:00
impl-default-expansion.goml Update browser-ui-test version 2021-06-22 11:11:45 +02:00
list_code_block.goml Move rustdoc-gui rust libraries into their own folder and prepare the field for more libraries 2021-05-11 20:56:16 +02:00
README.md Allow to pass arguments to rustdoc-gui tool 2021-06-16 11:54:19 +02:00
search-input-mobile.goml Move rustdoc-gui rust libraries into their own folder and prepare the field for more libraries 2021-05-11 20:56:16 +02:00
search-result-colors.goml Update browser-ui-test version 2021-06-19 14:19:39 +02:00
search-result-description.goml Update browser-ui-test version 2021-06-19 14:19:39 +02:00
search-result-display.goml Update browser-ui-test version 2021-06-19 14:19:39 +02:00
search-result-keyword.goml Update browser-ui-test version 2021-06-19 14:19:39 +02:00
search-tab-selection-if-current-is-empty.goml Update browser-ui-test version 2021-06-22 11:11:45 +02:00
shortcuts.goml Update browser-ui-test version 2021-06-19 14:19:39 +02:00
sidebar.goml Update browser-ui-test version 2021-06-19 14:19:39 +02:00
source-code-page.goml Add check to ensure that the line numbers are aligned with the source code 2021-06-22 11:17:53 +02:00
theme-change.goml Update browser-ui-test version 2021-06-19 14:19:39 +02:00
toggle-docs-mobile.goml Update browser-ui-test version 2021-06-22 11:11:45 +02:00
toggle-docs.goml Update browser-ui-test version 2021-06-22 11:11:45 +02:00
toggled-open-implementations.goml Update browser-ui-test version 2021-06-22 11:11:45 +02:00
trait-sidebar-item-order.goml Update browser-ui-test version 2021-06-19 14:19:39 +02:00
type-weight.rs Add test to check that font-weight is correctly set on type page 2021-06-07 00:06:32 +02:00

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.