test(ivy): Add TODOs (#30522)

PR Close #30522
This commit is contained in:
Ben Lesh 2019-05-16 13:45:54 -07:00 committed by Jason Aden
parent 80d4fc5e26
commit 01919fbaae
1 changed files with 1457 additions and 1074 deletions

View File

@ -217,6 +217,9 @@ describe('inheritance', () => {
});
describe('of bare super class by a directive', () => {
// TODO: Add tests for ContentChild
// TODO: Add tests for ViewChild
describe('lifecycle hooks', () => {
const fired: string[] = [];
@ -506,6 +509,11 @@ describe('inheritance', () => {
});
});
describe('inputs', () => {
// TODO: add test where the two inputs have a different alias
// TODO: add test where super has an @Input() on the property, and sub does not
// TODO: add test where super has an @Input('alias') on the property and sub has no alias
it('should inherit inputs', () => {
class SuperDirective {
@Input()
@ -551,7 +559,13 @@ describe('inheritance', () => {
expect(subDir.baz).toBe('c');
expect(subDir.qux).toBe('d');
});
});
describe('outputs', () => {
// TODO: add tests where both sub and super have Output on same property with different
// aliases
// TODO: add test where super has property with alias and sub has property with no alias
// TODO: add test where super has an @Input() on the property, and sub does not
it('should inherit outputs', () => {
class SuperDirective {
@ -586,7 +600,11 @@ describe('inheritance', () => {
expect(app.foo).toBe('test');
});
});
describe('host bindings (style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings for styles', () => {
class SuperDirective {
@HostBinding('style.color')
@ -621,7 +639,11 @@ describe('inheritance', () => {
expect(queryResult.nativeElement.style.color).toBe('red');
expect(queryResult.nativeElement.style.backgroundColor).toBe('black');
});
});
describe('host bindings (non-style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings (non-style related)', () => {
class SuperDirective {
@HostBinding('title')
@ -653,7 +675,11 @@ describe('inheritance', () => {
expect(queryResult.nativeElement.title).toBe('test!!!');
});
});
describe('ContentChildren', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should inherit ContentChildren queries', () => {
let foundQueryList: QueryList<ChildDir>;
@ -662,7 +688,6 @@ describe('inheritance', () => {
}
class SuperDirective {
// TODO(issue/24571): remove '!'.
@ContentChildren(ChildDir)
customDirs !: QueryList<ChildDir>;
}
@ -695,7 +720,37 @@ describe('inheritance', () => {
});
});
xdescribe(
'what happens when...',
() => {
// TODO: sub has Input and super has Output on same property
// TODO: sub has Input and super has HostBinding on same property
// TODO: sub has Input and super has ViewChild on same property
// TODO: sub has Input and super has ViewChildren on same property
// TODO: sub has Input and super has ContentChild on same property
// TODO: sub has Input and super has ContentChildren on same property
// TODO: sub has Output and super has HostBinding on same property
// TODO: sub has Output and super has ViewChild on same property
// TODO: sub has Output and super has ViewChildren on same property
// TODO: sub has Output and super has ContentChild on same property
// TODO: sub has Output and super has ContentChildren on same property
// TODO: sub has HostBinding and super has ViewChild on same property
// TODO: sub has HostBinding and super has ViewChildren on same property
// TODO: sub has HostBinding and super has ContentChild on same property
// TODO: sub has HostBinding and super has ContentChildren on same property
// TODO: sub has ViewChild and super has ViewChildren on same property
// TODO: sub has ViewChild and super has ContentChild on same property
// TODO: sub has ViewChild and super has ContentChildren on same property
// TODO: sub has ViewChildren and super has ContentChild on same property
// TODO: sub has ViewChildren and super has ContentChildren on same property
// TODO: sub has ContentChild and super has ContentChildren on same property
});
});
describe('of a directive by another directive', () => {
// TODO: Add tests for ContentChild
// TODO: Add tests for ViewChild
describe('lifecycle hooks', () => {
const fired: string[] = [];
@ -988,6 +1043,11 @@ describe('inheritance', () => {
});
});
describe('inputs', () => {
// TODO: add test where the two inputs have a different alias
// TODO: add test where super has an @Input() on the property, and sub does not
// TODO: add test where super has an @Input('alias') on the property and sub has no alias
it('should inherit inputs', () => {
@Directive({selector: '[super-dir]'})
class SuperDirective {
@ -1035,6 +1095,13 @@ describe('inheritance', () => {
expect(subDir.qux).toBe('d');
});
});
describe('outputs', () => {
// TODO: add tests where both sub and super have Output on same property with different
// aliases
// TODO: add test where super has property with alias and sub has property with no alias
// TODO: add test where super has an @Input() on the property, and sub does not
it('should inherit outputs', () => {
@Directive({
@ -1072,7 +1139,11 @@ describe('inheritance', () => {
expect(app.foo).toBe('test');
});
});
describe('host bindings (style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings for styles', () => {
@Directive({
selector: '[super-dir]',
@ -1110,7 +1181,11 @@ describe('inheritance', () => {
expect(queryResult.nativeElement.style.color).toBe('red');
expect(queryResult.nativeElement.style.backgroundColor).toBe('black');
});
});
describe('host bindings (non-style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings (non-style related)', () => {
@Directive({
selector: '[super-dir]',
@ -1145,6 +1220,7 @@ describe('inheritance', () => {
expect(queryResult.nativeElement.title).toBe('test!!!');
});
});
it('should inherit ContentChildren queries', () => {
let foundQueryList: QueryList<ChildDir>;
@ -1157,7 +1233,6 @@ describe('inheritance', () => {
selector: '[super-dir]',
})
class SuperDirective {
// TODO(issue/24571): remove '!'.
@ContentChildren(ChildDir)
customDirs !: QueryList<ChildDir>;
}
@ -1188,9 +1263,37 @@ describe('inheritance', () => {
expect(foundQueryList !.length).toBe(2);
});
xdescribe(
'what happens when...',
() => {
// TODO: sub has Input and super has Output on same property
// TODO: sub has Input and super has HostBinding on same property
// TODO: sub has Input and super has ViewChild on same property
// TODO: sub has Input and super has ViewChildren on same property
// TODO: sub has Input and super has ContentChild on same property
// TODO: sub has Input and super has ContentChildren on same property
// TODO: sub has Output and super has HostBinding on same property
// TODO: sub has Output and super has ViewChild on same property
// TODO: sub has Output and super has ViewChildren on same property
// TODO: sub has Output and super has ContentChild on same property
// TODO: sub has Output and super has ContentChildren on same property
// TODO: sub has HostBinding and super has ViewChild on same property
// TODO: sub has HostBinding and super has ViewChildren on same property
// TODO: sub has HostBinding and super has ContentChild on same property
// TODO: sub has HostBinding and super has ContentChildren on same property
// TODO: sub has ViewChild and super has ViewChildren on same property
// TODO: sub has ViewChild and super has ContentChild on same property
// TODO: sub has ViewChild and super has ContentChildren on same property
// TODO: sub has ViewChildren and super has ContentChild on same property
// TODO: sub has ViewChildren and super has ContentChildren on same property
// TODO: sub has ContentChild and super has ContentChildren on same property
});
});
describe('of a directive by a bare class then by another directive', () => {
// TODO: Add tests for ContentChild
// TODO: Add tests for ViewChild
describe('lifecycle hooks', () => {
const fired: string[] = [];
@ -1485,6 +1588,11 @@ describe('inheritance', () => {
});
});
describe('inputs', () => {
// TODO: add test where the two inputs have a different alias
// TODO: add test where super has an @Input() on the property, and sub does not
// TODO: add test where super has an @Input('alias') on the property and sub has no alias
it('should inherit inputs', () => {
@Directive({selector: '[super-dir]'})
class SuperSuperDirective {
@ -1536,6 +1644,13 @@ describe('inheritance', () => {
expect(subDir.baz).toBe('c');
expect(subDir.qux).toBe('d');
});
});
describe('outputs', () => {
// TODO: add tests where both sub and super have Output on same property with different
// aliases
// TODO: add test where super has property with alias and sub has property with no alias
// TODO: add test where super has an @Input() on the property, and sub does not
it('should inherit outputs', () => {
@Directive({
@ -1586,7 +1701,11 @@ describe('inheritance', () => {
expect(app.foo).toBe('test1');
expect(app.bar).toBe('test2');
});
});
describe('host bindings (style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings for styles', () => {
@Directive({
selector: '[super-dir]',
@ -1626,7 +1745,11 @@ describe('inheritance', () => {
expect(queryResult.nativeElement.style.color).toBe('red');
expect(queryResult.nativeElement.style.backgroundColor).toBe('black');
});
});
describe('host bindings (non-style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings (non-style related)', () => {
@Directive({
selector: '[super-dir]',
@ -1671,6 +1794,7 @@ describe('inheritance', () => {
expect(p.title).toBe('test1!!!');
expect(p.accessKey).toBe('test2???');
});
});
it('should inherit ContentChildren queries', () => {
let foundChildDir1s: QueryList<ChildDir1>;
@ -1688,13 +1812,11 @@ describe('inheritance', () => {
selector: '[super-dir]',
})
class SuperSuperDirective {
// TODO(issue/24571): remove '!'.
@ContentChildren(ChildDir1)
childDir1s !: QueryList<ChildDir1>;
}
class SuperDirective extends SuperSuperDirective {
// TODO(issue/24571): remove '!'.
@ContentChildren(ChildDir1)
childDir2s !: QueryList<ChildDir2>;
}
@ -1730,9 +1852,37 @@ describe('inheritance', () => {
expect(foundChildDir1s !.length).toBe(2);
expect(foundChildDir2s !.length).toBe(2);
});
xdescribe(
'what happens when...',
() => {
// TODO: sub has Input and super has Output on same property
// TODO: sub has Input and super has HostBinding on same property
// TODO: sub has Input and super has ViewChild on same property
// TODO: sub has Input and super has ViewChildren on same property
// TODO: sub has Input and super has ContentChild on same property
// TODO: sub has Input and super has ContentChildren on same property
// TODO: sub has Output and super has HostBinding on same property
// TODO: sub has Output and super has ViewChild on same property
// TODO: sub has Output and super has ViewChildren on same property
// TODO: sub has Output and super has ContentChild on same property
// TODO: sub has Output and super has ContentChildren on same property
// TODO: sub has HostBinding and super has ViewChild on same property
// TODO: sub has HostBinding and super has ViewChildren on same property
// TODO: sub has HostBinding and super has ContentChild on same property
// TODO: sub has HostBinding and super has ContentChildren on same property
// TODO: sub has ViewChild and super has ViewChildren on same property
// TODO: sub has ViewChild and super has ContentChild on same property
// TODO: sub has ViewChild and super has ContentChildren on same property
// TODO: sub has ViewChildren and super has ContentChild on same property
// TODO: sub has ViewChildren and super has ContentChildren on same property
// TODO: sub has ContentChild and super has ContentChildren on same property
});
});
describe('of bare super class by a component', () => {
// TODO: Add tests for ContentChild
// TODO: Add tests for ViewChild
describe('lifecycle hooks', () => {
const fired: string[] = [];
@ -2025,6 +2175,11 @@ describe('inheritance', () => {
});
});
describe('inputs', () => {
// TODO: add test where the two inputs have a different alias
// TODO: add test where super has an @Input() on the property, and sub does not
// TODO: add test where super has an @Input('alias') on the property and sub has no alias
it('should inherit inputs', () => {
class SuperComponent {
@Input()
@ -2069,6 +2224,13 @@ describe('inheritance', () => {
expect(subDir.qux).toEqual('d');
});
});
describe('outputs', () => {
// TODO: add tests where both sub and super have Output on same property with different
// aliases
// TODO: add test where super has property with alias and sub has property with no alias
// TODO: add test where super has an @Input() on the property, and sub does not
it('should inherit outputs', () => {
class SuperComponent {
@ -2104,7 +2266,11 @@ describe('inheritance', () => {
expect(app.foo).toBe('test');
});
});
describe('host bindings (style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings for styles', () => {
class SuperComponent {
@HostBinding('style.color')
@ -2140,7 +2306,11 @@ describe('inheritance', () => {
expect(queryResult.nativeElement.style.color).toBe('red');
expect(queryResult.nativeElement.style.backgroundColor).toBe('black');
});
});
describe('host bindings (non-style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings (non-style related)', () => {
class SuperComponent {
@HostBinding('title')
@ -2173,6 +2343,7 @@ describe('inheritance', () => {
expect(queryResult.nativeElement.title).toBe('test!!!');
});
});
it('should inherit ContentChildren queries', () => {
let foundQueryList: QueryList<ChildDir>;
@ -2182,7 +2353,6 @@ describe('inheritance', () => {
}
class SuperComponent {
// TODO(issue/24571): remove '!'.
@ContentChildren(ChildDir)
customDirs !: QueryList<ChildDir>;
}
@ -2211,9 +2381,37 @@ describe('inheritance', () => {
expect(foundQueryList !.length).toBe(2);
});
xdescribe(
'what happens when...',
() => {
// TODO: sub has Input and super has Output on same property
// TODO: sub has Input and super has HostBinding on same property
// TODO: sub has Input and super has ViewChild on same property
// TODO: sub has Input and super has ViewChildren on same property
// TODO: sub has Input and super has ContentChild on same property
// TODO: sub has Input and super has ContentChildren on same property
// TODO: sub has Output and super has HostBinding on same property
// TODO: sub has Output and super has ViewChild on same property
// TODO: sub has Output and super has ViewChildren on same property
// TODO: sub has Output and super has ContentChild on same property
// TODO: sub has Output and super has ContentChildren on same property
// TODO: sub has HostBinding and super has ViewChild on same property
// TODO: sub has HostBinding and super has ViewChildren on same property
// TODO: sub has HostBinding and super has ContentChild on same property
// TODO: sub has HostBinding and super has ContentChildren on same property
// TODO: sub has ViewChild and super has ViewChildren on same property
// TODO: sub has ViewChild and super has ContentChild on same property
// TODO: sub has ViewChild and super has ContentChildren on same property
// TODO: sub has ViewChildren and super has ContentChild on same property
// TODO: sub has ViewChildren and super has ContentChildren on same property
// TODO: sub has ContentChild and super has ContentChildren on same property
});
});
describe('of a directive inherited by a component', () => {
// TODO: Add tests for ContentChild
// TODO: Add tests for ViewChild
describe('lifecycle hooks', () => {
const fired: string[] = [];
@ -2510,6 +2708,11 @@ describe('inheritance', () => {
});
});
describe('inputs', () => {
// TODO: add test where the two inputs have a different alias
// TODO: add test where super has an @Input() on the property, and sub does not
// TODO: add test where super has an @Input('alias') on the property and sub has no alias
it('should inherit inputs', () => {
@Directive({
selector: '[super-dir]',
@ -2556,6 +2759,13 @@ describe('inheritance', () => {
expect(subDir.baz).toEqual('c');
expect(subDir.qux).toEqual('d');
});
});
describe('outputs', () => {
// TODO: add tests where both sub and super have Output on same property with different
// aliases
// TODO: add test where super has property with alias and sub has property with no alias
// TODO: add test where super has an @Input() on the property, and sub does not
it('should inherit outputs', () => {
@Directive({
@ -2594,7 +2804,11 @@ describe('inheritance', () => {
expect(app.foo).toBe('test');
});
});
describe('host bindings (style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings for styles', () => {
@Directive({
selector: '[super-dir]',
@ -2633,7 +2847,11 @@ describe('inheritance', () => {
expect(queryResult.nativeElement.style.color).toBe('red');
expect(queryResult.nativeElement.style.backgroundColor).toBe('black');
});
});
describe('host bindings (non-style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings (non-style related)', () => {
@Directive({
selector: '[super-dir]',
@ -2669,6 +2887,7 @@ describe('inheritance', () => {
expect(queryResult.nativeElement.title).toBe('test!!!');
});
});
it('should inherit ContentChildren queries', () => {
let foundQueryList: QueryList<ChildDir>;
@ -2681,7 +2900,6 @@ describe('inheritance', () => {
selector: '[super-dir]',
})
class SuperDirective {
// TODO(issue/24571): remove '!'.
@ContentChildren(ChildDir)
customDirs !: QueryList<ChildDir>;
}
@ -2722,7 +2940,6 @@ describe('inheritance', () => {
selector: '[super-dir]',
})
class SuperDirective {
// TODO(issue/24571): remove '!'.
@ViewChildren(ChildDir)
customDirs !: QueryList<ChildDir>;
}
@ -2756,9 +2973,37 @@ describe('inheritance', () => {
expect(foundQueryList !.length).toBe(5);
});
xdescribe(
'what happens when...',
() => {
// TODO: sub has Input and super has Output on same property
// TODO: sub has Input and super has HostBinding on same property
// TODO: sub has Input and super has ViewChild on same property
// TODO: sub has Input and super has ViewChildren on same property
// TODO: sub has Input and super has ContentChild on same property
// TODO: sub has Input and super has ContentChildren on same property
// TODO: sub has Output and super has HostBinding on same property
// TODO: sub has Output and super has ViewChild on same property
// TODO: sub has Output and super has ViewChildren on same property
// TODO: sub has Output and super has ContentChild on same property
// TODO: sub has Output and super has ContentChildren on same property
// TODO: sub has HostBinding and super has ViewChild on same property
// TODO: sub has HostBinding and super has ViewChildren on same property
// TODO: sub has HostBinding and super has ContentChild on same property
// TODO: sub has HostBinding and super has ContentChildren on same property
// TODO: sub has ViewChild and super has ViewChildren on same property
// TODO: sub has ViewChild and super has ContentChild on same property
// TODO: sub has ViewChild and super has ContentChildren on same property
// TODO: sub has ViewChildren and super has ContentChild on same property
// TODO: sub has ViewChildren and super has ContentChildren on same property
// TODO: sub has ContentChild and super has ContentChildren on same property
});
});
describe('of a directive inherited by a bare class and then by a component', () => {
// TODO: Add tests for ContentChild
// TODO: Add tests for ViewChild
describe('lifecycle hooks', () => {
const fired: string[] = [];
@ -3056,6 +3301,11 @@ describe('inheritance', () => {
});
});
describe('inputs', () => {
// TODO: add test where the two inputs have a different alias
// TODO: add test where super has an @Input() on the property, and sub does not
// TODO: add test where super has an @Input('alias') on the property and sub has no alias
it('should inherit inputs', () => {
@Directive({
selector: '[super-dir]',
@ -3104,7 +3354,13 @@ describe('inheritance', () => {
expect(subDir.baz).toEqual('c');
expect(subDir.qux).toEqual('d');
});
});
describe('outputs', () => {
// TODO: add tests where both sub and super have Output on same property with different
// aliases
// TODO: add test where super has property with alias and sub has property with no alias
// TODO: add test where super has an @Input() on the property, and sub does not
it('should inherit outputs', () => {
@Directive({
@ -3145,7 +3401,11 @@ describe('inheritance', () => {
expect(app.foo).toBe('test');
});
});
describe('host bindings (style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings for styles', () => {
@Directive({
selector: '[super-dir]',
@ -3186,7 +3446,11 @@ describe('inheritance', () => {
expect(queryResult.nativeElement.style.color).toBe('red');
expect(queryResult.nativeElement.style.backgroundColor).toBe('black');
});
});
describe('host bindings (non-style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings (non-style related)', () => {
@Directive({
selector: '[super-dir]',
@ -3231,6 +3495,7 @@ describe('inheritance', () => {
expect(queryResult.nativeElement.title).toBe('test1!!!');
expect(queryResult.nativeElement.accessKey).toBe('test2???');
});
});
it('should inherit ContentChildren queries', () => {
let foundQueryList: QueryList<ChildDir>;
@ -3243,7 +3508,6 @@ describe('inheritance', () => {
selector: '[super-dir]',
})
class SuperDirective {
// TODO(issue/24571): remove '!'.
@ContentChildren(ChildDir)
customDirs !: QueryList<ChildDir>;
}
@ -3289,7 +3553,6 @@ describe('inheritance', () => {
selector: '[super-dir]',
})
class SuperDirective {
// TODO(issue/24571): remove '!'.
@ViewChildren(ChildDir)
customDirs !: QueryList<ChildDir>;
}
@ -3325,9 +3588,37 @@ describe('inheritance', () => {
expect(foundQueryList !.length).toBe(5);
});
xdescribe(
'what happens when...',
() => {
// TODO: sub has Input and super has Output on same property
// TODO: sub has Input and super has HostBinding on same property
// TODO: sub has Input and super has ViewChild on same property
// TODO: sub has Input and super has ViewChildren on same property
// TODO: sub has Input and super has ContentChild on same property
// TODO: sub has Input and super has ContentChildren on same property
// TODO: sub has Output and super has HostBinding on same property
// TODO: sub has Output and super has ViewChild on same property
// TODO: sub has Output and super has ViewChildren on same property
// TODO: sub has Output and super has ContentChild on same property
// TODO: sub has Output and super has ContentChildren on same property
// TODO: sub has HostBinding and super has ViewChild on same property
// TODO: sub has HostBinding and super has ViewChildren on same property
// TODO: sub has HostBinding and super has ContentChild on same property
// TODO: sub has HostBinding and super has ContentChildren on same property
// TODO: sub has ViewChild and super has ViewChildren on same property
// TODO: sub has ViewChild and super has ContentChild on same property
// TODO: sub has ViewChild and super has ContentChildren on same property
// TODO: sub has ViewChildren and super has ContentChild on same property
// TODO: sub has ViewChildren and super has ContentChildren on same property
// TODO: sub has ContentChild and super has ContentChildren on same property
});
});
describe('of a component inherited by a component', () => {
// TODO: Add tests for ContentChild
// TODO: Add tests for ViewChild
describe('lifecycle hooks', () => {
const fired: string[] = [];
@ -3628,6 +3919,11 @@ describe('inheritance', () => {
});
});
describe('inputs', () => {
// TODO: add test where the two inputs have a different alias
// TODO: add test where super has an @Input() on the property, and sub does not
// TODO: add test where super has an @Input('alias') on the property and sub has no alias
it('should inherit inputs', () => {
@Component({
selector: 'super-comp',
@ -3675,6 +3971,13 @@ describe('inheritance', () => {
expect(subDir.baz).toEqual('c');
expect(subDir.qux).toEqual('d');
});
});
describe('outputs', () => {
// TODO: add tests where both sub and super have Output on same property with different
// aliases
// TODO: add test where super has property with alias and sub has property with no alias
// TODO: add test where super has an @Input() on the property, and sub does not
it('should inherit outputs', () => {
@Component({
@ -3714,7 +4017,11 @@ describe('inheritance', () => {
expect(app.foo).toBe('test');
});
});
describe('host bindings (style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings for styles', () => {
@Component({
selector: 'super-comp',
@ -3754,7 +4061,11 @@ describe('inheritance', () => {
expect(queryResult.nativeElement.style.color).toBe('red');
expect(queryResult.nativeElement.style.backgroundColor).toBe('black');
});
});
describe('host bindings (non-style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings (non-style related)', () => {
@Component({
selector: 'super-comp',
@ -3791,6 +4102,7 @@ describe('inheritance', () => {
expect(queryResult.nativeElement.title).toBe('test!!!');
});
});
it('should inherit ContentChildren queries', () => {
let foundQueryList: QueryList<ChildDir>;
@ -3804,7 +4116,6 @@ describe('inheritance', () => {
template: `<p>super</p>`,
})
class SuperComponent {
// TODO(issue/24571): remove '!'.
@ContentChildren(ChildDir)
customDirs !: QueryList<ChildDir>;
}
@ -3849,7 +4160,6 @@ describe('inheritance', () => {
template: `<p>super</p>`,
})
class SuperComponent {
// TODO(issue/24571): remove '!'.
@ViewChildren(ChildDir)
customDirs !: QueryList<ChildDir>;
}
@ -3883,9 +4193,37 @@ describe('inheritance', () => {
expect(foundQueryList !.length).toBe(5);
});
xdescribe(
'what happens when...',
() => {
// TODO: sub has Input and super has Output on same property
// TODO: sub has Input and super has HostBinding on same property
// TODO: sub has Input and super has ViewChild on same property
// TODO: sub has Input and super has ViewChildren on same property
// TODO: sub has Input and super has ContentChild on same property
// TODO: sub has Input and super has ContentChildren on same property
// TODO: sub has Output and super has HostBinding on same property
// TODO: sub has Output and super has ViewChild on same property
// TODO: sub has Output and super has ViewChildren on same property
// TODO: sub has Output and super has ContentChild on same property
// TODO: sub has Output and super has ContentChildren on same property
// TODO: sub has HostBinding and super has ViewChild on same property
// TODO: sub has HostBinding and super has ViewChildren on same property
// TODO: sub has HostBinding and super has ContentChild on same property
// TODO: sub has HostBinding and super has ContentChildren on same property
// TODO: sub has ViewChild and super has ViewChildren on same property
// TODO: sub has ViewChild and super has ContentChild on same property
// TODO: sub has ViewChild and super has ContentChildren on same property
// TODO: sub has ViewChildren and super has ContentChild on same property
// TODO: sub has ViewChildren and super has ContentChildren on same property
// TODO: sub has ContentChild and super has ContentChildren on same property
});
});
describe('of a component inherited by a bare class then by a component', () => {
// TODO: Add tests for ContentChild
// TODO: Add tests for ViewChild
describe('lifecycle hooks', () => {
const fired: string[] = [];
@ -4188,6 +4526,11 @@ describe('inheritance', () => {
});
});
describe('inputs', () => {
// TODO: add test where the two inputs have a different alias
// TODO: add test where super has an @Input() on the property, and sub does not
// TODO: add test where super has an @Input('alias') on the property and sub has no alias
it('should inherit inputs', () => {
@Component({
selector: 'super-comp',
@ -4237,6 +4580,13 @@ describe('inheritance', () => {
expect(myComp.baz).toEqual('c');
expect(myComp.qux).toEqual('d');
});
});
describe('outputs', () => {
// TODO: add tests where both sub and super have Output on same property with different
// aliases
// TODO: add test where super has property with alias and sub has property with no alias
// TODO: add test where super has an @Input() on the property, and sub does not
it('should inherit outputs', () => {
@Component({
@ -4289,7 +4639,11 @@ describe('inheritance', () => {
expect(app.foo).toBe('test1');
expect(app.bar).toBe('test2');
});
});
describe('host bindings (style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings for styles', () => {
@Component({
selector: 'super-comp',
@ -4331,7 +4685,11 @@ describe('inheritance', () => {
expect(queryResult.nativeElement.style.color).toBe('red');
expect(queryResult.nativeElement.style.backgroundColor).toBe('black');
});
});
describe('host bindings (non-style related)', () => {
// TODO: sub and super HostBinding same property but different bindings
// TODO: sub and super HostBinding same binding on two different properties
it('should compose host bindings (non-style related)', () => {
@Component({
selector: 'super-comp',
@ -4378,6 +4736,7 @@ describe('inheritance', () => {
expect(queryResult.nativeElement.title).toBe('test1!!!');
expect(queryResult.nativeElement.accessKey).toBe('test2???');
});
});
it('should inherit ContentChildren queries', () => {
let foundQueryList: QueryList<ChildDir>;
@ -4391,7 +4750,6 @@ describe('inheritance', () => {
template: `<p>super</p>`,
})
class SuperComponent {
// TODO(issue/24571): remove '!'.
@ContentChildren(ChildDir)
customDirs !: QueryList<ChildDir>;
}
@ -4436,7 +4794,6 @@ describe('inheritance', () => {
template: `<p>super</p>`,
})
class SuperComponent {
// TODO(issue/24571): remove '!'.
@ViewChildren(ChildDir)
customDirs !: QueryList<ChildDir>;
}
@ -4470,5 +4827,31 @@ describe('inheritance', () => {
expect(foundQueryList !.length).toBe(5);
});
xdescribe(
'what happens when...',
() => {
// TODO: sub has Input and super has Output on same property
// TODO: sub has Input and super has HostBinding on same property
// TODO: sub has Input and super has ViewChild on same property
// TODO: sub has Input and super has ViewChildren on same property
// TODO: sub has Input and super has ContentChild on same property
// TODO: sub has Input and super has ContentChildren on same property
// TODO: sub has Output and super has HostBinding on same property
// TODO: sub has Output and super has ViewChild on same property
// TODO: sub has Output and super has ViewChildren on same property
// TODO: sub has Output and super has ContentChild on same property
// TODO: sub has Output and super has ContentChildren on same property
// TODO: sub has HostBinding and super has ViewChild on same property
// TODO: sub has HostBinding and super has ViewChildren on same property
// TODO: sub has HostBinding and super has ContentChild on same property
// TODO: sub has HostBinding and super has ContentChildren on same property
// TODO: sub has ViewChild and super has ViewChildren on same property
// TODO: sub has ViewChild and super has ContentChild on same property
// TODO: sub has ViewChild and super has ContentChildren on same property
// TODO: sub has ViewChildren and super has ContentChild on same property
// TODO: sub has ViewChildren and super has ContentChildren on same property
// TODO: sub has ContentChild and super has ContentChildren on same property
});
});
});