|
1 | 1 | import { BidiModule, Direction } from '@angular/cdk/bidi'; |
2 | 2 | import { Component, DebugElement } from '@angular/core'; |
3 | | -import { ComponentFixture, fakeAsync, flush, TestBed, waitForAsync } from '@angular/core/testing'; |
4 | | -import { UntypedFormBuilder, UntypedFormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms'; |
| 3 | +import { ComponentFixture, TestBed, fakeAsync, flush, waitForAsync } from '@angular/core/testing'; |
| 4 | +import { FormsModule, ReactiveFormsModule, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; |
5 | 5 | import { By } from '@angular/platform-browser'; |
6 | 6 |
|
7 | 7 | import { NzStatus } from 'ng-zorro-antd/core/types'; |
@@ -62,6 +62,13 @@ describe('input', () => { |
62 | 62 | expect(inputElement.nativeElement.classList).toContain('ant-input'); |
63 | 63 | expect(inputElement.nativeElement.classList).toContain('ant-input-lg'); |
64 | 64 | }); |
| 65 | + it('should nzStepperLess work', () => { |
| 66 | + fixture.detectChanges(); |
| 67 | + expect(inputElement.nativeElement.classList).toContain('ant-input-stepperless'); |
| 68 | + testComponent.stepperless = false; |
| 69 | + fixture.detectChanges(); |
| 70 | + expect(inputElement.nativeElement.classList).not.toContain('ant-input-stepperless'); |
| 71 | + }); |
65 | 72 | }); |
66 | 73 |
|
67 | 74 | describe('input with textarea element', () => { |
@@ -204,11 +211,12 @@ export class NzTestInputWithDirComponent { |
204 | 211 | } |
205 | 212 |
|
206 | 213 | @Component({ |
207 | | - template: ` <input nz-input [nzSize]="size" [disabled]="disabled" /> ` |
| 214 | + template: ` <input nz-input [nzSize]="size" [disabled]="disabled" [nzStepperless]="stepperless" /> ` |
208 | 215 | }) |
209 | 216 | export class NzTestInputWithInputComponent { |
210 | 217 | size = 'default'; |
211 | 218 | disabled = false; |
| 219 | + stepperless = true; |
212 | 220 | } |
213 | 221 |
|
214 | 222 | @Component({ |
|
0 commit comments