• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atinc / ngx-tethys / ba7e05e2-37c0-44c6-8725-6f617aa0d43e

pending completion
ba7e05e2-37c0-44c6-8725-6f617aa0d43e

Pull #2756

circleci

huanhuanwa
test(color-picker): add test #INFR-8673
Pull Request #2756: feat(color-picker): add popoverRef param when panel open and close #INFR-8673

187 of 6315 branches covered (2.96%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 1 file covered. (100.0%)

2645 of 13660 relevant lines covered (19.36%)

83.2 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

13.64
/src/breadcrumb/breadcrumb-item.component.ts
1
import { Component, ChangeDetectionStrategy, AfterViewInit, ElementRef, Renderer2 } from '@angular/core';
2
import { ThyIconComponent } from 'ngx-tethys/icon';
3

4
/**
5
 * 面包屑 Item 组件
6
 * @name thy-breadcrumb-item,[thyBreadcrumbItem]
7
 * @order 20
8
 */
9
@Component({
1✔
10
    selector: 'thy-breadcrumb-item,[thyBreadcrumbItem]',
11
    template: '<ng-content></ng-content><thy-icon class="separator-icon" thyIconName="angle-right"></thy-icon>',
×
12
    exportAs: 'ThyBreadcrumbItem',
×
13
    changeDetection: ChangeDetectionStrategy.OnPush,
14
    host: {
15
        class: 'thy-breadcrumb-item'
×
16
    },
×
17
    standalone: true,
×
18
    imports: [ThyIconComponent]
×
19
})
20
export class ThyBreadcrumbItemComponent implements AfterViewInit {
21
    constructor(private renderer: Renderer2, private elementRef: ElementRef) {}
22

×
23
    ngAfterViewInit() {
×
24
        this.wrapSpanForText(this.elementRef.nativeElement.childNodes);
×
25
        const link: HTMLElement = this.elementRef.nativeElement.querySelector('a');
×
26
        if (link && link.childNodes) {
×
27
            this.wrapSpanForText(link.childNodes);
×
28
        }
×
29
    }
30

31
    private wrapSpanForText(nodes: NodeList): void {
32
        nodes.forEach(node => {
1✔
33
            if (node.nodeName === '#text') {
34
                const span = this.renderer.createElement('span');
35
                const parent = this.renderer.parentNode(node);
36
                this.renderer.addClass(span, 'thy-wrap-span');
37
                this.renderer.insertBefore(parent, span, node);
1✔
38
                this.renderer.appendChild(span, node);
39
            }
40
        });
41
    }
42
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc