Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions packages/examples/common/ngIf/ts/e2e_test/ngIf_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,18 @@ describe('ngIf', () => {
describe('ng-if-then-else', () => {
let comp = 'ng-if-then-else';

modifiedInIvy('FW-1019: Design new API to replace static queries')
.it('should hide/show content', () => {
browser.get(URL);
waitForElement(comp);
expect(element.all(by.css(comp)).get(0).getText())
.toEqual('hideSwitch Primary show = true\nPrimary text to show');
element.all(by.css(comp + ' button')).get(1).click();
expect(element.all(by.css(comp)).get(0).getText())
.toEqual('hideSwitch Primary show = true\nSecondary text to show');
element.all(by.css(comp + ' button')).get(0).click();
expect(element.all(by.css(comp)).get(0).getText())
.toEqual(
'showSwitch Primary show = false\nAlternate text while primary text is hidden');
});
it('should hide/show content', () => {
browser.get(URL);
waitForElement(comp);
expect(element.all(by.css(comp)).get(0).getText())
.toEqual('hideSwitch Primary show = true\nPrimary text to show');
element.all(by.css(comp + ' button')).get(1).click();
expect(element.all(by.css(comp)).get(0).getText())
.toEqual('hideSwitch Primary show = true\nSecondary text to show');
element.all(by.css(comp + ' button')).get(0).click();
expect(element.all(by.css(comp)).get(0).getText())
.toEqual('showSwitch Primary show = false\nAlternate text while primary text is hidden');
});
});

describe('ng-if-let', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/common/ngIf/ts/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class NgIfThenElse implements OnInit {
thenBlock: TemplateRef<any>|null = null;
show: boolean = true;

@ViewChild('primaryBlock')
@ViewChild('primaryBlock', {static: true})
primaryBlock: TemplateRef<any>|null = null;
@ViewChild('secondaryBlock')
secondaryBlock: TemplateRef<any>|null = null;
Expand Down