Move deliberately and methodically through the stories provided below.
Stay calm and code on!
Doctors APPointment is an app where a user can schedule an appointment with a doctor without logging in or registering. The doctor can then log in and view all of their appointments. The Doctor should be able to READ, UPDATE, & DELETE appointments.
Your schema should be built using migrations
.
In order to submit it please fork & clone this repository and slack it the finished version to your instructor before the allocated time frame completes.
You should git add, commit, and push after each story is completed
NOTE - Please note that all the routes listed below (ex /appointments/confirmed
) are just suggestions and you can structure your routes however you would like.
#1
X As a user
When I go to the root route
I see a list of doctors available.
#2
XAs a User
When I click on a doctors 'Book' link
I am redirected to /book/:doctor_id .
#3
X As a User
When I visit /book/:doctor_id
I see a form for creating a new appointment.
#4
As a User
When I submit the form for creating a new appointment
I am redirected to the root route.
#1
As a Doctor
When I visit /doctors/login
I see a form to register.
#2
As a Doctor
When I submit the form to register
I am redirected back to the login page.
#3
As a Doctor
When I visit /doctors/login
I see a form to login (along with the register form, see wireframe).
#4
As a Doctor
If I enter invalid credentials into the login form & submit
I am redirected back to the login page.
#5
As a Doctor
If I enter valid credentials into the login form & submit
I am redirected to /appointments
#6
As a Doctor
If I am not logged in and try to visit /appointments (or any route that stems from it)
I am redirected to /doctors/login
#1
As a Doctor
When I visit /appointments
I should see three links (confirmed appointments, unconfirmed appointments, and completed appointments).
#2
As a Doctor
When I click the "unconfirmed appointments" link
I should be redirected to /appointments/unconfirmed.
#3
As a Doctor
When I click the "completed appointments" link
I should be redirected to /appointments/completed.
#4
As a Doctor
When I click the "confirmed appointments" link
I should be redirected to /appointments (the default display for /appointments will show confirmed appointments).
#5
As a Doctor
When I visit /appointments
I see a list of all confirmed appointments.
#6
As a Doctor
When I click the "unconfirmed appointments" link
I should be redirected to /appointments/unconfirmed
#7
As a Doctor
When I visit /appointments/unconfirmed
I see a list of all unconfirmed appointments.
#8
As a Doctor
When I click the "completed appointments" link
I should be redirected to /appointments/completed
#9
As a Doctor
When I visit /appointments/completed
I see a list of all completed appointments.
#1
As a Doctor
When I click on the "view" button for an appointment
I am redirected to /appointments/view/:id .
#2
As a Doctor
When I visit /appointments/view/:id
I should see the information about the appointment.
#3
As a Doctor
When I visit /appointments/view/:id & the appointment is unconfirmed
I should see a "Confirm Appointment" button.
#4
As a Doctor
When I click the "Confirm Appointment" button
Then the appointment should be changed from 'unconfirmed' to 'confirmed',
I should also be redirected back to /appointments
#5
As a Doctor
When I visit /appointments/view/:id & the appointment is confirmed
I should see a "Mark as Completed" button.
#6
As a Doctor
When I click the "Mark as Completed" button
Then the appointment should be changed from 'confirmed' to 'completed',
I should also be redirected back to /appointments
#7
As a Doctor
When I visit /appointments/view/:id & the appointment is completed
I should see a "Delete Appointment" button.
#8
As a Doctor
When I click the "Delete Appointment" button
Then the appointment should be deleted,
I should also be redirected back to /appointments
#9
As a Doctor
When I visit /appointments/view/:id
I should see a link to edit the appointment.
#10
As a Doctor
When I click the edit link on the appointments page
I should be redirected to /appointments/edit/:id.
#10
As a Doctor
When I visit /appointments/edit/:id
I should see a form to edit the appointment (with all of the values pre-populated)
#11
As a Doctor
When I submit the form to edit an appointment
It should redirect me back to the appointments view page (/appointments/view/:id) & the information should be correctly updated
#1
As a Doctor
When I visit /appointments/view/:id
I should see a list of all notes left on the appointment.
#2
As a Doctor
When I visit /appointments/view/:id
I should see a form for entering a new note.
#3
As a Doctor
When I submit the form for a new note
I should see my new note on the appointment page.