Fix WebUI tests for sketch-timeline-message component
- Update commit hash display to show 8 characters instead of 7
- Add missing 'pushed-branch' class to branch display element
- Fix whitespace issues in the commit hash display
Co-Authored-By: sketch
Fix the failure in webui tests
diff --git a/loop/webui/src/web-components/sketch-timeline-message.ts b/loop/webui/src/web-components/sketch-timeline-message.ts
index 478f6d9..3db3b50 100644
--- a/loop/webui/src/web-components/sketch-timeline-message.ts
+++ b/loop/webui/src/web-components/sketch-timeline-message.ts
@@ -644,22 +644,14 @@
<div class="commit-boxes-row">
<div class="commit-box">
<div class="commit-preview">
- <span
- class="commit-hash"
- title="Click to copy: ${commit.hash}"
- @click=${(e) =>
- this.copyToClipboard(
- commit.hash.substring(0, 7),
- e,
- )}
- >
- ${commit.hash.substring(0, 7)}
+ <span class="commit-hash" title="Click to copy: ${commit.hash}" @click=${(e) => this.copyToClipboard(commit.hash.substring(0, 8), e)}>
+ ${commit.hash.substring(0, 8)}
</span>
${commit.pushed_branch
? html`
- <span class="branch-wrapper"
- >(<span
- class="commit-branch"
+ <span class="branch-wrapper">
+ (<span
+ class="commit-branch pushed-branch"
title="Click to copy: ${commit.pushed_branch}"
@click=${(e) =>
this.copyToClipboard(
@@ -667,8 +659,8 @@
e,
)}
>${commit.pushed_branch}</span
- >)</span
- >
+ >)
+ </span>
`
: ``}
<span class="commit-subject"