thefrontside / thefrontside/interactors
Allow pass a custom third-party interactor to `setDay` action for Calendar
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36
- Forks
- 2
- Avg merge
- 4m
- Merged PRs (30d)
- 2
Description
There is a case with custom day render there days from prev and next months could be visible. In that situation setDay with number of the day throws an error because calendar container contains two same days.
test.step(
renderCalendar((onChange) => ({
renderDay: (day, _selectedDate, dayInCurrentMonth, dayComponent) =>
cloneElement(dayComponent, {
hidden: false,
...(dayInCurrentMonth
? undefined
: { style: { opacity: "0.5" }, onClick: () => onChange?.(day as Date) }),
}),
}))
)
.step(Calendar().setDay(4))
.assertion(Calendar("4 September 2014").exists())
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Calendar().setDay(4) action and the renderCalendar reproduction in the issue, focusing on how duplicate days from adjacent months are selected. Confirm the failing assertion, then make the action support the custom day interactor so the September 4 date is selected without the duplicate-day error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 44/100