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

Add dite/time input with default value with a defined range #425

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

RafikLkr
Copy link

@RafikLkr RafikLkr commented Jan 27, 2025

What is the problem that this PR addresses?

This PR addresses the need to verify the handling of default values and the validation of date input prompts. Specifically, it ensures that when the user presses "Enter" without providing a date, the default date value is correctly returned. Additionally, this PR introduces functionality to validate if the input date falls within a defined range, with a minimum and maximum date that can be specified.

Closes #121 (assuming this is the issue related to the functionality being tested)

How did you solve it?

I implemented a unit test for the date input prompt. The test simulates a scenario where the user presses "Enter" without providing a date, which should return the default value specified (in this case, "2023-01-01"). The test uses create_pipe_input to simulate the user input and DummyOutput to handle output, verifying that the expected default value is returned correctly.

Checklist

  • I have read the Contributor's Guide.
  • I will check that all automated PR checks pass before the PR gets reviewed.

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.

Add a date/time input
1 participant