@@ -42,7 +42,7 @@ describe('MatIcon', () => {
42
42
let fakePath : string ;
43
43
44
44
beforeEach ( async ( ( ) => {
45
- fakePath = '/fake-path' ;
45
+ fakePath = '/$ fake-path' ;
46
46
47
47
TestBed . configureTestingModule ( {
48
48
imports : [ HttpClientTestingModule , MatIconModule ] ,
@@ -630,7 +630,7 @@ describe('MatIcon', () => {
630
630
631
631
// We use a regex to match here, rather than the exact value, because different browsers
632
632
// return different quotes through `getAttribute`, while some even omit the quotes altogether.
633
- expect ( circle . getAttribute ( 'filter' ) ) . toMatch ( / ^ u r l \( [ ' " ] ? \/ f a k e - p a t h # b l u r [ ' " ] ? \) $ / ) ;
633
+ expect ( circle . getAttribute ( 'filter' ) ) . toMatch ( / ^ u r l \( [ ' " ] ? \/ \$ f a k e - p a t h # b l u r [ ' " ] ? \) $ / ) ;
634
634
635
635
tick ( ) ;
636
636
} ) ) ;
@@ -651,17 +651,18 @@ describe('MatIcon', () => {
651
651
fixture . detectChanges ( ) ;
652
652
let circle = fixture . nativeElement . querySelector ( 'mat-icon svg circle' ) ;
653
653
654
- expect ( circle . getAttribute ( 'filter' ) ) . toMatch ( / ^ u r l \( [ ' " ] ? \/ f a k e - p a t h # b l u r [ ' " ] ? \) $ / ) ;
654
+ expect ( circle . getAttribute ( 'filter' ) ) . toMatch ( / ^ u r l \( [ ' " ] ? \/ \$ f a k e - p a t h # b l u r [ ' " ] ? \) $ / ) ;
655
655
tick ( ) ;
656
656
fixture . destroy ( ) ;
657
657
658
- fakePath = '/another-fake-path' ;
658
+ fakePath = '/$ another-fake-path' ;
659
659
fixture = TestBed . createComponent ( IconFromSvgName ) ;
660
660
fixture . componentInstance . iconName = 'fido' ;
661
661
fixture . detectChanges ( ) ;
662
662
circle = fixture . nativeElement . querySelector ( 'mat-icon svg circle' ) ;
663
663
664
- expect ( circle . getAttribute ( 'filter' ) ) . toMatch ( / ^ u r l \( [ ' " ] ? \/ a n o t h e r - f a k e - p a t h # b l u r [ ' " ] ? \) $ / ) ;
664
+ expect ( circle . getAttribute ( 'filter' ) )
665
+ . toMatch ( / ^ u r l \( [ ' " ] ? \/ \$ a n o t h e r - f a k e - p a t h # b l u r [ ' " ] ? \) $ / ) ;
665
666
tick ( ) ;
666
667
} ) ) ;
667
668
@@ -683,13 +684,13 @@ describe('MatIcon', () => {
683
684
684
685
// We use a regex to match here, rather than the exact value, because different browsers
685
686
// return different quotes through `getAttribute`, while some even omit the quotes altogether.
686
- expect ( circle . getAttribute ( 'filter' ) ) . toMatch ( / ^ u r l \( [ ' " ] ? \/ f a k e - p a t h # b l u r [ ' " ] ? \) $ / ) ;
687
+ expect ( circle . getAttribute ( 'filter' ) ) . toMatch ( / ^ u r l \( [ ' " ] ? \/ \$ f a k e - p a t h # b l u r [ ' " ] ? \) $ / ) ;
687
688
tick ( ) ;
688
689
689
- fakePath = '/different-path' ;
690
+ fakePath = '/$ different-path' ;
690
691
fixture . detectChanges ( ) ;
691
692
692
- expect ( circle . getAttribute ( 'filter' ) ) . toMatch ( / ^ u r l \( [ ' " ] ? \/ d i f f e r e n t - p a t h # b l u r [ ' " ] ? \) $ / ) ;
693
+ expect ( circle . getAttribute ( 'filter' ) ) . toMatch ( / ^ u r l \( [ ' " ] ? \/ \$ d i f f e r e n t - p a t h # b l u r [ ' " ] ? \) $ / ) ;
693
694
} ) ) ;
694
695
695
696
} ) ;
0 commit comments