Skip to content

Commit a598262

Browse files
authored
Merge branch 'master' into simeonoff/merge-sassdocs
2 parents d421032 + a60086f commit a598262

File tree

9 files changed

+1622
-2298
lines changed

9 files changed

+1622
-2298
lines changed

package-lock.json

Lines changed: 41 additions & 645 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
"gulp-sourcemaps": "^2.6.4",
112112
"gulp-typescript": "^5.0.1",
113113
"gulp-uglify": "^3.0.1",
114-
"gulp-util": "^3.0.8",
115114
"hammer-simulator": "0.0.1",
116115
"ig-typedoc-theme": "^4.2.0",
117116
"igniteui-sassdoc-theme": "^1.1.4",

projects/igniteui-angular/src/lib/checkbox/checkbox.component.spec.ts

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ describe('IgxCheckbox', () => {
1515
declarations: [
1616
InitCheckboxComponent,
1717
CheckboxSimpleComponent,
18-
CheckboxDisabledComponent,
1918
CheckboxReadonlyComponent,
2019
CheckboxIndeterminateComponent,
2120
CheckboxRequiredComponent,
@@ -26,8 +25,7 @@ describe('IgxCheckbox', () => {
2625
IgxCheckboxComponent
2726
],
2827
imports: [FormsModule, ReactiveFormsModule, IgxRippleModule, NoopAnimationsModule]
29-
})
30-
.compileComponents();
28+
}).compileComponents();
3129
}));
3230

3331
it('Initializes a checkbox', () => {
@@ -196,15 +194,11 @@ describe('IgxCheckbox', () => {
196194
expect(nativeCheckbox.checked).toBe(true);
197195
}));
198196

199-
it('Disabled state', fakeAsync(() => {
200-
const fixture = TestBed.createComponent(CheckboxDisabledComponent);
201-
// Requires two async change detection cycles to setup disabled on the component and then native element
202-
fixture.detectChanges();
203-
tick();
204-
fixture.detectChanges();
205-
tick();
206-
const testInstance = fixture.componentInstance;
207-
const checkboxInstance = testInstance.cb;
197+
it('Disabled state', () => {
198+
const fixture = TestBed.createComponent(IgxCheckboxComponent);
199+
200+
const checkboxInstance = fixture.componentInstance;
201+
checkboxInstance.disabled = true;
208202
const nativeCheckbox = checkboxInstance.nativeCheckbox.nativeElement as HTMLInputElement;
209203
const nativeLabel = checkboxInstance.nativeLabel.nativeElement as HTMLLabelElement;
210204
const placeholderLabel = checkboxInstance.placeholderLabel.nativeElement;
@@ -220,7 +214,7 @@ describe('IgxCheckbox', () => {
220214

221215
// Should not update
222216
expect(checkboxInstance.checked).toBe(false);
223-
}));
217+
});
224218

225219
it('Readonly state', () => {
226220
const fixture = TestBed.createComponent(CheckboxReadonlyComponent);
@@ -374,16 +368,6 @@ class CheckboxRequiredComponent {
374368
@ViewChild('cb', { static: true }) public cb: IgxCheckboxComponent;
375369
}
376370

377-
@Component({
378-
template: `<igx-checkbox #cb
379-
[(ngModel)]="subscribed"
380-
[disabled]="true">Disabled</igx-checkbox>`})
381-
class CheckboxDisabledComponent {
382-
@ViewChild('cb', { static: true }) public cb: IgxCheckboxComponent;
383-
384-
public subscribed = false;
385-
}
386-
387371
@Component({
388372
template: `<igx-checkbox #cb
389373
[(ngModel)]="subscribed"

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.spec.ts

Lines changed: 1545 additions & 1597 deletions
Large diffs are not rendered by default.

projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid-integration.spec.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,5 +1762,20 @@ describe('IgxTreeGrid - Integration #tGrid', () => {
17621762
firstRow.pinned = true;
17631763
expect(firstRow.pinned).toBeTrue();
17641764
});
1765+
1766+
it('should delete pinned row without errors', () => {
1767+
treeGrid.pinRow(147);
1768+
fix.detectChanges();
1769+
const firstRow = treeGrid.pinnedRows[0];
1770+
1771+
expect(firstRow.isRoot).toBe(true);
1772+
expect(firstRow.pinned).toBeTrue();
1773+
expect(firstRow.data.ID).toEqual(147);
1774+
1775+
treeGrid.deleteRowById(147);
1776+
fix.detectChanges();
1777+
1778+
expect(firstRow.isRoot).toBe(false);
1779+
});
17651780
});
17661781
});

projects/igniteui-angular/src/lib/grids/tree-grid/tree-grid-row.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class IgxTreeGridRowComponent extends IgxRowDirective implements DoCheck
7373
if (isPinnedArea) {
7474
treeRec = this.grid.unpinnedRecords.find(x => x.data === this.data);
7575
}
76-
return treeRec.level === 0;
76+
return treeRec?.level === 0;
7777
}
7878

7979
/**

projects/igniteui-angular/src/lib/radio/radio.component.spec.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ describe('IgxRadio', () => {
2323
RadioInvisibleLabelComponent
2424
],
2525
imports: [FormsModule, IgxRippleModule, NoopAnimationsModule]
26-
})
27-
.compileComponents();
26+
}).compileComponents();
2827
}));
2928

3029
it('Init a radio', () => {
@@ -59,7 +58,6 @@ describe('IgxRadio', () => {
5958
fixture.detectChanges();
6059
expect(radio.id).toBe('customRadio');
6160
expect(domRadio.id).toBe('customRadio');
62-
6361
});
6462

6563
it('Binding to ngModel', fakeAsync(() => {
@@ -144,8 +142,8 @@ describe('IgxRadio', () => {
144142
const testInstance = fixture.componentInstance;
145143

146144
// get the disabled radio button
147-
const componentInstance = testInstance.radios.last;
148-
const radio = componentInstance.nativeRadio.nativeElement;
145+
const componentInstance = testInstance.radios.last as IgxRadioComponent;
146+
const radio = componentInstance.nativeRadio.nativeElement as HTMLInputElement;
149147

150148
expect(componentInstance.disabled).toBe(true);
151149
expect(radio.disabled).toBe(true);

projects/igniteui-angular/src/lib/switch/switch.component.spec.ts

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, ViewChild } from '@angular/core';
2-
import { fakeAsync, TestBed, tick, waitForAsync } from '@angular/core/testing';
2+
import { TestBed, waitForAsync } from '@angular/core/testing';
33
import { UntypedFormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
44
import { By } from '@angular/platform-browser';
55
import { IgxRippleModule } from '../directives/ripple/ripple.directive';
@@ -10,21 +10,20 @@ import { NoopAnimationsModule } from '@angular/platform-browser/animations';
1010

1111
describe('IgxSwitch', () => {
1212
configureTestSuite();
13+
1314
beforeAll(waitForAsync(() => {
1415
TestBed.configureTestingModule({
1516
declarations: [
1617
InitSwitchComponent,
1718
SwitchSimpleComponent,
1819
SwitchRequiredComponent,
19-
SwitchDisabledComponent,
2020
SwitchExternalLabelComponent,
2121
SwitchInvisibleLabelComponent,
2222
SwitchFormGroupComponent,
2323
IgxSwitchComponent
2424
],
2525
imports: [FormsModule, ReactiveFormsModule, IgxRippleModule, NoopAnimationsModule]
26-
})
27-
.compileComponents();
26+
}).compileComponents();
2827
}));
2928

3029
it('Initializes', () => {
@@ -148,16 +147,11 @@ describe('IgxSwitch', () => {
148147
expect(nativeCheckbox.required).toBe(false);
149148
});
150149

151-
it('Disabled state', fakeAsync(() => {
152-
const fixture = TestBed.createComponent(SwitchDisabledComponent);
153-
// Requires two async change detection cycles to setup disabled on the component and then native element
154-
fixture.detectChanges();
155-
tick();
156-
fixture.detectChanges();
157-
tick();
158-
const testInstance = fixture.componentInstance;
159-
const switchInstance = testInstance.switch;
160-
const nativeCheckbox = switchInstance.nativeCheckbox.nativeElement;
150+
it('Disabled state', () => {
151+
const fixture = TestBed.createComponent(IgxSwitchComponent);
152+
const switchInstance = fixture.componentInstance;
153+
switchInstance.disabled = true;
154+
const nativeCheckbox = switchInstance.nativeCheckbox.nativeElement as HTMLInputElement;
161155
const nativeLabel = switchInstance.nativeLabel.nativeElement;
162156
const placeholderLabel = switchInstance.placeholderLabel.nativeElement;
163157
fixture.detectChanges();
@@ -172,7 +166,7 @@ describe('IgxSwitch', () => {
172166

173167
// Should not update
174168
expect(switchInstance.checked).toBe(false);
175-
}));
169+
});
176170

177171
it('Event handling', () => {
178172
const fixture = TestBed.createComponent(SwitchSimpleComponent);
@@ -250,17 +244,6 @@ class SwitchRequiredComponent {
250244
@ViewChild('switch', { static: true }) public switch: IgxSwitchComponent;
251245
}
252246

253-
@Component({
254-
template: `<igx-switch #switch
255-
[(ngModel)]="subscribed"
256-
[checked]="subscribed"
257-
[disabled]="true">Disabled</igx-switch>`})
258-
class SwitchDisabledComponent {
259-
@ViewChild('switch', { static: true }) public switch: IgxSwitchComponent;
260-
261-
public subscribed = false;
262-
}
263-
264247
@Component({
265248
template: `<p id="my-label">{{label}}</p>
266249
<igx-switch #switch aria-labelledby="my-label"></igx-switch>`

src/app/input/input.sample.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ <h1 igxListLineTitle>Airplane Mode</h1>
5757
</igx-switch>
5858
</div>
5959
</igx-list-item>
60+
6061
<igx-list-item *ngFor="let item of settings">
6162
<igx-icon igxListThumbnail>{{item.icon}}</igx-icon>
6263
<h1 igxListLineTitle>{{item.name}}</h1>

0 commit comments

Comments
 (0)