rust/src/test/rustdoc-gui
Yuki Okushi 96753eb0e0
Rollup merge of #103650 - notriddle:notriddle/line-anchors, r=GuillaumeGomez
rustdoc: change `.src-line-numbers > span` to `.src-line-numbers > a`

Example: https://notriddle.com/notriddle-rustdoc-demos/line-anchors/test_dingus/fn.test.html

This allows people to treat them like real links, such as right-click to copy URL, and makes the line numbers in a scraped example work at all, when before this commit was added, they had the clickable pointer cursor but did not actually do anything when clicked.
2022-11-13 16:41:44 +09:00
..
src rustdoc: add test case for huge logo 2022-11-05 14:26:13 -07:00
anchor-navigable.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
anchors.goml Use named arguments to make test clearer 2022-10-17 18:08:53 +02:00
auto-hide-trait-implementations.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
basic-code.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
basic.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
check-code-blocks-margin.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
check-stab-in-docblock.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
check_info_sign_position.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
code-blocks-overflow.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
code-color.goml Clean up code-color and headers-color rustdoc GUI tests 2022-10-18 15:18:45 +02:00
code-sidebar-toggle.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
code-tags.goml Update to new browser-ui-test version 2022-11-09 17:00:25 +01:00
codeblock-tooltip.goml Clean up codeblock-tooltip rustdoc-gui test 2022-10-19 12:12:26 +02:00
default-settings.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
docblock-big-code-mobile.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
docblock-code-block-line-number.goml rustdoc: use checkbox instead of switch for settings toggles 2022-11-10 17:22:37 -07:00
docblock-details.goml rustdoc: prevent method summary margin from being applied to docblocks 2022-10-21 10:48:41 -07:00
docblock-table-overflow.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
docblock-table.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
duplicate-macro-reexport.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
escape-key.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
font-weight.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
hash-item-expansion.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
headers-color.goml Clean up code-color and headers-color rustdoc GUI tests 2022-10-18 15:18:45 +02:00
headings.goml Use functions for headings rustodoc GUI test 2022-10-22 14:12:01 +02:00
help-page.goml rustdoc: improve appearance of source page navigation bar 2022-10-20 13:31:06 -07:00
highlight-colors.goml rustdoc: rename syntax highlighting CSS class attribute to attr 2022-10-31 13:55:39 -07:00
huge-collection-of-constants.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
huge-logo.goml rustdoc: add test case for huge logo 2022-11-05 14:26:13 -07:00
impl-default-expansion.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
implementors.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
item-decl-colors.goml Update to new browser-ui-test version 2022-11-09 17:00:25 +01:00
item-info-alignment.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
item-info-overflow.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
item-info.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
item-summary-table.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
javascript-disabled.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
jump-to-def-background.goml Use functions for jump-to-def-background rustodoc GUI test 2022-10-23 15:40:56 +02:00
label-next-to-symbol.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
links-color.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
list_code_block.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
method-margins.goml rustdoc: add test case for associated type margins 2022-10-31 07:47:42 -07:00
mobile.goml rustdoc: remove class name location from sidebar sibling nav 2022-10-18 12:01:53 -07:00
module-items-font.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
no-docblock.goml Update to new browser-ui-test version 2022-11-09 17:00:25 +01:00
notable-trait.goml rustdoc: fix font color inheritance from body, and test 2022-11-07 22:47:02 -07:00
overflow-tooltip-information.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
pocket-menu.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
README.md Update rustdoc-gui README 2022-06-07 11:49:35 +02:00
run-on-hover.goml Extend GUI test for run button 2022-11-05 17:22:38 +01:00
rust-logo.goml Extend rust-logo GUI test to check there is no filter for other logos 2022-11-06 20:20:43 +01:00
search-filter.goml rustdoc: add test case for huge logo 2022-11-05 14:26:13 -07:00
search-form-elements.goml rustdoc: add test cases for links inside the help popover 2022-10-15 12:06:16 -07:00
search-input-mobile.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
search-no-result.goml Use same color for links in no result search 2022-11-12 13:33:17 +01:00
search-reexport.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
search-result-color.goml Update GUI test for bottom border color 2022-11-05 16:43:09 +01:00
search-result-description.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
search-result-display.goml Extend crate-search div GUI tests 2022-11-09 16:16:29 +01:00
search-result-go-to-first.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
search-result-keyword.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
search-tab-change-title-fn-sig.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
settings.goml rustdoc: add test cases for checkbox toggles 2022-11-11 09:57:58 -07:00
shortcuts.goml Add GUI tests for collapse/expand actions 2022-10-20 11:35:12 +02:00
sidebar-links-color.goml Migrate sidebar-links-color GUI test to functions 2022-11-01 19:46:42 +01:00
sidebar-macro-reexport.goml rustdoc: remove unused classes from sidebar 2022-10-11 08:50:41 -07:00
sidebar-mobile-scroll.goml rustdoc: change mobile breakpoint to match CSS 2022-10-17 19:26:15 -07:00
sidebar-mobile.goml rustdoc: remove class name location from sidebar sibling nav 2022-10-18 12:01:53 -07:00
sidebar-source-code-display.goml rustdoc: remove unused .sidebar-logo DOM on source pages 2022-10-24 10:47:24 -07:00
sidebar-source-code.goml rustdoc: add test case for huge logo 2022-11-05 14:26:13 -07:00
sidebar.goml Rollup merge of #103251 - GuillaumeGomez:item-decl-highlighting, r=notriddle 2022-10-20 07:58:56 +02:00
source-anchor-scroll.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
source-code-page.goml Rollup merge of #103650 - notriddle:notriddle/line-anchors, r=GuillaumeGomez 2022-11-13 16:41:44 +09:00
src-font-size.goml Add GUI test to ensure that source links can be clicked 2022-11-12 13:58:59 +01:00
target.goml Add GUI test for :target 2022-11-10 18:53:31 +01:00
theme-change.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
theme-in-history.goml Remove unneeded "rustdoc-preferred-dark-theme" setting 2022-11-01 19:47:12 +01:00
toggle-click-deadspace.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
toggle-docs-mobile.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
toggle-docs.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
toggle-implementors.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
toggled-open-implementations.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
trait-sidebar-item-order.goml Update to new browser-ui-test version 2022-11-09 17:00:25 +01:00
type-declation-overflow.goml Update to new browser-ui-test version 2022-11-09 17:00:25 +01:00
unsafe-fn.goml Improve code for unsafe-fn rustdoc GUI test 2022-10-13 16:51:04 +02:00
where-whitespace.goml Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +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 --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