Testing Overview - nhash46/Tessagon-e-Portfolio GitHub Wiki

To run the test script, enter the following into the terminal:

npm test

The expected output:

  Blog Tests
    show blogs
      √ Should display list of blogs belonging to a user (1016ms)
    post blog
      √ Should create a new blog post (486ms)
    edit blog post
      √ Should edit a blog post (564ms)

  Comment Tests
    Make new comment
      √ Should create a new comment (464ms)
    Like comment
      √ Should like a comment (378ms)
    Unlike comment
      √ Should unlike a comment (394ms)
    edit comment
      √ Should edit a comment (368ms)

  Profile Tests
    getUserProfile (restricted)
      √ Should get a restricted page (1552ms)
    getOtherUserProfile
      √ Should get another user's profile (1094ms)
      √ Should go to error page if profile does not exist (555ms)
    editNavInfo
      √ Should update contact information and redirect to profile (342ms)
    editHomeInfo
      √ Should update home section and redirect to profile (360ms)
    editAboutMe
      √ Should update about me section and redirect to profile (338ms)
    populateInfo
      √ Should populate profile with sign up form info and redirect to profile (334ms)
    addExperience
      √ Should create new experience artifact, link to user and redirect to profile (315ms)
    editExperience
      √ Should update existing experience artifact and redirect to profile (327ms)
    addEducation
      √ Should create new education artefeact, link to user and redirect to profile (307ms)
    editEducation
      √ Should update existing education artefeact and redirect to profile (390ms)
    changePassword
      √ Should update existing password and redirect to profile (544ms)

  Upload Tests
    uploadDocument
      √ Should redirect to profile if file uploaded (3488ms)
      √ Should redirect to profile if no file uploaded (237ms)
    uploadPic
      √ Should redirect to profile if image uploaded (2028ms)
      √ Should redirect to profile if no image uploaded (245ms)
    downloadDocument
      √ Should pipe document if document exists (1609ms)
      √ Should throw error if document does not exist (467ms)
    downloadImage
      √ Should pipe image if image exists (1123ms)
      √ Should throw error if image does not exist (451ms)

  User Tests
    addUser
      √ Should redirect to basic info form (1165ms)
    login
      √ Should redirect to profile page on success (348ms)
      √ Should redirect to login page on fail (228ms)
    logout
      √ Should redirect to login page