Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Product Development Challenge
- **Note on time estimates:** Some of these tasks can be done concurrently such
- as consultation with UX/design or manual testing.
- **1. Assume that the basic infrastructure of the application already exists including a
- public-facing site that enables job-seekers to submit applications.**
- **2. When an admin user logs into HobNobJobs and navigates to My Jobs, show a list of job
- openings assigned to the admin.**
- ###### Rails Back-End
- * Create tests that sends a GET request to an endpoint that when given an
- admin user's credentials, returns a list of jobs assigned to that admin
- * I start with an outward request/feature test here to get an idea of
- the big picture of what we need in this step of the criteria.
- * These tests should include a positive cases where the jobs are returned,
- and should also include tests to cover negative cases where some problem
- with the request returned no jobs.
- * **Time Estimate:** 1-1.5 hours
- * Create a model and joins table called *admin_jobs* to store a many-to-many
- relationship for **Jobs** and **Admins**
- * I like the idea of the ability for a job to have many different
- admins, all of whom may oversee a job. This could be useful for teams of
- people involved in a hiring process without admins having to share their
- personal credentials with the rest of the team.
- * **Time Estimate:** 20-30 minutes
- * Add these relationships to their given models:
- * **Admin** has_many *admin_jobs*
- * **Job** has_many *admin_jobs*
- * **AdminJob** belongs_to *admin*, belongs_to *job*
- * Create tests for these relationships in each respective model's tests.
- * **Time Estimate:** 15-20 minutes
- * Create route for an API endpoint to return the list of jobs assigned to an
- admin
- * **Time Estimate:** 5-10 minutes
- * Create controller for the route above
- * Ensure in this controller that the appropriate credentials are given with
- the request so that sensitive information is not public
- * **Time Estimate:** 1-1.5 hours
- * Create a method in the controller that corresponds with the appropriate
- controller action as given by the route made before
- * If the credentials are valid, use ActiveRecord with the relationships
- established before to retrieve the jobs for the given admin. Return these
- jobs as JSON with a status code of 200. If admin has no jobs, return
- a message that there are no jobs for this admin, even though the
- credentials were accepted as valid.
- * If the credentials are invalid, return an error
- message detailing something was wrong with the given or not given
- credentials.
- * Create tests for this controller to ensure that the positive and negative
- cases are covered.
- * **Time Estimate:** 1-2 hours
- * Manually test this new endpoint and add automated tests as needed to cover
- any missed test cases
- * **Time Estimate:** 4-5 days
- * Refactor as needed or where appropriate, including bug fixes
- * **Time Estimate:** 4-5 days
- ###### Front-End
- * Consult with the design and/or UX team to implement the structure and styling
- of the 'My Jobs' component
- * **Time Estimate:** 1-1.5 hours
- * Create tests for this component
- * Ensure that tests are written for a positive cases where the admin is
- shown a list of jobs assigned to them (or on a valid request, display
- there are no jobs if that admin has no jobs assigned to them), and
- negative cases where something went wrong with the request.
- * **Time Estimate:** 1-1.5 hours
- * Create a component that will be called when an admin clicks on 'My Jobs'
- * Implement the same authorization checks that exist when the admin logs
- into the application. If the user is not authorized, display a 404 page.
- * **Time Estimate:** 1 hour
- * Create a request that the component can call to fetch the jobs for that admin
- by sending the admin's credentials to the back-end route for this request.
- * Assuming there is some existing infrastructure already for securing the
- back end when using the application as an admin. For example, a JWT that
- could be sent to the Rails back-end for authentication.
- * **Time Estimate:** 1-1.5 hours
- * Implement displaying this gathered data into the design and structure created
- above
- * **Time Estimate:** 1-1.5 hours
- * Create a link for each displayed job that calls the component which will
- display the applicants for that job
- * **Time Estimate:** 15-30 minutes
- * Manually test this component and add automated tests as needed when edge
- cases are found
- * **Time Estimate:** 4-5 days
- * Refactor as needed or where appropriate, including bug fixes
- * **Time Estimate:** 4-5 days
- **3. When the admin selects a job opening from the list, show a list of
- applicants to that particular job.**
- ###### Rails Back-End
- * Create tests that send a GET request to an endpoint that when given an valid
- admin and job, returns a list of applicants with their details (such as
- email, name, resume/cover letter, etc)
- * Again, I start with a higher level feature/request test that will drive
- the development of this part of the user story.
- * These tests should include positive and negative cases and any potential
- edge cases.
- * **Time Estimate:** 1-1.5 hours
- * Create the appropriate model relationships below:
- * **Job** has_many *applicants*
- * **Applicant** belongs_to *job*
- * Add appropriate relationship tests to the above model's tests\
- * **Time Estimate:** 15-30 minutes
- * Create route and controller for an endpoint to return a list of applicants
- and their details when given a specific job
- * Ensure the same authentication practices are implemented as in Step 2 above,
- to protect sensitive data
- * **Time Estimate:** 1-1.5 hours
- * Create the appropriate method and action to handle the request to return
- a list of applicants and their details
- * We will take advantage of the AR relationship made and use that to
- query the database upon request.
- * If the request is valid, return the content with a 200 status code.
- * If the request is invalid, return an error.
- * **Time Estimate:** 1-2 hours
- * Create tests for the controller that covers both positive and negative cases
- * **Time Estimate:** 1-1.5 hours
- * Manually test this created endpoint and add any new automated tests as needed
- * **Time Estimate:** 4-5 days
- * Refactor as needed or where appropriate, including bug fixes
- * **Time Estimate:** 4-5 days
- ###### Front-End
- * Consult with design team on design and layout of the UX for displaying
- a list of applicants.
- * **Time Estimate:** 1-1.5 hours
- * Create tests for the Job applicants component
- * **Time Estimate:** 1-1.5 hours
- * Create the Job Applicants component
- * This component will make a request to gather the applicants and their
- details from the endpoint created above
- * **Time Estimate:** 1.5-2 hours
- * Implement displaying the requested data in the component's design
- * **Time Estimate:** 45-60 minutes
- * Manually test this component and add automated tests as needed
- * **Time Estimate:** 4-5 days
- * Refactor as needed or where appropriate, including bug fixes
- * **Time Estimate:** 4-5 days
- **4. Applicants can be sorted by Name, Email, Status, and Date Submitted.**
- * In the Job Applicant's component, we will add on-click events to the headers
- for the applicant's table
- * **Time Estimate:** 30-45 minutes
- * Implement a method in the component that will sort the table based on which
- header was clicked
- * Each header will keep track of what state it was in before it was
- clicked (either asc or desc).
- * The state of this order will determine how the table is sorted
- * Ensure that when sorting by date, sort by the date given in the requested
- data, and not the human-friendly date that is displayed to the admin
- user.
- * **Time Estimate:** 1.5-2 hours
- * Refactor as needed or where appropriate, including bug fixes
- * **Time Estimate:** 4-5 days
- **5. Selecting an applicant shows an Applicant Detail Modal, which displays and allows for
- modification of the applicant information.**
- * Consult with design on the layout and design of the Modal component, and the
- Edit Candidate component it will contain
- * **Time Estimate:** 1-1.5 hours
- * Create a test for a generic Modal component that we can reuse again somewhere
- else if needed, and create a test for the Edit Candidate component
- * **Time Estimate:** 1.5-2 hours
- * Implement the Modal component
- * Ensure there is a way to close the modal, either by clicking outside the
- modal, an 'X' or something similar, or both.
- * **Time Estimate:** 1.5-2 hours
- * Implement the Edit Candidate component
- * In the Job Applicants component, create a button component that will open
- the appropriate Edit Candidate modal when clicked
- * **Time Estimate:** 45-60 minutes
- * This component will have input and dropdown components, as well as a button
- component to save any entered or changed data
- * This component will also have its state be given by the Job Applicant
- component which opened it, with the Applicant's details filled in.
- * Manually test these components and add automated tests as needed
- * **Time Estimate:** 4-5 days
- * Refactor as needed or where appropriate, including bug fixes
- * **Time Estimate:** 4-5 days
- **6. Setting the status of a candidate to "Declined" sends an email to the candidate notifying
- them.**
- ###### Rails Back-End
- * Create a test that sends a PATCH request to an endpoint that updates the
- candidates status to 'Declined'
- * **Time Estimate:** 1.5-2 hours
- * Create an email template for the 'Declined' message
- * **Time Estimate:** 30-60 minutes
- * Create a test for this email template to ensure that the applicant's name
- is properly interoplated, as well as any other information that could be
- dynamically added to the email template.
- * **Time Estimate:** 45-60 minutes
- * Create a test for an update method for Applicant controller
- * **Time Estimate:** 1-1.5 hours
- * Add an update method to to the Applicant controller, that takes in
- the given params and updates the model appropriately.
- * **Time Estimate:** 30-60 minutes
- * To keep controllers skinny, we will create a method in the Applicant model
- that looks for a change to the model.
- * We can use a callback in the Applicant model that will run after a status
- is updated
- * **Time Estimate:** 45-60 minutes
- * Create a test for the new model callback method
- * **Time Estimate:** 30-45 minutes
- * This method that is ran by a callback will use ActionMailer to send the email
- with the appropriate template for 'Declined' status.
- * Manually test this new feature and endpoint and add automated tests as needed
- * **Time Estimate:** 4-5 days
- * Refactor as needed or where appropriate, including bug fixes
- * **Time Estimate:** 4-5 days
- ###### Front-End
- * In the Edit Candidate modal we will implement a method that will send a PATCH
- request to the back-end containing the user's ID, any authentication needed
- for the endpoint, and the updated status.
- * **Time Estimate:** 1.5-2 hours
- * Add tests for this feature to test for positive and negative cases for sending
- the PATCH request
- * **Time Estimate:** 1-1.5 hours
- * Ensure the modal closes after the request is sent
- * Implement an alert of some kind to tell the admin that the email has been
- sent to that applicant.
- * **Time Estimate:** 30-60 minutes
- * Manually test this updated Edit Candidate component and add any automated
- tests as needed.
- * **Time Estimate:** 4-5 days
- * Refactor as needed or where appropriate, including bug fixes
- * **Time Estimate:** 4-5 days
- **7. Setting the status of a candidate to "Interview Requested" sends an email requesting the
- candidate's availability.**
- ###### Rails Back-End
- * Create and test an email template for requesting an Interview and the
- candidate's availability.
- * **Time Estimate:** 30-60 minutes
- * Implement the callback method in the Applicant model to handle when a
- status is changed to 'Interview Requested'
- * **Time Estimate:** 45-60 minutes
- * Create a test for this new model callback method
- * **Time Estimate:** 30-45 minutes
- * With the implementation above in Step 6, ensure that this feature and
- request mostly works the same as when setting the status to 'Declined',
- sending the appropriate email by creating new tests
- * **Time Estimate:** 45-60 minutes
- * Manually test this new feature and add any automated tests if needed
- * **Time Estimate:** 4-5 days
- * Refactor any steps along the way as needed or where appropriate, including
- bug fixes
- * **Time Estimate:** 4-5 days
- ###### Front-End
- * Ensure the dropdown box for Status has 'Interview Requested' as an option
- * Manually test this behavior and if needed, add any additional automated tests
- * **Time Estimate:** 4-5 days
- * Refactor if necessary
- * **Time Estimate:** 4-5 days
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement