Skip to content

Commit 3ff4644

Browse files
committed
chore(showcase): add the code intelligence Settings shot for cstudy 0.53
1 parent 6fd31f5 commit 3ff4644

6 files changed

Lines changed: 25 additions & 8 deletions
60.8 KB
Loading
61.1 KB
Loading
58.8 KB
Loading
58.3 KB
Loading

‎tools/showcase/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ Desktop images are 1440 by 900, the phone ones 390 wide at 2x. A name is `<name>
7373
| `web-ui-history` | A past attempt's code, open read-only from the Problem view's history |
7474
| `web-ui-health` | The Health view, with the code intelligence rows |
7575
| `web-ui-settings` | Settings, with both toggles and the state of each language |
76+
| `web-ui-settings-code-intelligence` | Settings scrolled to the Code intelligence block, with each language server and its version |
7677
| `web-ui-mock` | A mock in progress |
7778

7879
Two animations, in the light theme at desktop width unless `--video-theme` says otherwise, each as `<name>.gif`, `<name>.mp4` and `<name>-poster.png` (the first frame):

‎tools/showcase/showcase.py‎

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
"web-ui-history",
5454
"web-ui-health",
5555
"web-ui-settings",
56+
"web-ui-settings-code-intelligence",
5657
)
5758
"""The screenshots of the `shots` stage, in the order they are taken; `--shots` picks some."""
5859
WAIT_MS = 60_000
@@ -907,17 +908,32 @@ def app_shots(app: Showcase, context: BrowserContext, variant: Variant) -> None:
907908
page.close()
908909

909910
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)
918912
app.screenshot(page, "web-ui-settings", variant, redact=True)
919913
page.close()
920914

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+
921937

922938
def tall(page: Page, variant: Variant) -> None:
923939
"""Grows the window to the whole page, up to a limit, for the long Health table."""

0 commit comments

Comments
 (0)