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(slider): should round value when dateField=true #1968

Merged
merged 2 commits into from Mar 7, 2024
Merged

Conversation

louis-bompart
Copy link
Contributor

When using DATE field, we do not support sub-second precision https://connect.coveo.com/s/article/14754
So let's round it up when dateField=true.

https://coveord.atlassian.net/browse/JSUI-3510

Deploy

@louis-bompart louis-bompart requested a review from a team as a code owner March 7, 2024 05:34
@louis-bompart louis-bompart requested review from olamothe, y-lakhdar and fpbrault-dev and removed request for a team March 7, 2024 05:34
@louis-bompart louis-bompart changed the title fix(Slider): should round value when dateField=true fix(slider): should round value when dateField=true Mar 7, 2024
@louis-bompart louis-bompart enabled auto-merge (squash) March 7, 2024 05:37
@@ -77,6 +77,37 @@ export function SliderTest() {
expect(slider.getValues()).toEqual([25, 75]);
});

it('should return round values when using dateField', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tests here are a bit lazy and do not really respect encapsulation, but I think it's fine because this allow the test to get to the point and test actually what's wrong without having over the top setup.

@louis-bompart louis-bompart merged commit 553a4fd into master Mar 7, 2024
2 checks passed
@louis-bompart louis-bompart deleted the JSUI-3510 branch March 7, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants