Skip to content

Commit 8b454d5

Browse files
committed
Code refactor
1 parent 9c8c648 commit 8b454d5

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

packages/app/src/components/sidebar/test-suite.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Element } from '@core/element'
22
import { html, css, nothing } from 'lit'
33
import { customElement, property } from 'lit/decorators.js'
4+
import { viewSource } from '../../utils/TestRunner.js'
45

56
import { CollapseableEntry } from './collapseableEntry.js'
67

@@ -82,17 +83,6 @@ export class ExplorerTestEntry extends CollapseableEntry {
8283
this.requestUpdate()
8384
}
8485

85-
#viewSource() {
86-
if (!this.callSource) {
87-
return
88-
}
89-
window.dispatchEvent(
90-
new CustomEvent('app-source-highlight', {
91-
detail: this.callSource
92-
})
93-
)
94-
}
95-
9686
get hasPassed() {
9787
return this.state === TestState.PASSED
9888
}
@@ -181,7 +171,7 @@ export class ExplorerTestEntry extends CollapseableEntry {
181171
`}
182172
<button
183173
class="p-1 rounded hover:bg-toolbarHoverBackground my-1 group"
184-
@click="${() => this.#viewSource()}"
174+
@click="${() => viewSource(this.callSource)}"
185175
>
186176
<icon-mdi-eye class="group-hover:text-chartsYellow"></icon-mdi-eye>
187177
</button>

0 commit comments

Comments
 (0)