Skip to content

Commit

Permalink
test: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
hsuanxyz committed Jun 3, 2019
1 parent 07feefd commit afe6cd4
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion components/modal/nz-modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class NzModalComponent<T = any, R = any> extends NzModalRef<T, R>
@Output() readonly nzAfterClose = new EventEmitter<R>(); // Trigger when modal leave-animation over
@Output() readonly nzVisibleChange = new EventEmitter<boolean>();

@ViewChild('modalContainer', { static: false }) modalContainer: ElementRef;
@ViewChild('modalContainer', { static: true }) modalContainer: ElementRef;
@ViewChild('bodyContainer', { static: false, read: ViewContainerRef }) bodyContainer: ViewContainerRef;
@ViewChild('autoFocusButtonOk', { static: false, read: ElementRef }) autoFocusButtonOk: ElementRef; // Only aim to focus the ok button that needs to be auto focused

Expand Down
2 changes: 1 addition & 1 deletion components/table/nz-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class NzTableComponent<T = any> implements OnInit, AfterViewInit, OnDestr
@Input() nzData: T[] = [];
@Input() nzPaginationPosition: 'top' | 'bottom' | 'both' = 'bottom';
@Input() nzScroll: { x?: string | null; y?: string | null } = { x: null, y: null };
@Input() @ViewChild('renderItemTemplate', { static: false }) nzItemRender: TemplateRef<{
@Input() @ViewChild('renderItemTemplate', { static: true }) nzItemRender: TemplateRef<{
$implicit: 'page' | 'prev' | 'next';
page: number;
}>;
Expand Down
2 changes: 1 addition & 1 deletion components/table/nz-th.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ describe('nz-th', () => {
`
})
export class NzThTestNzTableComponent {
@ViewChild(NzThComponent, { static: true }) nzThComponent: NzThComponent;
@ViewChild(NzThComponent, { static: false }) nzThComponent: NzThComponent;
destroy = false;
showCheckbox = false;
checked = false;
Expand Down
2 changes: 1 addition & 1 deletion components/table/nz-thead.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import { NzThComponent } from './nz-th.component';
})
export class NzTheadComponent implements AfterContentInit, OnDestroy, AfterViewInit {
private destroy$ = new Subject<void>();
@ViewChild('contentTemplate', { static: false }) templateRef: TemplateRef<void>;
@ViewChild('contentTemplate', { static: true }) templateRef: TemplateRef<void>;
@ContentChildren(NzThComponent, { descendants: true }) listOfNzThComponent: QueryList<NzThComponent>;
@Input() @InputBoolean() nzSingleSort = false;
@Output() readonly nzSortChange = new EventEmitter<{ key: string; value: string }>();
Expand Down
2 changes: 1 addition & 1 deletion components/tabs/nz-tab.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class NzTabComponent implements OnChanges, OnDestroy {
origin: number | null = null;
isActive = false;
readonly stateChanges = new Subject<void>();
@ViewChild(TemplateRef, { static: false }) content: TemplateRef<void>;
@ViewChild(TemplateRef, { static: true }) content: TemplateRef<void>;
@ContentChild(NzTabDirective, { static: false, read: TemplateRef }) template: TemplateRef<void>;
@Input() nzTitle: string | TemplateRef<void>;
@Input() @InputBoolean() nzForceRender = false;
Expand Down
2 changes: 1 addition & 1 deletion components/tree-select/nz-tree-select.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class NzTreeSelectComponent extends NzTreeBase implements ControlValueAcc
@ViewChild(CdkOverlayOrigin, { static: true }) cdkOverlayOrigin: CdkOverlayOrigin;
@ViewChild(CdkConnectedOverlay, { static: false }) cdkConnectedOverlay: CdkConnectedOverlay;

@Input() @ContentChild('nzTreeTemplate', { static: false }) nzTreeTemplate: TemplateRef<{ $implicit: NzTreeNode }>;
@Input() @ContentChild('nzTreeTemplate', { static: true }) nzTreeTemplate: TemplateRef<{ $implicit: NzTreeNode }>;

triggerWidth: number;
isComposing = false;
Expand Down
1 change: 1 addition & 0 deletions components/tree-select/nz-tree-select.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ describe('tree-select component', () => {
treeSelect.nativeElement.click();
fixture.detectChanges();
flush();
fixture.detectChanges();
expect(overlayContainerElement.querySelector('i.anticon.anticon-frown-o')).toBeTruthy();
}));
});
Expand Down
2 changes: 1 addition & 1 deletion components/tree/nz-tree.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class NzTreeComponent extends NzTreeBase implements OnInit, OnDestroy, Co
@Input() @InputBoolean() nzCheckStrictly = false;
@Input() @InputBoolean() nzBlockNode = false;

@Input() @ContentChild('nzTreeTemplate', { static: false }) nzTreeTemplate: TemplateRef<{ $implicit: NzTreeNode }>;
@Input() @ContentChild('nzTreeTemplate', { static: true }) nzTreeTemplate: TemplateRef<{ $implicit: NzTreeNode }>;

/**
* @deprecated use
Expand Down
2 changes: 1 addition & 1 deletion components/upload/upload.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ describe('upload', () => {
`
})
class TestUploadComponent {
@ViewChild('upload', { static: true }) comp: NzUploadComponent;
@ViewChild('upload', { static: false }) comp: NzUploadComponent;
show = true;
nzType: UploadType = 'select';
nzLimit = 0;
Expand Down

0 comments on commit afe6cd4

Please sign in to comment.