Skip to content

Commit c1b4b68

Browse files
OrKoNDevtools-frontend LUCI CQ
authored andcommitted
[ConsoleInsights] Disable animations for screenshot tests
Bug: 401489541 Change-Id: I10af307201cce99f13601d57b19ffb0cce1c0aac Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6341554 Reviewed-by: Wolfgang Beyer <[email protected]> Commit-Queue: Alex Rudenko <[email protected]>
1 parent 2c28907 commit c1b4b68

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

front_end/panels/explain/components/ConsoleInsight.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ export class ConsoleInsight extends HTMLElement {
258258

259259
readonly #shadow = this.attachShadow({mode: 'open'});
260260

261+
disableAnimations = false;
262+
261263
#promptBuilder: PublicPromptBuilder;
262264
#aidaClient: PublicAidaClient;
263265
#renderer: MarkdownView.MarkdownView.MarkdownInsightRenderer;
@@ -772,7 +774,7 @@ export class ConsoleInsight extends HTMLElement {
772774
<main jslog=${jslog}>
773775
${
774776
this.#state.validMarkdown ? html`<devtools-markdown-view
775-
.data=${{tokens: this.#state.tokens, renderer: this.#renderer, animationEnabled: true} as MarkdownView.MarkdownView.MarkdownViewData}>
777+
.data=${{tokens: this.#state.tokens, renderer: this.#renderer, animationEnabled: !this.disableAnimations} as MarkdownView.MarkdownView.MarkdownViewData}>
776778
</devtools-markdown-view>`: this.#state.explanation
777779
}
778780
${this.#state.timedOut ? html`<p class="error-message">${i18nString(UIStrings.timedOut)}</p>` : Lit.nothing}

front_end/ui/components/docs/console_insight/static.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,5 @@ Images: ![https://example.com](https://example.com)
8080
},
8181

8282
Host.AidaClient.AidaAccessPreconditions.AVAILABLE);
83+
component.disableAnimations = true;
8384
document.getElementById('container')?.appendChild(component);

0 commit comments

Comments
 (0)