Skip to content

Commit 1fa5478

Browse files
pkozlowski-opensourceIgorMinar
authored andcommitted
test(ivy): update root causes for @angular/core TestBed failures (angular#27370)
PR Close angular#27370
1 parent eb17502 commit 1fa5478

File tree

7 files changed

+737
-774
lines changed

7 files changed

+737
-774
lines changed

packages/core/test/application_ref_spec.ts

Lines changed: 167 additions & 196 deletions
Large diffs are not rendered by default.

packages/core/test/component_fixture_spec.ts

Lines changed: 190 additions & 203 deletions
Large diffs are not rendered by default.

packages/core/test/debug/debug_node_spec.ts

Lines changed: 59 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@ class TestApp {
192192
});
193193
}));
194194

195-
fixmeIvy('unknown') && it('should list all child nodes', () => {
195+
it('should list all child nodes', () => {
196196
fixture = TestBed.createComponent(ParentComp);
197197
fixture.detectChanges();
198198
expect(fixture.debugElement.childNodes.length).toEqual(3);
199199
});
200200

201-
fixmeIvy('unknown') && it('should list all component child elements', () => {
201+
it('should list all component child elements', () => {
202202
fixture = TestBed.createComponent(ParentComp);
203203
fixture.detectChanges();
204204
const childEls = fixture.debugElement.children;
@@ -225,7 +225,7 @@ class TestApp {
225225
expect(getDOM().hasClass(childNested[0].nativeElement, 'childnested')).toBe(true);
226226
});
227227

228-
fixmeIvy('unknown') && it('should list conditional component child elements', () => {
228+
it('should list conditional component child elements', () => {
229229
fixture = TestBed.createComponent(ConditionalParentComp);
230230
fixture.detectChanges();
231231

@@ -246,7 +246,7 @@ class TestApp {
246246
expect(conditionalContentComp.children.length).toEqual(1);
247247
});
248248

249-
fixmeIvy('unknown') && it('should list child elements within viewports', () => {
249+
it('should list child elements within viewports', () => {
250250
fixture = TestBed.createComponent(UsingFor);
251251
fixture.detectChanges();
252252

@@ -259,34 +259,37 @@ class TestApp {
259259
expect(list.children.length).toEqual(3);
260260
});
261261

262-
fixmeIvy('unknown') && it('should list element attributes', () => {
263-
fixture = TestBed.createComponent(TestApp);
264-
fixture.detectChanges();
265-
const bankElem = fixture.debugElement.children[0];
266-
267-
expect(bankElem.attributes['bank']).toEqual('RBC');
268-
expect(bankElem.attributes['account']).toEqual('4747');
269-
});
270-
271-
fixmeIvy('unknown') && it('should list element classes', () => {
272-
fixture = TestBed.createComponent(TestApp);
273-
fixture.detectChanges();
274-
const bankElem = fixture.debugElement.children[0];
275-
276-
expect(bankElem.classes['closed']).toBe(true);
277-
expect(bankElem.classes['open']).toBe(false);
278-
});
279-
280-
fixmeIvy('unknown') && it('should list element styles', () => {
281-
fixture = TestBed.createComponent(TestApp);
282-
fixture.detectChanges();
283-
const bankElem = fixture.debugElement.children[0];
284-
285-
expect(bankElem.styles['width']).toEqual('200px');
286-
expect(bankElem.styles['color']).toEqual('red');
287-
});
288-
289-
fixmeIvy('unknown') && it('should query child elements by css', () => {
262+
fixmeIvy('FW-719: DebugElement needs proper implementation of its methods.') &&
263+
it('should list element attributes', () => {
264+
fixture = TestBed.createComponent(TestApp);
265+
fixture.detectChanges();
266+
const bankElem = fixture.debugElement.children[0];
267+
268+
expect(bankElem.attributes['bank']).toEqual('RBC');
269+
expect(bankElem.attributes['account']).toEqual('4747');
270+
});
271+
272+
fixmeIvy('FW-719: DebugElement needs proper implementation of its methods.') &&
273+
it('should list element classes', () => {
274+
fixture = TestBed.createComponent(TestApp);
275+
fixture.detectChanges();
276+
const bankElem = fixture.debugElement.children[0];
277+
278+
expect(bankElem.classes['closed']).toBe(true);
279+
expect(bankElem.classes['open']).toBe(false);
280+
});
281+
282+
fixmeIvy('FW-719: DebugElement needs proper implementation of its methods.') &&
283+
it('should list element styles', () => {
284+
fixture = TestBed.createComponent(TestApp);
285+
fixture.detectChanges();
286+
const bankElem = fixture.debugElement.children[0];
287+
288+
expect(bankElem.styles['width']).toEqual('200px');
289+
expect(bankElem.styles['color']).toEqual('red');
290+
});
291+
292+
it('should query child elements by css', () => {
290293
fixture = TestBed.createComponent(ParentComp);
291294
fixture.detectChanges();
292295

@@ -296,7 +299,7 @@ class TestApp {
296299
expect(getDOM().hasClass(childTestEls[0].nativeElement, 'child-comp-class')).toBe(true);
297300
});
298301

299-
fixmeIvy('unknown') && it('should query child elements by directive', () => {
302+
it('should query child elements by directive', () => {
300303
fixture = TestBed.createComponent(ParentComp);
301304
fixture.detectChanges();
302305

@@ -309,39 +312,42 @@ class TestApp {
309312
expect(getDOM().hasClass(childTestEls[3].nativeElement, 'childnested')).toBe(true);
310313
});
311314

312-
fixmeIvy('unknown') && it('should list providerTokens', () => {
313-
fixture = TestBed.createComponent(ParentComp);
314-
fixture.detectChanges();
315+
fixmeIvy('FW-719: DebugElement needs proper implementation of its methods.') &&
316+
it('should list providerTokens', () => {
317+
fixture = TestBed.createComponent(ParentComp);
318+
fixture.detectChanges();
315319

316-
expect(fixture.debugElement.providerTokens).toContain(Logger);
317-
});
320+
expect(fixture.debugElement.providerTokens).toContain(Logger);
321+
});
318322

319-
fixmeIvy('unknown') && it('should list locals', () => {
323+
it('should list locals', () => {
320324
fixture = TestBed.createComponent(LocalsComp);
321325
fixture.detectChanges();
322326

323327
expect(fixture.debugElement.children[0].references !['alice']).toBeAnInstanceOf(MyDir);
324328
});
325329

326-
fixmeIvy('unknown') && it('should allow injecting from the element injector', () => {
327-
fixture = TestBed.createComponent(ParentComp);
328-
fixture.detectChanges();
330+
fixmeIvy('FW-719: DebugElement needs proper implementation of its methods.') &&
331+
it('should allow injecting from the element injector', () => {
332+
fixture = TestBed.createComponent(ParentComp);
333+
fixture.detectChanges();
329334

330-
expect((<Logger>(fixture.debugElement.children[0].injector.get(Logger))).logs).toEqual([
331-
'parent', 'nestedparent', 'child', 'nestedchild'
332-
]);
333-
});
335+
expect((<Logger>(fixture.debugElement.children[0].injector.get(Logger))).logs).toEqual([
336+
'parent', 'nestedparent', 'child', 'nestedchild'
337+
]);
338+
});
334339

335-
fixmeIvy('unknown') && it('should list event listeners', () => {
336-
fixture = TestBed.createComponent(EventsComp);
337-
fixture.detectChanges();
340+
fixmeIvy('FW-719: DebugElement needs proper implementation of its methods.') &&
341+
it('should list event listeners', () => {
342+
fixture = TestBed.createComponent(EventsComp);
343+
fixture.detectChanges();
338344

339-
expect(fixture.debugElement.children[0].listeners.length).toEqual(1);
340-
expect(fixture.debugElement.children[1].listeners.length).toEqual(1);
345+
expect(fixture.debugElement.children[0].listeners.length).toEqual(1);
346+
expect(fixture.debugElement.children[1].listeners.length).toEqual(1);
341347

342-
});
348+
});
343349

344-
fixmeIvy('unknown') && it('should trigger event handlers', () => {
350+
it('should trigger event handlers', () => {
345351
fixture = TestBed.createComponent(EventsComp);
346352
fixture.detectChanges();
347353

0 commit comments

Comments
 (0)