refactor(ivy): remove all old styling code prior to refactor (#31193)
In the previous patch () all the existing styling code was turned off in favor of using the new refactored ivy styling code. This patch is a follow up patch to that and removes all old, unused styling code from the render3 directory. PR Close #31193
This commit is contained in:

committed by
Kara Erickson

parent
0e68c7edf9
commit
f50dede8f7
@ -555,6 +555,35 @@ describe('styling', () => {
|
||||
expect(capturedMyClassBindingValue !).toEqual('foo');
|
||||
});
|
||||
|
||||
onlyInIvy('only ivy balances styling across directives and component host bindings')
|
||||
.it('should allow multiple directives to set dynamic and static classes independent of one another',
|
||||
() => {
|
||||
@Component({
|
||||
template: `
|
||||
<div dir-one dir-two></div>
|
||||
`
|
||||
})
|
||||
class Cmp {
|
||||
}
|
||||
|
||||
@Directive({selector: '[dir-one]', host: {'[class.dir-one]': 'dirOneExp'}})
|
||||
class DirOne {
|
||||
dirOneExp = true;
|
||||
}
|
||||
|
||||
@Directive({selector: '[dir-two]', host: {'class': 'dir-two'}})
|
||||
class DirTwo {
|
||||
}
|
||||
|
||||
TestBed.configureTestingModule({declarations: [Cmp, DirOne, DirTwo]});
|
||||
const fixture = TestBed.createComponent(Cmp);
|
||||
fixture.detectChanges();
|
||||
|
||||
const element = fixture.nativeElement.querySelector('div');
|
||||
expect(element.classList.contains('dir-one')).toBeTruthy();
|
||||
expect(element.classList.contains('dir-two')).toBeTruthy();
|
||||
});
|
||||
|
||||
describe('NgClass', () => {
|
||||
|
||||
// We had a bug where NgClass would not allocate sufficient slots for host bindings,
|
||||
@ -601,7 +630,5 @@ describe('styling', () => {
|
||||
expect(fixture.debugElement.nativeElement.textContent).toContain('Hello');
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user