Skip to content
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

Merged
merged 2 commits into from
Sep 19, 2018
Merged

Conversation

hungtcs
Copy link
Contributor

@hungtcs hungtcs commented Sep 14, 2018

…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?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: 2084

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@@ -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;
Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor Author

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.

@vthinkxie vthinkxie merged commit 049212f into NG-ZORRO:master Sep 19, 2018
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this pull request Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants