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` |
||
|---|---|---|
| .. | ||
| src | ||
| basic-code.goml | ||
| basic.goml | ||
| check_info_sign_position.goml | ||
| code-sidebar-toggle.goml | ||
| escape-key.goml | ||
| font-weight.goml | ||
| hash-item-expansion.goml | ||
| impl-default-expansion.goml | ||
| list_code_block.goml | ||
| README.md | ||
| search-input-mobile.goml | ||
| search-result-colors.goml | ||
| search-result-description.goml | ||
| search-result-display.goml | ||
| search-result-keyword.goml | ||
| search-tab-selection-if-current-is-empty.goml | ||
| shortcuts.goml | ||
| sidebar.goml | ||
| source-code-page.goml | ||
| theme-change.goml | ||
| toggle-docs-mobile.goml | ||
| toggle-docs.goml | ||
| toggled-open-implementations.goml | ||
| trait-sidebar-item-order.goml | ||
| type-weight.rs | ||
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.