element-vir - v26.14.0
    Preparing search index...

    Variable testIdSelectorConst

    testIdSelector: (this: void, attributeValue: string) => string = attributeSelector

    Construct an attribute selector for the given test id.

    Type Declaration

      • (this: void, attributeValue: string): string
      • Creates a string for use with the querySelector API that selects this directive's attribute set to the given attributeValue.

        Parameters

        • this: void
        • attributeValue: string

        Returns string

    import {html, selectTestId} from 'element-vir';
    import {testWeb} from '@augment-vir/test';
    import {assert} from '@augment-vir/assert';

    const instance = testWeb.render(html`
    <${MyElement}></${MyElement}>
    `);
    assert.instanceOf(instance, MyElement);
    instance.shadowRoot.querySelector(selectTestId('my-test'));