|
53 | 53 | "web-ui-history", |
54 | 54 | "web-ui-health", |
55 | 55 | "web-ui-settings", |
| 56 | + "web-ui-settings-code-intelligence", |
56 | 57 | ) |
57 | 58 | """The screenshots of the `shots` stage, in the order they are taken; `--shots` picks some.""" |
58 | 59 | WAIT_MS = 60_000 |
@@ -907,17 +908,32 @@ def app_shots(app: Showcase, context: BrowserContext, variant: Variant) -> None: |
907 | 908 | page.close() |
908 | 909 |
|
909 | 910 | if app.wants("web-ui-settings"): |
910 | | - page = app.page(context, "/settings") |
911 | | - page.wait_for_selector("text=basedpyright 1.") |
912 | | - page.wait_for_selector("text=typescript-language-server") |
913 | | - page.wait_for_selector("text=jdtls 1.") |
914 | | - page.wait_for_selector("text=/kotlin-lsp \\d/") |
915 | | - page.wait_for_selector("text=gopls 0.") |
916 | | - page.wait_for_selector("text=rust-analyzer 1.") |
917 | | - page.wait_for_timeout(300) |
| 911 | + page = settings_page(app, context) |
918 | 912 | app.screenshot(page, "web-ui-settings", variant, redact=True) |
919 | 913 | page.close() |
920 | 914 |
|
| 915 | + if app.wants("web-ui-settings-code-intelligence"): |
| 916 | + page = settings_page(app, context) |
| 917 | + page.locator("fieldset", has=page.locator("legend", has_text="code intelligence")).evaluate( |
| 918 | + "element => element.scrollIntoView({block: 'start'})" |
| 919 | + ) |
| 920 | + page.wait_for_timeout(300) |
| 921 | + app.screenshot(page, "web-ui-settings-code-intelligence", variant, redact=True) |
| 922 | + page.close() |
| 923 | + |
| 924 | + |
| 925 | +def settings_page(app: Showcase, context: BrowserContext) -> Page: |
| 926 | + """The Settings view, once every language server's line shows its version.""" |
| 927 | + page = app.page(context, "/settings") |
| 928 | + page.wait_for_selector("text=basedpyright 1.") |
| 929 | + page.wait_for_selector("text=typescript-language-server") |
| 930 | + page.wait_for_selector("text=jdtls 1.") |
| 931 | + page.wait_for_selector("text=/kotlin-lsp \\d/") |
| 932 | + page.wait_for_selector("text=gopls 0.") |
| 933 | + page.wait_for_selector("text=rust-analyzer 1.") |
| 934 | + page.wait_for_timeout(300) |
| 935 | + return page |
| 936 | + |
921 | 937 |
|
922 | 938 | def tall(page: Page, variant: Variant) -> None: |
923 | 939 | """Grows the window to the whole page, up to a limit, for the long Health table.""" |
|
0 commit comments