MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / assertNodeTextContent

Function assertNodeTextContent

front_end/testing/DOMHelpers.ts:297–301  ·  view source on GitHub ↗
(component: NodeText.NodeText.NodeText, expectedContent: string)

Source from the content-addressed store, hash-verified

295}
296
297export function assertNodeTextContent(component: NodeText.NodeText.NodeText, expectedContent: string) {
298 assert.isNotNull(component.shadowRoot);
299 const content = Array.from(component.shadowRoot.querySelectorAll('span')).map(span => span.textContent).join('');
300 assert.strictEqual(content, expectedContent);
301}
302
303export function querySelectorErrorOnMissing<T extends HTMLElement = HTMLElement>(
304 parent: HTMLElement, selector: string): T {

Callers 2

assertContainerContentFunction · 0.85
NodeText.test.tsFile · 0.85

Calls 4

querySelectorAllMethod · 0.65
joinMethod · 0.45
mapMethod · 0.45
fromMethod · 0.45

Tested by 1

assertContainerContentFunction · 0.68