fix(aio): remove title attribute from CodeExampleComponent
This was causing browser to add an unwanted tooltip that appeared when the user hovers over the code. See #17524
This commit is contained in:

committed by
Pete Bacon Darwin

parent
36faba1aab
commit
7d0f2cd51e
@ -65,6 +65,13 @@ describe('CodeExampleComponent', () => {
|
||||
expect(actual).toBe('Great Example');
|
||||
});
|
||||
|
||||
it('should remove the `title` attribute after initialisation', () => {
|
||||
TestBed.overrideComponent(HostComponent, {
|
||||
set: {template: '<code-example title="Great Example"></code-example>'}});
|
||||
createComponent(oneLineCode);
|
||||
expect(codeExampleDe.nativeElement.getAttribute('title')).toEqual(null);
|
||||
});
|
||||
|
||||
it('should pass hideCopy to CodeComonent', () => {
|
||||
TestBed.overrideComponent(HostComponent, {
|
||||
set: {template: '<code-example hideCopy="true"></code-example>'}});
|
||||
|
Reference in New Issue
Block a user