From b25c2245b6c0ff29bc2268a2d9bc2e59a1043c36 Mon Sep 17 00:00:00 2001 From: dawn Date: Sun, 11 Oct 2026 23:19:40 +0300 Subject: [PATCH] web: add test ids to components Signed-off-by: dawn --- web/src/lib/components/comment/Comment.svelte | 5 +++-- web/src/lib/components/comment/CommentCard.svelte | 9 +++++++-- .../lib/components/comment/CommentEditor.svelte | 8 +++++++- .../lib/components/import/ConnectAccount.svelte | 2 ++ web/src/lib/components/import/MethodPicker.svelte | 1 + web/src/lib/components/import/RepoConfig.svelte | 1 + web/src/lib/components/import/RepoRow.svelte | 2 ++ .../lib/components/import/StartedBanner.svelte | 4 +++- .../lib/components/import/UrlRepoImporter.svelte | 6 ++++-- .../notifications/NotificationBell.svelte | 2 ++ .../notifications/NotificationItem.svelte | 9 +++++++-- .../lib/components/profile/FollowButton.svelte | 4 ++++ web/src/lib/components/profile/ProfileBio.svelte | 2 +- .../lib/components/profile/ProfileEditForm.svelte | 2 ++ .../components/profile/ProfileSocialLinks.svelte | 4 ++++ .../components/profile/UserProfileChrome.svelte | 2 ++ web/src/lib/components/profile/VouchButton.svelte | 5 ++++- web/src/lib/components/reaction/Reaction.svelte | 2 ++ .../lib/components/reaction/ReactionPicker.svelte | 1 + web/src/lib/components/repo/BlobView.svelte | 6 +++++- web/src/lib/components/repo/CloneDropdown.svelte | 4 ++++ web/src/lib/components/repo/DiffFileHeader.svelte | 6 +++++- web/src/lib/components/repo/DiffView.svelte | 12 ++++++++++-- web/src/lib/components/repo/EmptyRepo.svelte | 8 +++++--- web/src/lib/components/repo/PierreFile.svelte | 7 ++++++- web/src/lib/components/repo/Readme.svelte | 6 +++++- web/src/lib/components/repo/RepoHeader.svelte | 4 ++-- web/src/lib/components/repo/ServicePicker.svelte | 12 +++++++++--- web/src/lib/components/repo/StarButton.svelte | 2 ++ .../lib/components/repo/SubscribeButton.svelte | 2 ++ web/src/lib/components/repo/TagCard.svelte | 10 ++++++++-- web/src/lib/components/repo/TopicList.svelte | 6 ++++-- .../components/repo/issues/IssueThreadView.svelte | 4 ++++ .../repo/pipelines/PipelineWorkflows.svelte | 6 +++++- .../components/repo/pulls/PullCommitRow.svelte | 2 ++ .../components/repo/pulls/PullDiscussion.svelte | 8 ++++++-- .../repo/pulls/PullReviewComment.svelte | 8 +++++++- .../repo/pulls/PullReviewCommentForm.svelte | 1 + web/src/lib/components/repo/tickets/Ticket.svelte | 4 +++- .../lib/components/repo/tickets/TicketBody.svelte | 11 +++++++++-- .../lib/components/repo/tickets/TicketCard.svelte | 2 +- .../repo/tickets/TicketCardContent.svelte | 6 +++++- .../components/repo/tickets/TicketInfoBar.svelte | 12 +++++++++--- .../repo/tickets/TicketStatePill.svelte | 2 +- web/src/lib/components/settings/AvatarForm.svelte | 2 ++ web/src/lib/components/settings/DrillDown.svelte | 11 +++++++++-- .../settings/ProfileSettingsForm.svelte | 2 ++ .../components/settings/RepoGeneralForm.svelte | 3 ++- .../lib/components/settings/SettingsBlock.svelte | 8 +++++++- .../lib/components/settings/SettingsEmpty.svelte | 1 + .../lib/components/settings/SettingsHeader.svelte | 11 +++++++++-- .../lib/components/settings/SettingsRow.svelte | 4 +++- .../components/settings/SettingsSaveBar.svelte | 5 ++++- .../components/settings/SettingsSection.svelte | 11 +++++++++-- .../components/settings/VerifyEmailCard.svelte | 14 ++++++++++++-- .../lib/components/settings/tabs/KeysTab.svelte | 2 ++ .../lib/components/settings/tabs/KnotsTab.svelte | 2 ++ .../settings/tabs/NotificationsTab.svelte | 8 +++++++- .../components/settings/tabs/SpindlesTab.svelte | 1 + web/src/lib/components/shell/Topbar.svelte | 9 ++++++--- web/src/lib/components/strings/StringForm.svelte | 5 ++++- .../lib/components/strings/StringHeader.svelte | 2 +- web/src/lib/components/welcome/ProfileStep.svelte | 1 + web/src/lib/components/welcome/StepHeader.svelte | 2 +- web/src/routes/+error.svelte | 4 +++- .../[version]/[[range]]/PullViewPage.svelte | 6 +++++- .../[handle]/[repo]/settings/access/+page.svelte | 15 +++++++++++++-- .../[handle]/[repo]/settings/hooks/+page.svelte | 11 +++++++++-- .../[repo]/settings/labels/new/+page.svelte | 1 + .../[repo]/settings/pipelines/+page.svelte | 7 ++++++- .../[handle]/[repo]/settings/sites/+page.svelte | 4 +++- web/src/routes/invite/+page.svelte | 12 ++++++++++-- web/src/routes/login/+page.svelte | 4 ++-- .../settings/profile/deactivate/+page.svelte | 4 +++- .../routes/settings/profile/delete/+page.svelte | 7 ++++++- .../routes/settings/profile/password/+page.svelte | 4 +++- web/src/routes/signup/+page.svelte | 10 ++++++++-- 77 files changed, 336 insertions(+), 79 deletions(-) diff --git a/web/src/lib/components/comment/Comment.svelte b/web/src/lib/components/comment/Comment.svelte index 18c8fa2a7..119e281d1 100644 --- a/web/src/lib/components/comment/Comment.svelte +++ b/web/src/lib/components/comment/Comment.svelte @@ -81,7 +81,7 @@ {#if deleted} -
This comment was deleted.
+
This comment was deleted.
{:else}
@@ -104,6 +104,7 @@
{@render editor()}
{:else if bodyHtml}
{:else if body} -
{body}
+
{body}
{/if} {#if !editor} -
+
{#if thread.replies.length} -
+
{#each thread.replies as reply, i (reply.uri)} {#snippet replyEditor()} {@render commentEditor(reply, thread.self.uri, thread.self.cid)} diff --git a/web/src/lib/components/comment/CommentEditor.svelte b/web/src/lib/components/comment/CommentEditor.svelte index 4366def3c..b2a1d05e7 100644 --- a/web/src/lib/components/comment/CommentEditor.svelte +++ b/web/src/lib/components/comment/CommentEditor.svelte @@ -71,6 +71,7 @@ }: Props = $props(); const rkey = $derived(uri && rkeyFromUri(uri)); + const mode = $derived(uri ? "edit" : replyToUri ? "reply" : "new"); const auth = getAuth(); const accounts = $derived(auth?.accounts ?? []); @@ -158,7 +159,12 @@ {/snippet} -
+
- +

{#if current} You {current.kind === "vouch" ? "vouched for" : "denounced"} @@ -212,6 +214,7 @@ {@const active = choice === option.value}

{:else if blob.kind === "markup" && view === "rendered" && blob.renderedHtml !== null} -
+
{@html blob.renderedHtml}
diff --git a/web/src/lib/components/repo/CloneDropdown.svelte b/web/src/lib/components/repo/CloneDropdown.svelte index 25e879e2d..5ef0942c4 100644 --- a/web/src/lib/components/repo/CloneDropdown.svelte +++ b/web/src/lib/components/repo/CloneDropdown.svelte @@ -83,6 +83,8 @@ class="flex items-stretch divide-x divide-border-default rounded-md border border-border-default" > {value} @@ -104,6 +106,8 @@
{#each [{ format: "tar.gz" }, { format: "zip" }] as const as archive (archive.format)} + {cut === -1 ? name : name.slice(0, cut)} {#if cut !== -1} {name.slice(cut)} diff --git a/web/src/lib/components/repo/DiffView.svelte b/web/src/lib/components/repo/DiffView.svelte index 212cdecca..3db4abb0c 100644 --- a/web/src/lib/components/repo/DiffView.svelte +++ b/web/src/lib/components/repo/DiffView.svelte @@ -241,7 +241,11 @@
{#if diff} - + {diff.files.length} changed {plural( diff.files.length, "file", @@ -291,7 +295,11 @@ {/if} {#if diff} - + {diff.files.length} changed {plural( diff.files.length, "file", diff --git a/web/src/lib/components/repo/EmptyRepo.svelte b/web/src/lib/components/repo/EmptyRepo.svelte index af3e01a72..9ba74094c 100644 --- a/web/src/lib/components/repo/EmptyRepo.svelte +++ b/web/src/lib/components/repo/EmptyRepo.svelte @@ -80,7 +80,7 @@
-

This is an empty repository.

+

This is an empty repository.

…create a new repository on the command line @@ -112,7 +112,7 @@

-

This is an empty repository. To get started:

+

This is an empty repository. To get started:

{@render bullet(1)}First, generate a new {/if} {:else} -

This is an empty repository.

+

+ This is an empty repository. +

{/if} diff --git a/web/src/lib/components/repo/PierreFile.svelte b/web/src/lib/components/repo/PierreFile.svelte index 6048acf8b..fdcd0940e 100644 --- a/web/src/lib/components/repo/PierreFile.svelte +++ b/web/src/lib/components/repo/PierreFile.svelte @@ -84,7 +84,12 @@
- + {#if prerenderedHTML} diff --git a/web/src/lib/components/repo/Readme.svelte b/web/src/lib/components/repo/Readme.svelte index 94f758e10..109f6c206 100644 --- a/web/src/lib/components/repo/Readme.svelte +++ b/web/src/lib/components/repo/Readme.svelte @@ -20,7 +20,11 @@
{#if html} -
+
{@html html}
diff --git a/web/src/lib/components/repo/RepoHeader.svelte b/web/src/lib/components/repo/RepoHeader.svelte index 24861f813..dafa352bd 100644 --- a/web/src/lib/components/repo/RepoHeader.svelte +++ b/web/src/lib/components/repo/RepoHeader.svelte @@ -91,7 +91,7 @@ class="flex flex-wrap items-center gap-x-md gap-y-2xs typography-paragraph-small text-foreground-muted" > {#if repo.description} - {repo.description} + {repo.description} {/if} @@ -99,7 +99,7 @@ {#if resolvedSource}
{#if none !== undefined}
- {none} + {none}
{/if} {#await hosts} @@ -49,7 +49,7 @@ {:then list} {#each list as host (host)}
- + {#if host === official} Hosted by Tangled. ({host}) {:else} @@ -71,7 +71,13 @@ {/await}
- + {#if changeState.error} {changeState.error} {#if subToggling} {subscribed ? "Unsubscribing..." : "Subscribing..."} diff --git a/web/src/lib/components/repo/pipelines/PipelineWorkflows.svelte b/web/src/lib/components/repo/pipelines/PipelineWorkflows.svelte index 360df5c3a..924159b0c 100644 --- a/web/src/lib/components/repo/pipelines/PipelineWorkflows.svelte +++ b/web/src/lib/components/repo/pipelines/PipelineWorkflows.svelte @@ -152,7 +152,11 @@ - {workflow.name} + {workflow.name} {workflow.duration > 0 diff --git a/web/src/lib/components/repo/pulls/PullCommitRow.svelte b/web/src/lib/components/repo/pulls/PullCommitRow.svelte index bea1a86ec..c0b96b85b 100644 --- a/web/src/lib/components/repo/pulls/PullCommitRow.svelte +++ b/web/src/lib/components/repo/pulls/PullCommitRow.svelte @@ -66,6 +66,8 @@ > {#if onclick}