Giter Club home page Giter Club logo

belt_test's People

Watchers

 avatar

belt_test's Issues

User Dashboard: Github Following

๐Ÿ‘‡ ๐Ÿ‘‡ ๐Ÿ‘‡ ๐Ÿ‘‡
REMINDER: Don't start this story until you and your partner pair on and deploy the previous user story.
โ˜๏ธ โ˜๏ธ โ˜๏ธ โ˜๏ธ

Details: A user exists in the database. They have a Github token stored. Generate a token here for testing and development: https://github.com/settings/tokens

A future story will implement generating these tokens dynamically but that isn't necessary here.

As a logged in user
When I visit /dashboard
Then I should see a section for "Github"
And under that section I should see another section titled "Following"
And I should see list of users I follow with their handles linking to their Github profile

API endpoint documentation
https://developer.github.com/v3/users/followers/#list-users-followed-by-another-user

  • API call uses authenticated call
  • No hashes in the view.
  • Uses objects in the view to represent the Github users.

User Dashboard: Github Repositories

Details: A user exists in the database. They have a Github token stored. Generate a token here for testing and development: https://github.com/settings/tokens

A future story will implement generating these tokens dynamically but that isn't necessary here.

As a logged in user
When I visit /dashboard
Then I should see a section for "Github"
And under that section I should see a list of 5 repositories with the name of each Repo linking to the repo on Github

Email invitations

Background: We want to be able to enter a user's Github handle and send them an email invite to our app. You'll use the Github API to retrieve the email address of the invitee.

As a registered user
When I visit /dashboard
And I click "Send an Invite"
Then I should be on /invite

And when I fill in "Github Handle" with <A VALID GITHUB HANDLE>
And I click on "Send Invite"
Then I should be on /dashboard
And I should see a message that says "Successfully sent invite!" (if the user has an email address associated with their github account)
Or I should see a message that says "The Github user you selected doesn't have an email address associated with their account."

The email should read as follows

Hello <INVITEE_NAME_AS_IT_APPEARS_ON_GITHUB>,

<INVITER_NAME_AS_IT_APPEARS_ON_GITHUB> has invited you to join <YOUR_APP_NAME>. You can create an account <here (should be a link to /signup)>.

Add validation on `position` to `Video` model

The tutorial's show page will error out if there's a video associated with the tutorial that doesn't have a position set.

After adding the validation, write a script that updates all records in the database with a nil value stored in the position column.

  • Tested

User Dashboard: Bookmarks

As a logged in user
When I visit '/dashboard'
Then I should see a list of all bookmarked segments under the Bookmarked Segments section
And they should be organized by which tutorial they are a part of
And the videos should be ordered by their position

  • Only makes one query to the database (no n+1 queries)
  • Avoids loading all videos into memory

User Dashboard: Github Repositories

Details: A user exists in the database. They have a Github token stored. Generate a token here for testing and development: https://github.com/settings/tokens

A future story will implement generating these tokens dynamically but that isn't necessary here.

As a logged in user
When I visit /dashboard
Then I should see a section for "Github"
And under that section I should see a list of 5 repositories with the name of each Repo linking to the repo on Github

User Dashboard: Github Following

๐Ÿ‘‡ ๐Ÿ‘‡ ๐Ÿ‘‡ ๐Ÿ‘‡
REMINDER: Don't start this story until you and your partner pair on and deploy the previous user story.
โ˜๏ธ โ˜๏ธ โ˜๏ธ โ˜๏ธ

Details: A user exists in the database. They have a Github token stored. Generate a token here for testing and development: https://github.com/settings/tokens

A future story will implement generating these tokens dynamically but that isn't necessary here.

As a logged in user
When I visit /dashboard
Then I should see a section for "Github"
And under that section I should see another section titled "Following"
And I should see list of users I follow with their handles linking to their Github profile

API endpoint documentation
https://developer.github.com/v3/users/followers/#list-users-followed-by-another-user

  • API call uses authenticated call
  • No hashes in the view.
  • Uses objects in the view to represent the Github users.

User Dashboard: Github Followers

๐Ÿš” ๐Ÿ‘ฎโ€โ™€๏ธ ๐Ÿ‘ฎโ€โ™€๏ธ ๐Ÿ‘ฎโ€โ™€๏ธ
DO NOT START THIS STORY UNLESS STORY #6 HAS BEEN COMPLETED BY BOTH IN YOUR PAIR.

You should pair on story #6 and deploy it prior to working on this one.

Continue this process for all stories labeled spike first. You will learn more this way and produce better code.

๐Ÿš“ ๐Ÿ’จ ๐Ÿ‘ฎ ๐Ÿ‘ฎ ๐Ÿ‘ฎ

Details: A user exists in the database. They have a Github token stored. Generate a token here for testing and development: https://github.com/settings/tokens

A future story will implement generating these tokens dynamically but that isn't necessary here.

No need to hit the endpoint for followings. A future story will address this.

As a logged in user
When I visit /dashboard
Then I should see a section for "Github"
And under that section I should see another section titled "Followers"
And I should see list of all followers with their handles linking to their Github profile

API endpoint documentation
https://developer.github.com/v3/users/followers/

  • API call uses authenticated call: /user/followers instead of /users/:username/followers
  • No hashes in the view.
  • Uses objects in the view to represent the followers.

Make Bookmark display message if user is not logged in

GET /tutorials/:id

Currently the Bookmark link will redirect to the login page and stop the video from playing which leads to a rather jarring experience.

Let's display a message that says "User must login to bookmark videos." A tooltip or flash notice could be good options?

User Dashboard: Github OAuth

Details: We want a user to have the option to connect their Github account and retrieve a user specific token automatically.

As a user
When I visit /dashboard
Then I should see a link that is styled like a button that says "Connect to Github"
And when I click on "Connect to Github"
Then I should go through the OAuth process
And I should be redirected to /dashboard
And I should see all of the content from the previous Github stories (repos, followers, and following)

Tips: Testing this is tricky. Don't worry about testing during the spike. In fact, TDD'ing this is really tricky if you've never done it before. Get a working implementation first even when you are pairing and backfill a test. You should not try to fill out the form and click buttons on Github in your tests. Omniauth gives us a special way to test this. Use these docs as a starting point: https://github.com/omniauth/omniauth/wiki/Integration-Testing

  • Uses Omniauth Github (does not hand roll the OAuth handshake)
  • Tests the handshake using Omniauth Mock Auth (see above tips section).

Import YouTube playlist

Currently tutorials can be created by manually entering information and then manually entering videos one by one.

The playlist importer should take a playlist_id which relates to a youtube playlist and import all of the videos and associate them with a tutorial.

As an admin
When I visit '/admin/tutorials/new'
Then I should see a link for 'Import YouTube Playlist'
When I click 'Import YouTube Playlist'
Then I should see a form

And when I fill in 'Playlist ID' with a valid ID
Then I should be on '/admin/dashboard'
And I should see a flash message that says 'Successfully created tutorial. View it here.'
And 'View it here' should be a link to '/tutorials/:id'
And when I click on 'View it here'
Then I should be on '/tutorials/:id'
And I should see all videos from the YouTube playlist
And the order should be the same as it was on YouTube
  • Retain the original sequence from YouTube
  • Creates a video record for each video in the playlist and stores the youtube id.
  • Associates each video stored in the DB is associated with a tutorial. (validate presence of tutorial id)

User Dashboard: Github Following

๐Ÿ‘‡ ๐Ÿ‘‡ ๐Ÿ‘‡ ๐Ÿ‘‡
REMINDER: Don't start this story until you and your partner pair on and deploy the previous user story.
โ˜๏ธ โ˜๏ธ โ˜๏ธ โ˜๏ธ

Details: A user exists in the database. They have a Github token stored. Generate a token here for testing and development: https://github.com/settings/tokens

A future story will implement generating these tokens dynamically but that isn't necessary here.

As a logged in user
When I visit /dashboard
Then I should see a section for "Github"
And under that section I should see another section titled "Following"
And I should see list of users I follow with their handles linking to their Github profile

API endpoint documentation
https://developer.github.com/v3/users/followers/#list-users-followed-by-another-user

  • API call uses authenticated call
  • No hashes in the view.
  • Uses objects in the view to represent the Github users.

User Dashboard: Github Followers

๐Ÿš” ๐Ÿ‘ฎโ€โ™€๏ธ ๐Ÿ‘ฎโ€โ™€๏ธ ๐Ÿ‘ฎโ€โ™€๏ธ
DO NOT START THIS STORY UNLESS STORY #6 HAS BEEN COMPLETED BY BOTH IN YOUR PAIR.

You should pair on story #6 and deploy it prior to working on this one.

Continue this process for all stories labeled spike first. You will learn more this way and produce better code.

๐Ÿš“ ๐Ÿ’จ ๐Ÿ‘ฎ ๐Ÿ‘ฎ ๐Ÿ‘ฎ

Details: A user exists in the database. They have a Github token stored. Generate a token here for testing and development: https://github.com/settings/tokens

A future story will implement generating these tokens dynamically but that isn't necessary here.

No need to hit the endpoint for followings. A future story will address this.

As a logged in user
When I visit /dashboard
Then I should see a section for "Github"
And under that section I should see another section titled "Followers"
And I should see list of all followers with their handles linking to their Github profile

API endpoint documentation
https://developer.github.com/v3/users/followers/

  • API call uses authenticated call: /user/followers instead of /users/:username/followers
  • No hashes in the view.
  • Uses objects in the view to represent the followers.

Import YouTube playlist

Currently tutorials can be created by manually entering information and then manually entering videos one by one.

The playlist importer should take a playlist_id which relates to a youtube playlist and import all of the videos and associate them with a tutorial.

As an admin
When I visit '/admin/tutorials/new'
Then I should see a link for 'Import YouTube Playlist'
When I click 'Import YouTube Playlist'
Then I should see a form

And when I fill in 'Playlist ID' with a valid ID
Then I should be on '/admin/dashboard'
And I should see a flash message that says 'Successfully created tutorial. View it here.'
And 'View it here' should be a link to '/tutorials/:id'
And when I click on 'View it here'
Then I should be on '/tutorials/:id'
And I should see all videos from the YouTube playlist
And the order should be the same as it was on YouTube
  • Retain the original sequence from YouTube
  • Creates a video record for each video in the playlist and stores the youtube id.
  • Associates each video stored in the DB is associated with a tutorial. (validate presence of tutorial id)

User Dashboard: Github OAuth

Details: We want a user to have the option to connect their Github account and retrieve a user specific token automatically.

As a user
When I visit /dashboard
Then I should see a link that is styled like a button that says "Connect to Github"
And when I click on "Connect to Github"
Then I should go through the OAuth process
And I should be redirected to /dashboard
And I should see all of the content from the previous Github stories (repos, followers, and following)

Tips: Testing this is tricky. Don't worry about testing during the spike. In fact, TDD'ing this is really tricky if you've never done it before. Get a working implementation first even when you are pairing and backfill a test. You should not try to fill out the form and click buttons on Github in your tests. Omniauth gives us a special way to test this. Use these docs as a starting point: https://github.com/omniauth/omniauth/wiki/Integration-Testing

  • Uses Omniauth Github (does not hand roll the OAuth handshake)
  • Tests the handshake using Omniauth Mock Auth (see above tips section).

Hide 'classroom content' from non-logged in users.

Currently all tutorials are visible to anyone. We want to make tutorials marked as "classroom content" viewable only if the user is logged in.

The tutorials table has a boolean column for classroom that should be used for this story.

User Dashboard: Github Followers

๐Ÿš” ๐Ÿ‘ฎโ€โ™€๏ธ ๐Ÿ‘ฎโ€โ™€๏ธ ๐Ÿ‘ฎโ€โ™€๏ธ
DO NOT START THIS STORY UNLESS STORY #6 HAS BEEN COMPLETED BY BOTH IN YOUR PAIR.

You should pair on story #6 and deploy it prior to working on this one.

Continue this process for all stories labeled spike first. You will learn more this way and produce better code.

๐Ÿš“ ๐Ÿ’จ ๐Ÿ‘ฎ ๐Ÿ‘ฎ ๐Ÿ‘ฎ

Details: A user exists in the database. They have a Github token stored. Generate a token here for testing and development: https://github.com/settings/tokens

A future story will implement generating these tokens dynamically but that isn't necessary here.

No need to hit the endpoint for followings. A future story will address this.

As a logged in user
When I visit /dashboard
Then I should see a section for "Github"
And under that section I should see another section titled "Followers"
And I should see list of all followers with their handles linking to their Github profile

API endpoint documentation
https://developer.github.com/v3/users/followers/

  • API call uses authenticated call: /user/followers instead of /users/:username/followers
  • No hashes in the view.
  • Uses objects in the view to represent the followers.

Admin: New Tutorial

When I visit '/admin/tutorials/new'
And I fill in 'title' with a meaningful name
And I fill in 'description' with a some content
And I fill in 'thumbnail' with a valid YouTube thumbnail
And I click on 'Save'
Then I should be on '/tutorials/{NEW_TUTORIAL_ID}'
And I should see a flash message that says "Successfully created tutorial."

  • Sad path accounted for

Admin: New Tutorial

When I visit '/admin/tutorials/new'
And I fill in 'title' with a meaningful name
And I fill in 'description' with a some content
And I fill in 'thumbnail' with a valid YouTube thumbnail
And I click on 'Save'
Then I should be on '/tutorials/{NEW_TUTORIAL_ID}'
And I should see a flash message that says "Successfully created tutorial."

  • Sad path accounted for

User Dashboard: Friendships

Details: We want to create friendships between users with accounts in our database. Long term we want to make video recommendations based on what friends are bookmarking. This card should not include the recommendation logic. That's coming in a different user story.

Background: A user (Josh) exists in the system with a Github token. The user has two followers on Github. One follower (Dione) also has an account within our database. The other follower (Mike) does not have an account in our system. If a follower or following has an account in our system we want to include a link next to their name to allow us to add as a friend.

In this case Dione would have an Add as Friend link next to her name. Mike would not have the link next to his name.

Tips: No need to work on edge cases during your spike. You'll want to research self referential has_many through. Here's a good starting point to understand the concept: http://blog.hasmanythrough.com/2007/10/30/self-referential-has-many-through. You'll probably need to do more googling but that's part of the fun ;)

  • Links show up next to followers that have accounts in our system.
  • Links show up next to followings that have accounts in our database.
  • Links do not show up next to followers or followings if they are not in our database.
  • There's a section on the dashboard that shows all of the users that I have friended
  • Edge Case: Make sure this fails gracefully. If you open up a POST route to create a friendship, be sure to catch the scenario where someone sends an invalid user id. Send a flash message alerting them of the error.

Import YouTube playlist

Currently tutorials can be created by manually entering information and then manually entering videos one by one.

The playlist importer should take a playlist_id which relates to a youtube playlist and import all of the videos and associate them with a tutorial.

As an admin
When I visit '/admin/tutorials/new'
Then I should see a link for 'Import YouTube Playlist'
When I click 'Import YouTube Playlist'
Then I should see a form

And when I fill in 'Playlist ID' with a valid ID
Then I should be on '/admin/dashboard'
And I should see a flash message that says 'Successfully created tutorial. View it here.'
And 'View it here' should be a link to '/tutorials/:id'
And when I click on 'View it here'
Then I should be on '/tutorials/:id'
And I should see all videos from the YouTube playlist
And the order should be the same as it was on YouTube
  • Retain the original sequence from YouTube
  • Creates a video record for each video in the playlist and stores the youtube id.
  • Associates each video stored in the DB is associated with a tutorial. (validate presence of tutorial id)

User Email activation

As a guest user
When I visit "/"
And I click "Register"
Then I should be on "/register"
And when I fill in an email address (required)
And I fill in first name (required)
And I fill in first name (required)
And I fill in password and password confirmation (required)
And I click submit
Then I should be redirected to "/dashboard"
And I should see a message that says "Logged in as <SOME_NAME>"
And I should see a message that says "This account has not yet been activated. Please check your email."
Background: The registration process above will trigger this story

As a non-activated user
When I check my email for the registration email
I should see a message that says "Visit here to activate your account."
And when I click on that link
Then I should be taken to a page that says "Thank you! Your account is now activated."

And when I visit "/dashboard"
Then I should see "Status: Active"

Bookmarking doesn't reload page

Background: When a user bookmarks a video the page reloads which means if they were watching a video, the video starts over making for a frustrating user experience. We can use JavaScript to make a POST request to /api/v1/bookmarks.

This story should make a fetch call to an internal API.

The app currently uses Stimulus JS and there are already examples of how to make a fetch call to an internal API. Review that code and use it as a template.

Tutorial show page won't load if missing videos

If a tutorial doesn't have any videos and we visit its show page an error occurs when trying to call current_video.title since current_video is nil.

A possible easy fix is to default to Video.new if there aren't any videos associated with the tutorial.

User Dashboard: Github Repositories

Details: A user exists in the database. They have a Github token stored. Generate a token here for testing and development: https://github.com/settings/tokens

A future story will implement generating these tokens dynamically but that isn't necessary here.

As a logged in user
When I visit /dashboard
Then I should see a section for "Github"
And under that section I should see a list of 5 repositories with the name of each Repo linking to the repo on Github

Admin: New Tutorial

When I visit '/admin/tutorials/new'
And I fill in 'title' with a meaningful name
And I fill in 'description' with a some content
And I fill in 'thumbnail' with a valid YouTube thumbnail
And I click on 'Save'
Then I should be on '/tutorials/{NEW_TUTORIAL_ID}'
And I should see a flash message that says "Successfully created tutorial."

  • Sad path accounted for

User Dashboard: Friendships

Details: We want to create friendships between users with accounts in our database. Long term we want to make video recommendations based on what friends are bookmarking. This card should not include the recommendation logic. That's coming in a different user story.

Background: A user (Josh) exists in the system with a Github token. The user has two followers on Github. One follower (Dione) also has an account within our database. The other follower (Mike) does not have an account in our system. If a follower or following has an account in our system we want to include a link next to their name to allow us to add as a friend.

In this case Dione would have an Add as Friend link next to her name. Mike would not have the link next to his name.

Tips: No need to work on edge cases during your spike. You'll want to research self referential has_many through. Here's a good starting point to understand the concept: http://blog.hasmanythrough.com/2007/10/30/self-referential-has-many-through. You'll probably need to do more googling but that's part of the fun ;)

  • Links show up next to followers that have accounts in our system.
  • Links show up next to followings that have accounts in our database.
  • Links do not show up next to followers or followings if they are not in our database.
  • There's a section on the dashboard that shows all of the users that I have friended
  • Edge Case: Make sure this fails gracefully. If you open up a POST route to create a friendship, be sure to catch the scenario where someone sends an invalid user id. Send a flash message alerting them of the error.

Make Bookmark display message if user is not logged in

GET /tutorials/:id

Currently the Bookmark link will redirect to the login page and stop the video from playing which leads to a rather jarring experience.

Let's display a message that says "User must login to bookmark videos." A tooltip or flash notice could be good options?

User Dashboard: Github OAuth

Details: We want a user to have the option to connect their Github account and retrieve a user specific token automatically.

As a user
When I visit /dashboard
Then I should see a link that is styled like a button that says "Connect to Github"
And when I click on "Connect to Github"
Then I should go through the OAuth process
And I should be redirected to /dashboard
And I should see all of the content from the previous Github stories (repos, followers, and following)

Tips: Testing this is tricky. Don't worry about testing during the spike. In fact, TDD'ing this is really tricky if you've never done it before. Get a working implementation first even when you are pairing and backfill a test. You should not try to fill out the form and click buttons on Github in your tests. Omniauth gives us a special way to test this. Use these docs as a starting point: https://github.com/omniauth/omniauth/wiki/Integration-Testing

  • Uses Omniauth Github (does not hand roll the OAuth handshake)
  • Tests the handshake using Omniauth Mock Auth (see above tips section).

Make Bookmark display message if user is not logged in

GET /tutorials/:id

Currently the Bookmark link will redirect to the login page and stop the video from playing which leads to a rather jarring experience.

Let's display a message that says "User must login to bookmark videos." A tooltip or flash notice could be good options?

Delete videos when deleting a Tutorial

Background: Currently deleting a Tutorial will leave all of the videos in the database, meaning they will be referencing a tutorial that doesn't exist.

Use ActiveRecords dependent destroy functionality to fix this.

User Dashboard: Friendships

Details: We want to create friendships between users with accounts in our database. Long term we want to make video recommendations based on what friends are bookmarking. This card should not include the recommendation logic. That's coming in a different user story.

Background: A user (Josh) exists in the system with a Github token. The user has two followers on Github. One follower (Dione) also has an account within our database. The other follower (Mike) does not have an account in our system. If a follower or following has an account in our system we want to include a link next to their name to allow us to add as a friend.

In this case Dione would have an Add as Friend link next to her name. Mike would not have the link next to his name.

Tips: No need to work on edge cases during your spike. You'll want to research self referential has_many through. Here's a good starting point to understand the concept: http://blog.hasmanythrough.com/2007/10/30/self-referential-has-many-through. You'll probably need to do more googling but that's part of the fun ;)

  • Links show up next to followers that have accounts in our system.
  • Links show up next to followings that have accounts in our database.
  • Links do not show up next to followers or followings if they are not in our database.
  • There's a section on the dashboard that shows all of the users that I have friended
  • Edge Case: Make sure this fails gracefully. If you open up a POST route to create a friendship, be sure to catch the scenario where someone sends an invalid user id. Send a flash message alerting them of the error.

User Dashboard: Bookmarks

As a logged in user
When I visit '/dashboard'
Then I should see a list of all bookmarked segments under the Bookmarked Segments section
And they should be organized by which tutorial they are a part of
And the videos should be ordered by their position

  • Only makes one query to the database (no n+1 queries)
  • Avoids loading all videos into memory

User Dashboard: Bookmarks

Background: Ability to bookmark is already built out. This story should display things that are already bookmarked. Bookmarking occurs in UserVideosController#create if you want to explore the model relationships.

As a logged in user
When I visit '/dashboard'
Then I should see a list of all bookmarked segments under the Bookmarked Segments section
And they should be organized by which tutorial they are a part of
And the videos should be ordered by their position
  • Only makes one query to the database (no n+1 queries)
  • Avoids loading all videos into memory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.