SA5-EV Explanation Video: Model Associations

How to Start

  1. Access the GitHub organization’s repositories page.
  2. Create a new repository from the template.
    • Click the New repository button at the top-right of the page.
    • Fill out the Create a new repository form as follows:
      • Repository template: Select template-sa5-ev.
      • Owner: Select comp-7012-s25.
      • Repository name: Use the form below to generate the name for your repository.
        • It is required that your repository’s name precisely follow the format produced by the form.
      • Select Private, so that only you and your instructors can access your repository.
    • Click the Create repository button at the bottom right of the page.
  3. cd into your workspace folder.
  4. git clone the repo you created above.
  5. cd into the new working tree.
  6. Open the working directory in VS Code and bundle install/rails db:migrate && rails db:seed.
  7. Start your screen recording (as per these instructions) and begin the task.

sa5-ev-hsimpson-1

Task

The aim of this project is enable users to create and edit basketball team rosters. The project already includes a Team model class and a Player model class, as per this class diagram:

Along with these model classes, the app includes the standard resource-CRUDing pages and UI features for Team model objects (but not for Player objects). It also includes model validations and database seeds. (You can ignore the test fixtures and model tests for this assignment.) It is recommended that you initialize and run the base app at this point, so you can see what’s there.

Task to perform:

In the video, be sure to use all features that you create, so that it’s clear that they work. Don’t forget to enter invalid data into the forms.

Detailed Specifications

Existing Functionalities

New Functionalities

Additional Constraints:

Note: Italicized requirements will be manually confirmed by the graders.

Testing Your Work with RSpec

Each of the feature stories above corresponds to an RSpec feature spec. These tests (and others for the additional constraints) have been provided in the repository to help you check whether your implementation meets the requirements.

  1. Read through the detailed specifications first. Understand what is required for each page and scenario.
  2. Approach 1 - for those familiar with Test-Driven Development (TDD):
    • Run rspec spec/features to execute the feature tests.
    • Try to write the minimum amount of code needed to make each test pass.
    • Watch the tests fail and pass as you meet each requirement.
    • At the end, run all the provided tests with the rspec command to check if everything passes.
      • Note that not all tests are feature tests, so it is necessary to run rspec at the end to ensure that all tests are run.
  3. Approach 2 - for those less experienced with testing:
    • Work through the specifications step by step, ensuring your implementation meets each requirement.
    • Once you’ve completed your implementation, run all the tests with the rspec command to check if everything passes.

Either of the above approaches is fine, as long as all tests pass by the end.

How to Submit

Once you’ve completed the task and confirmed that all tests pass, perform the follow steps to submit your work.

  1. Commit your changes and push them to GitHub.
    • git add -A
    • git commit -m "Completed SA5-EV Explanation Video"
    • git push
  2. Stop recording and save the video.
  3. Submit to Canvas.
    • Submit a Word DOCX that contains the following:
      • The link to your GitHub repository where your code is hosted.
      • The link(s) to your video(s) as per these instructions.