Skip to content

Commit 1567db5

Browse files
authored
Merge pull request #7040 from IgniteUI/sstoychev/ref-int-tests
refactor(hierarchicalgrid): test refactoring, typos - master
2 parents 50d0b08 + 0647785 commit 1567db5

File tree

10 files changed

+422
-681
lines changed

10 files changed

+422
-681
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4659,7 +4659,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
46594659
* @hidden @internal
46604660
*/
46614661
public get outerWidth() {
4662-
return this.hasVerticalSroll() ? this.calcWidth + this.scrollWidth : this.calcWidth;
4662+
return this.hasVerticalScroll() ? this.calcWidth + this.scrollWidth : this.calcWidth;
46634663
}
46644664

46654665
/**
@@ -4752,7 +4752,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
47524752
width = this.getColumnWidthSum();
47534753
}
47544754

4755-
if (this.hasVerticalSroll() && this.width !== null) {
4755+
if (this.hasVerticalScroll() && this.width !== null) {
47564756
width -= this.scrollWidth;
47574757
}
47584758
if ((Number.isFinite(width) || width === null) && width !== this.calcWidth) {
@@ -4783,7 +4783,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
47834783
/**
47844784
* @hidden @internal
47854785
*/
4786-
public hasVerticalSroll() {
4786+
public hasVerticalScroll() {
47874787
if (this._init) { return false; }
47884788
const isScrollable = this.verticalScrollContainer ? this.verticalScrollContainer.isScrollable() : false;
47894789
return !!(this.calcWidth && this.dataView &&
@@ -4874,7 +4874,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
48744874
*/
48754875
this.resetCaches(recalcFeatureWidth);
48764876
this.cdr.detectChanges();
4877-
const hasScroll = this.hasVerticalSroll();
4877+
const hasScroll = this.hasVerticalScroll();
48784878
this.calculateGridWidth();
48794879
this.resetCaches(recalcFeatureWidth);
48804880
this.cdr.detectChanges();
@@ -4890,7 +4890,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
48904890

48914891
this.cdr.detectChanges();
48924892
// in case scrollbar has appeared recalc to size correctly.
4893-
if (hasScroll !== this.hasVerticalSroll()) {
4893+
if (hasScroll !== this.hasVerticalScroll()) {
48944894
this.calculateGridWidth();
48954895
this.cdr.detectChanges();
48964896
}
@@ -4913,7 +4913,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
49134913
let width = this._width;
49144914
if (width === null) {
49154915
let currentWidth = this.calcWidth;
4916-
if (this.hasVerticalSroll()) {
4916+
if (this.hasVerticalScroll()) {
49174917
currentWidth += this.scrollWidth;
49184918
}
49194919
width = currentWidth + 'px';
@@ -4955,7 +4955,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
49554955
let width = this.isPercentWidth ?
49564956
this.calcWidth :
49574957
parseInt(this.width, 10) || parseInt(this.hostWidth, 10) || this.calcWidth;
4958-
if (this.hasVerticalSroll() && !this.isPercentWidth) {
4958+
if (this.hasVerticalScroll() && !this.isPercentWidth) {
49594959
width -= this.scrollWidth;
49604960
}
49614961
if (this.pinning.columns === ColumnPinningPosition.End) {

projects/igniteui-angular/src/lib/grids/grid/grid.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
</div>
9696
<span *ngIf="hasMovableColumns && draggedColumn" [igxColumnMovingDrop]="headerContainer" [attr.droppable]="true"
9797
id="right" class="igx-grid__scroll-on-drag-right"></span>
98-
<div class="igx-grid__thead-thumb" [hidden]='!hasVerticalSroll()' [style.width.px]="scrollWidth"></div>
98+
<div class="igx-grid__thead-thumb" [hidden]='!hasVerticalScroll()' [style.width.px]="scrollWidth"></div>
9999
</div>
100100

101101
<div igxGridBody (keydown.control.c)="copyHandlerIE()" (copy)="copyHandler($event)" class="igx-grid__tbody">
@@ -196,7 +196,7 @@
196196
</div>
197197
<span *ngIf="hasMovableColumns && draggedColumn" [igxColumnMovingDrop]="headerContainer" [attr.droppable]="true"
198198
id="right" class="igx-grid__scroll-on-drag-right"></span>
199-
<div [hidden]='!hasVerticalSroll()' class="igx-grid__tbody-scrollbar" [style.width.px]="scrollWidth">
199+
<div [hidden]='!hasVerticalScroll()' class="igx-grid__tbody-scrollbar" [style.width.px]="scrollWidth">
200200
<div class="igx-grid__tbody-scrollbar-start" [style.height.px]=' isRowPinningToTop ? pinnedRowHeight : 0'></div>
201201
<div class="igx-grid__tbody-scrollbar-main" [style.height.px]='calcHeight'>
202202
<ng-template igxGridFor [igxGridForOf]='[]' #verticalScrollHolder></ng-template>
@@ -212,7 +212,7 @@
212212
[summaries]="id | igxGridSummaryDataPipe:summaryService.retriggerRootPipe" [index]="0"
213213
class="igx-grid__summaries" #summaryRow>
214214
</igx-grid-summary-row>
215-
<div class="igx-grid__tfoot-thumb" [hidden]='!hasVerticalSroll()' [style.height.px]='summariesHeight'
215+
<div class="igx-grid__tfoot-thumb" [hidden]='!hasVerticalScroll()' [style.height.px]='summariesHeight'
216216
[style.width.px]="scrollWidth"></div>
217217
</div>
218218

projects/igniteui-angular/src/lib/grids/grid/grid.multi-row-layout.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ describe('IgxGrid - multi-row-layout #grid', () => {
10791079

10801080
const rows = fixture.debugElement.query(By.css('.igx-grid__tbody')).queryAll(By.css('igx-grid-row'));
10811081
expect(rows.length).toEqual(4);
1082-
expect(grid.hasVerticalSroll()).toBeTruthy();
1082+
expect(grid.hasVerticalScroll()).toBeTruthy();
10831083

10841084
const verticalVirt = grid.verticalScrollContainer;
10851085

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
</div>
7979
<span *ngIf="hasMovableColumns && draggedColumn" [igxColumnMovingDrop]="headerContainer" [attr.droppable]="true"
8080
id="right" class="igx-grid__scroll-on-drag-right"></span>
81-
<div class="igx-grid__thead-thumb" [hidden]='!hasVerticalSroll()' [style.width.px]="scrollWidth"></div>
81+
<div class="igx-grid__thead-thumb" [hidden]='!hasVerticalScroll()' [style.width.px]="scrollWidth"></div>
8282
</div>
8383

8484
<div igxGridBody (keydown.control.c)="copyHandlerIE()" (copy)="copyHandler($event)" class="igx-grid__tbody">
@@ -130,7 +130,7 @@
130130
</div>
131131
<span *ngIf="hasMovableColumns && draggedColumn" [igxColumnMovingDrop]="headerContainer" [attr.droppable]="true"
132132
id="right" class="igx-grid__scroll-on-drag-right"></span>
133-
<div [hidden]='!hasVerticalSroll()' class="igx-grid__tbody-scrollbar" [style.width.px]="scrollWidth"
133+
<div [hidden]='!hasVerticalScroll()' class="igx-grid__tbody-scrollbar" [style.width.px]="scrollWidth"
134134
[style.height.px]='calcHeight'>
135135
<ng-template igxGridFor [igxGridForOf]='[]' #verticalScrollHolder></ng-template>
136136
</div>
@@ -143,7 +143,7 @@
143143
[summaries]="id | igxGridSummaryDataPipe:summaryService.retriggerRootPipe" [index]="0"
144144
class="igx-grid__summaries" #summaryRow>
145145
</igx-grid-summary-row>
146-
<div class="igx-grid__tfoot-thumb" [hidden]='!hasVerticalSroll()' [style.height.px]='summariesHeight'
146+
<div class="igx-grid__tfoot-thumb" [hidden]='!hasVerticalScroll()' [style.height.px]='summariesHeight'
147147
[style.width.px]="scrollWidth"></div>
148148
</div>
149149

0 commit comments

Comments
 (0)