about summary refs log tree commit diff
path: root/tests/rustdoc-gui
AgeCommit message (Collapse)AuthorLines
2024-08-06rustdoc-search: account for numeric disambiguators on implsMichael Howell-1/+40
Fixes #128676
2024-08-05Prevent clicking on a link or on a button to toggle the code example buttons ↵Guillaume Gomez-0/+6
visibility
2024-08-05Update GUI tests for code example buttonsGuillaume Gomez-56/+71
2024-07-30Rollup merge of #128339 - GuillaumeGomez:click-code-example, r=notriddleMatthias Krüger-0/+21
[rustdoc] Make the buttons remain when code example is clicked Follow-up of https://github.com/rust-lang/rust/pull/125779. One current issue we have with "run" button and the newly added copy code button is that if you're on mobile devices, you can't use them. I took a look at how `mdbook` is handling it and when you click on a code example, they show the buttons. I think it's a really good idea as if you want to copy the code on your mobile device, you will click on it, showing the buttons. Feature can be tested [here](https://rustdoc.crud.net/imperio/click-code-example/foo/struct.Bar.html). r? `@notriddle`
2024-07-29Add rustdoc GUI test to check click on code examplesGuillaume Gomez-0/+21
2024-07-29rustdoc: properly handle path wrappingMichael Howell-1/+2
2024-07-29rustdoc: use `<wbr>`-tolerant function to check text contentsMichael Howell-33/+36
2024-07-28Rollup merge of #125779 - GuillaumeGomez:copy-code, r=rustdoc-teamGuillaume Gomez-4/+58
[rustdoc] Add copy code feature This PR adds a "copy code" to code blocks. Since this is a JS only feature, the HTML is generated with JS when the user hovers the code block to prevent generating DOM unless needed. Two things to note: 1. I voluntarily kept the current behaviour of the run button (only when hovering a code block with a mouse) so it doesn't do anything on mobile. I plan to send a follow-up where the buttons would "expandable" or something. Still need to think which approach would be the best. 2. I used a picture and not text like the run button to remain consistent with the "copy path" button. I'd also prefer for the run button to use a picture (like what is used in mdbook) but again, that's something to be discussed later on. The rendering looks like this: ![Screenshot from 2024-06-03 21-29-48](https://github.com/rust-lang/rust/assets/3050060/a0b18f9c-b3dd-4a65-89a7-5a7a303b5c2b) ![Screenshot from 2024-06-03 21-30-20](https://github.com/rust-lang/rust/assets/3050060/b3b084ff-2716-4160-820b-d4774681a961) It can be tested [here](https://guillaume-gomez.fr/rustdoc/bar/struct.Bar.html) (without the run button) and [here](https://guillaume-gomez.fr/rustdoc/foo/struct.Bar.html) (with the run button). Fixes #86851. r? ``@notriddle``
2024-07-27Add rustdoc GUI test to check title with and without searchGuillaume Gomez-0/+24
2024-07-22Add regression test for items list size (#128023)Guillaume Gomez-0/+31
2024-07-21Rollup merge of #128014 - GuillaumeGomez:stab-in-doc-blocks, r=notriddleJubilee-6/+15
Fix stab display in doc blocks Went across this bug randomly: ![Screenshot from 2024-07-20 22-09-49](https://github.com/user-attachments/assets/89fdf427-b00e-4fcb-9d57-078bcb1bacd9) With the fixed CSS: ![Screenshot from 2024-07-20 22-10-14](https://github.com/user-attachments/assets/eda9a1a6-6a12-408f-bd3a-25bb3397d163) r? ```@notriddle```
2024-07-21Update `source-code-page-code-scroll.goml` GUI testGuillaume Gomez-2/+2
2024-07-21Add regression test for stab display in doc blocksGuillaume Gomez-4/+13
2024-07-19Add GUI test for trait bounds displayGuillaume Gomez-0/+41
2024-07-19Reduce width to ensure that the name is wider and thus still triggering the ↵Guillaume Gomez-9/+13
scroll
2024-07-19Rollup merge of #127932 - notriddle:notriddle/current, r=GuillaumeGomezMatthias Krüger-0/+4
rustdoc: fix `current` class on sidebar modnav | Before | After | | -- | -- | | ![image](https://github.com/user-attachments/assets/35866be8-5a58-41eb-9169-b2bb403fe7cd) | ![image](https://github.com/user-attachments/assets/89b087ea-82bf-49f5-9c87-20162880eb32)
2024-07-18rustdoc: fix `current` class on sidebar modnavMichael Howell-0/+4
2024-07-18Add test for size of items in the items listGuillaume Gomez-1/+6
2024-07-18Unify UI between code block buttons and top buttonsGuillaume Gomez-2/+2
2024-07-18Make "copy code" button the same size as the "copy path" buttonGuillaume Gomez-2/+8
2024-07-18Add rustdoc GUI test for new copy code featureGuillaume Gomez-0/+48
2024-07-16rustdoc: add test cases for mile wide barMichael Howell-0/+16
2024-07-15rustdoc: make sidebar highlight cover whole click targetMichael Howell-2/+2
2024-07-15Add tests for new toggle on deref blocksGuillaume Gomez-0/+40
2024-07-01rustdoc: click target for sidebar items flush leftMichael Howell-1/+2
2024-06-29Don't call `switch-theme` functionGuillaume Gomez-2/+3
2024-06-29Add back `help-page.goml` rustdoc GUI testGuillaume Gomez-0/+69
2024-06-27Update browser-ui-test version to `0.18.0`Guillaume Gomez-2/+6
2024-06-14Remove failing GUI test to stop blocking CI until it is fixedGuillaume Gomez-69/+0
2024-05-07Rollup merge of #124738 - notriddle:notriddle/search-form-js, r=GuillaumeGomezMatthias Krüger-2/+2
rustdoc: dedup search form HTML This change constructs the search form HTML using JavaScript, instead of plain HTML. It uses a custom element because - the [parser]'s insert algorithm runs the connected callback synchronously, so we won't get layout jank - it requires very little HTML, so it's a real win in size [parser]: https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token This shrinks the standard library by about 60MiB, by my test. There should be no visible changes. Just use less disk space.
2024-05-05Add GUI regression test for setting's cog colorGuillaume Gomez-1/+31
2024-05-05Fix bad color for setting cog in ayu themeGuillaume Gomez-0/+1
2024-05-05rustdoc: dedup search form HTMLMichael Howell-2/+2
This change constructs the search form HTML using JavaScript, instead of plain HTML. It uses a custom element because - the [parser]'s insert algorithm runs the connected callback synchronously, so we won't get layout jank - it requires very little HTML, so it's a real win in size [parser]: https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token This shrinks the standard library by about 60MiB, by my test.
2024-04-23Rollup merge of #124197 - GuillaumeGomez:move-duplicated-code, r=notriddleMatthias Krüger-119/+89
Move duplicated code in functions in `tests/rustdoc-gui/notable-trait.goml` It also allowed me to add some new common test like: ``` assert-position: ( "//*[`@class='tooltip` popover']", {"x": |popover_x|} ) ``` r? `@notriddle`
2024-04-20Move duplicated code in functions in `tests/rustdoc-gui/notable-trait.goml`Guillaume Gomez-119/+89
2024-04-17Add GUI test for copy path buttonGuillaume Gomez-0/+15
2024-04-09rustdoc: update test casesMichael Howell-4/+4
2024-04-08Make theme switching closer to realityGuillaume Gomez-20/+34
2024-04-06Move `check-container-color`'s code into `check-search-color` functionGuillaume Gomez-31/+19
2024-04-06Move duplicated code into `check-search-color` functionGuillaume Gomez-218/+98
2024-04-06Move more common code into a function in ↵Guillaume Gomez-30/+44
`tests/rustdoc-gui/search-result-color.goml`
2024-04-06Move `search-result-color.goml` common parts into a functionGuillaume Gomez-69/+52
2024-04-05Use `include` command to reduce code duplicationGuillaume Gomez-150/+112
2024-04-04Add regression test to ensure that even if JS is enabled but not working, a ↵Guillaume Gomez-0/+9
theme will still get applied
2024-04-03Add GUI test to ensure there is always a theme applied if JS is disabledGuillaume Gomez-0/+5
2024-04-02Remove redundant code commentsGuillaume Gomez-72/+72
2024-04-01Update to new browser-ui-test versionGuillaume Gomez-248/+266
2024-03-27chore: fix some commentsxiaoxiangxianzi-1/+1
Signed-off-by: xiaoxiangxianzi <zhaoyizheng@outlook.com>
2024-02-22[AUTO_GENERATED] Migrate compiletest to use `ui_test`-style `//@` directives许杰友 Jieyou Xu (Joe)-4/+4
2024-01-31Add regression test for #120471 to ensure that long crate name are handled ↵Guillaume Gomez-2/+24
as expected on mobile