Skip to content

Manually Testing The Web Stack

Vera edited this page Dec 13, 2018 · 2 revisions

Manually Testing The Web Client

  • Each section assumes that you have cleanly loaded the webpage and are starting from Home.

Navigation

  1. Before logging in, make sure that browsing to /articles, /settings, and /payment URLs redirect to the Sign In page.
  2. Click Sign In, then Login via Facebook on the resulting modal. This should redirect you to the My Pages page.
  3. Once signed in, the Sign In link should turn into the Sign Out link. One or the other should show, but not both.
  4. Once signed in, make sure you can click the links and go to My Pages, Settings, and Subscribe without it redirecting to the Sign In page.
  5. Click Sign Out. This should take you to the signout page.
  6. Click on the My Pages, Settings, and Payments links again. Clicking each of these after logout should redirect you to the Sign In page.

My Pages

  1. Click Sign In, then Login via Facebook on the resulting modal. This should redirect you to the My Pages page.
  2. Copy/paste an article URL from another site, such as CNN, into the URL input at the top of the page. The placeholder text inside reads "http://...". Then click the Save button.
  3. On success, this should generate an article card at the bottom of the list with a preview image, the headline/title of the article, and a link to the articles source.
  4. Click on a card. It should bring up a modal containing the full content of the article it was saved from, including the preview image, the date you saved it, and a link to the article source.
  5. In the top left corner of the article modal, there is an "X", which when clicked should close the modal and bring you back to the article card list.

Settings

  1. Click Sign In, then Login via Facebook on the resulting modal. This should redirect you to the My Pages page.
  2. Click the Settings link, which brings you to the settings page.
  3. Change the user details in the input boxes and click Save.
  4. Changes should be reflected in the settings after saving.

Subscribe

  1. Click Sign In, then Login via Facebook on the resulting modal. This should redirect you to the My Pages page.
  2. Click the Subscribe link, which brings you to the payment page.
  3. Fill in the test card data provided by Stripe. Click Confirm Order.
  4. Verify that the Subscribe page shows a success message when the test data is entered correctly.
  5. Log into the Stripe admin panel and confirm the order was successful for the amount selected on the Subscribe page.
  6. Fill in the test card data provided byt Stripe, but make subtle changes, like changing one of the digits for the CC number. This should display a message about the invalid input and not let you actually submit the order.
  7. Log in to the Stripe admin panel and confirm the order was not successful.

Manually Testing The API endpoints

  • API endpoint documentation
  • The API endpoints can be manually tested by using Postman, Curl, or other tools that allow you to use standard HTTP verbs to send various requests.
  • Be sure to test any adjacent endpoints that you make changes to. Examples:
    • When making changes to /api/pages/, be sure to test /auth/rest/user/ and /api/scrape/, as the pages_article table has a foreign key pointing to user_CustomUser and /api/scrape/ relies on /api/pages/ accepting specific properties when submitting a new article.
    • /api/scraper/ relies on the /auth/rest/user/ endpoint to fetch the current user ID, and relies on the properties of the JSON object submitted to /api/pages/ to be structured a specific way.

Clone this wiki locally