Merge "Specify order in the related changes tooltip"
diff --git a/polygerrit-ui/app/elements/checks/gr-checks-results.ts b/polygerrit-ui/app/elements/checks/gr-checks-results.ts
index 65fdb93..6cff5ab 100644
--- a/polygerrit-ui/app/elements/checks/gr-checks-results.ts
+++ b/polygerrit-ui/app/elements/checks/gr-checks-results.ts
@@ -489,7 +489,7 @@
return html`
<!-- The is for being able to shrink a tiny amount without
the text itself getting shrunk with an ellipsis. -->
- <div class="summary" @click=${this.toggleExpanded} title=${text}>
+ <div class="summary" @click=${this.toggleExpandedClick} title=${text}>
${text}
</div>
`;
diff --git a/polygerrit-ui/app/elements/checks/gr-checks-results_test.ts b/polygerrit-ui/app/elements/checks/gr-checks-results_test.ts
index a349b58..22c2940 100644
--- a/polygerrit-ui/app/elements/checks/gr-checks-results_test.ts
+++ b/polygerrit-ui/app/elements/checks/gr-checks-results_test.ts
@@ -123,6 +123,22 @@
`
);
});
+
+ test('click summary, toggle expand', async () => {
+ element.isExpandable = true;
+ await element.updateComplete;
+ assert.isFalse(element.isExpanded);
+
+ const summaryDiv: HTMLElement =
+ element.shadowRoot!.querySelector('.summary')!;
+ summaryDiv.click();
+ await element.updateComplete;
+ assert.isTrue(element.isExpanded);
+
+ summaryDiv.click();
+ await element.updateComplete;
+ assert.isFalse(element.isExpanded);
+ });
});
suite('gr-checks-results test', () => {