Access the GitHub organization’s repositories page.
In your web browser, log into GitHub.
Navigate to the repositories page of the memphis-comp-7012-2024-08fall GitHub organization.
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-sa2-ev.
Owner: Select memphis-comp-7012-2024-08fall.
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.
Once you have filled out all the fields, click the Create repository button at the bottom right of the page.
Clone the repository and set up your local environment.
In your terminal, clone the newly created repository into your workspace folder.
Set up local repository by following steps similar to those in the Running Apps demo.
Start the recording.
You may start your screen recording after you have cloned the repository and are ready to start the task (see the EV general instructions).
sa2-ev-hjsimpson-1
Task
Add a page that displays data about a movie and a page that presents a review of the movie to the provided Rails app. Be creative in designing your pages but your design must at least meet the detailed specifications.
Note: You will probably want to read through the requirements and plan out these pages before you begin recording, and be careful not to make them to long. You may copy/paste text for the movie data and the review from the web during the video (e.g., Rotten Tomatoes or IMDB) to help speed things along.
Detailed Specifications
Feature: Explore Movie Information
User Story:
As a visitor,
I want to view detailed information about a movie
So that I can learn more about it
Scenario: Viewing the movie description page content
Given I am on the /movie page
Then I should see a heading in an h1 element
And I should see a subheading in an h2 element
And I should see a paragraph with a description in a p element
And I should see a list of movie details in a ul element containing at least 3 li items
And I should see an image related to the movie
And I should see a link with text “Review”
Scenario: Redirecting from the root page to the movie page
When I visit the root URL
Then I should be automatically redirected to the /movie page
Feature: Read Movie Review
User Story:
As a visitor,
I want to read a review of the movie
So that I can understand others’ opinions about it
Scenario: Viewing the movie review page content
Given I am on the /review page
Then I should see a heading in an h1 element
And I should see a paragraph with the review content in a p element
And I should see a link with text “Back to Movie”
Scenario: Navigating to the review page from the movie page
Given I am on the /movie page
When I click on the “Review” link
Then I should be on the /review page
Scenario: Navigating back to the movie page from the review page
Given I am on the /review page
When I click on the “Back to Movie” link
Then I should be on the /movie page
Additional Constraints:
You must follow the standard Rails conventions:
Each page must have a path helper following the standard Rails convention:
/movie is movie_path
/review is review_path
/movie routes to PagesController#movie
/review routes to PagesController#review
Links must use the link_to helper with the appropriate path helper
The scenario “Navigating back to the movie page from the review page” should use root_path
Images must use the image_tag helper
All HTML tags must be properly closed
No duplication of head/style/body elements in the rendered HTML
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 have been provided in the repository to help you check whether your implementation meets the requirements.
Recommended Workflow
Read through the detailed specifications first. Understand what is required for each page and scenario.
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.
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 Your Work
Once you’ve completed the task and confirmed that all tests pass:
Commit your changes:
Add all your changes:
git add -A
Commit your work with a meaningful message:
git commit -m"Completed SA2 Explanation Video"
Push your changes to GitHub:
Push your commits to the remote repository:
git push
Submit to Canvas:
A Word DOCX that contains:
The link to your GitHub repository where your code is hosted.
The link to your video if you are using Teams to record. (If you are not using Teams, then upload the video file.)