-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(module: date-picker): fix year-picker and month-picker style erro… #2136
Conversation
@@ -146,7 +146,7 @@ describe('NzMonthPickerComponent', () => { | |||
it('should support nzClassName', () => { | |||
const className = fixtureInstance.nzClassName = 'my-test-class'; | |||
fixture.detectChanges(); | |||
const picker = debugElement.query(By.css('.ant-calendar-picker')).nativeElement as HTMLElement; | |||
const picker = debugElement.queryAll(By.css('.ant-calendar-picker'))[1].nativeElement as HTMLElement; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems it has nothing todo with the pr with this code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vthinkxie Two elements in the picker has css class ant-calendar-picker
, but the test target is the second element. I found the same code in date-picker.component.spec.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hungtcs great, can you add some test for the bug you fixed? thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vthinkxie It's hard to test styles via javascript, see this stackblitz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hungtcs the test is must for ci, you can use https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle to test the style in javascript.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vthinkxie Thank you, I will add the test case later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vthinkxie Test case is completed.
…r within compacted input group
…r within compacted input group (NG-ZORRO#2136) GLTM
…r within compacted input group
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: 2084
What is the new behavior?
Does this PR introduce a breaking change?
Other information