summaryrefslogtreecommitdiffstats
path: root/test-harness.mjs
blob: 3af026c42768b32f8647bd6db4dfff4f2c0183f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
export default class extends HTMLElement {
    static name = 'x-test-harness';
    static register() {
        console.debug('Registering Element', this.name, this);
        customElements.define(this.name, this);
    }

    connectedCallback() {
        console.debug('TestHarness#connectedCallback', this);
        const passedCount = this.querySelector('.passed-count');
        const failedCount = this.querySelector('.failed-count');
        const skippedCount = this.querySelector('.skipped-count');

        [passedCount, failedCount, skippedCount].forEach(e => e.innerHTML = '0');

        const runLink = this.querySelector('a');
        runLink.onclick = e => {
            e.preventDefault();
            console.debug('runlink clicked', e);
        };
    }
}