Salon Appointment Scheduler - All test cases passing except for whether rows are being created in table?

Hi @moT01 ! From my perspective, the problem is that, in previous exercises from the certification, we were asked to implement some validity checks. Therefore, when completing this project, the logical thing to do is to implement relevant validity checks too.

The easiest fix would be to add a disclaimer warning the students not to add any validity checks, if it doesn’t fit the purpose of the exercise.

Another, more complex solution, would be to add more tests. For instance, a test to make sure that an appointment can’t be made for values over 23:59 or 12am/12pm. But if we walk that road, why not handle service_time as a DATE instead of a VARCHAR? And add some more tests to make sure that appointments can only be made during office hours? On the same road, some tests could also be added for the name and the phone number. Indeed, I have had similar issues while checking for a non-empty name and a well-formatted phone number, and I have had to disable those tests too. Again, maybe that’s beyond the scope of the exercise.

Here’s my working solution to the exercise, in case it saves you some time. Look for the 3 lines that say “validity check (disabled to pass the tests)”.

EDIT: for some reason, the subtask 1:16 fails now. The whole suite passed earlier, and when I try it in the terminal I get the expected behavior. Can you please take a look?

EDIT 2: I found a fix, moving to this post to elaborate.

1 Like