Skip to content

Testing Scratch www

jwzimmer edited this page Jul 12, 2016 · 78 revisions

Table of Contents

Testing Pages for Developers

Testing Guide for Bugfixes

Testing Checklist

Testing Conventions

Test Process & Automated Testing

  • Test Cases in a PR message should be added to the Test Plans
  • The Most Important Workflows automated tests should pass for every PR

Automated Tests

Locations

Conventions

Test Plan

Scratch-www does not have all of the back-end behaviour for the later steps in these test cases. Most of that code lives on scratchr2. For example, you should be able to access the log-in fields via scratch-www and you should be able to press the Sign In button, but the actual authentication is handled via scratchr2. For that reason, test cases here focus mainly on interacting with the elements on the homepage and in the navigation bar, and use an incomplete set of steps after that first interaction to verify that the interaction was successful - but they don't cover the full range of behaviour beyond that initial interaction. That behaviour is covered in test plans for scratchr2 and elsewhere.

Most Important Workflows/ Test Cases

These are the workflows we will automate first and which will be run most often. The idea is that they won't ever give "false positives", because if the tests are broken they need to be updated immediately, and if the test fails, the new commit should not be checked in.

All Test Cases: Conference Site

Login on homepage should still work

  • You don't have to sign in to the conference site, but you should still be able to sign in on the homepage
  • Homepage should still detect if you're logged in

The /conference/schedule page should include tabs for different days of the conference

The schedule should have clickable schedule sections that each link to a details page
  • Some sections will not be clickable if they have no details (and should consequently have no different hover state)
The /conference/:id/details page should show info on conference sessions
The "back to full schedule" link should bring you back to the day the detailed event occurs on

All Test Cases: Homepage

/create URL

  • Going to https://<homepage></homepage>/create, whether signed in or out, should redirect you to the project editor with the Tips window open

Homepage

Cookies
  • When user is signed in, that info should be stored in a cookie.
  • When there is no existing cookie, the user state should be signed out.
Default States

Before session information (whether user is signed in/ out) is retrieved from a cookie, some UI elements should appear in their default state.

Default Project Rows
  • The default project rows are the same as the signed in/ out project rows
Default Footer & Language Menu
  • The default Footer (the links to other pages, the language menu) should be the same as the signed in/ out footer.
Default Nav Bar
  • The default navbar should look like the regular navbar, but without...
    • When Signed Out: The Sign In/ Join Scratch links
    • When Signed In: The username & Messages & My Stuff icon
  • The other elements should be spread out slightly to fill the space those elements would normally occupy
Default Splash Header
  • The default Splash header should not have...
    • When Signed Out: The video or Scratch Cat & friends
    • When Signed In: The What's Happening or Scratch News
Project Rows
  • Welcome to Scratch
  • Scratch News
  • Featured Projects
  • Featured Studios
  • Projects Curated By X
  • Scratch Design Studio
  • Recently Shared Projects
  • What the Community is Remixing
  • What the Community is Loving
Should be able to click a project
Should be able to use nav arrows in the row
Homepage for Educators
  • You should be able to sign in as a teacher
  • You should be able to see the teacher banner
  • You should be able to see my students' activity in the What's Happening section
    • The activity is that your students are following each other (after being created)
My Classes
  • You should be able to view My Classes from the dropdown on the navbar
Teacher Banner
  • Should only show up if the user is a teacher
  • Should say the teacher's username in the banner
  • Should contain three button links to resources
    • Educators FAQ
    • My Classes
    • Resources?
Footer Links
  • List of links
Should be able to click the link
Language
  • List of languages
Choose a language

When signed in...

Create should take you to the editor
  • The tips window should be closed
Should be able to click Share button
    • Share should fail if your email is not confirmed, but the button should exist regardless
  • Username in upper left
As a mod...
Clicking on username in top right should open dropdown menu
  • Menu should contain:
    • Profile
    • My Stuff
    • Account Settings
    • Sign Out
Discuss should take you to the Forums > Reports
  • Discuss Scratch
    • Reports (if you made it to the right page, this link should exist to click)
As a New Scratcher...
Clicking on username in top right should open dropdown menu
  • Menu should contain:
    • Profile
    • My Stuff
    • Account Settings
    • Sign Out
Profile
My Stuff
Account Settings
Sign Out
Discuss should take you to the Forums > New Topic Button
  • New Scratchers (if you made it to the right page, this link should exist to click)
    • New Topic button should exist
As a Scratcher...
Clicking on username in top right should open dropdown menu
  • Menu should contain:
    • Profile
    • My Stuff
    • Account Settings
    • Sign Out
Profile
My Stuff
Account Settings
Sign Out
Discuss should take you to the Forums > New Topic Button
  • New Scratchers (if you made it to the right page, this link should exist to click)
    • New Topic button should exist

When signed out...

Join Scratch should open a dialogue box and allow you to register a new account
Sign In should open a dropdown menu and allow you to log in to Scratch
Create should take you to the editor
  • Sign In in upper right
  • Tips Window opens
Discuss should take you to the Forums
  • Discuss Scratch
    • Discussion Home
    • Scratch
Welcome to Scratch > New Scratchers > No button
  • Announcements
  • New Scratchers (if you made it to the right page, this link should exist to click)
    • New Topic button should not exist

All Test Cases: Explore

Explore

`Project` and `Studio` tabs should alter links in results to projects and studios respectively
Category sub-navigation links should alter results to match category types
Grid
  • Thumbnails for projects should load
  • Thumbnails for studios should load
  • Project titles should link to the project pages
  • Studio title should link to the studio pages
  • The "Load More" button should load more projects in the grid

All Test Cases: Search

Search

The search term should be displayed in the box header
`Project` and `Studio` tabs should alter links in results to projects and studios respectively
Grid
  • Thumbnails for projects should load
  • Thumbnails for studios should load
  • Project titles should link to the project pages
  • Studio title should link to the studio pages
  • The "Load More" button should load more projects in the grid

All Test Cases: Teacher Join Flow

Username/Password Step

  • Username Input – An error dialog should appear if:
    • the username is fewer than 3 characters
    • the username is already taken
    • the username is inappropriate
  • Password – An error dialog should appear if:
    • the password is the same as the username
    • the password is "password"
    • the password is fewer than 6 characters

Demographics Step

  • Gender Input – an error should appear if:
    • The third option is selected and no text present
    • No option is selected

Name Step

  • Both first name and last name fields should be required

Phone Number Step

  • Only a valid phone number should work
  • An error should appear if the phone number is not valid

Organization Step

  • Organization type
    • "Other" field should only be required if checked
  • Organization url – should not validate the url

Address Step

  • Only a valid address should work
  • An error should appear if the address is not valid
  • The state/province field should selectively display a list dependent on the chosen country
  • Zip code should not validate anything, except for being a required input field

Use Scratch Step

  • There should be a character count in the bottom right corner as you type
  • The character count should turn orange if more than 300 characters are provided
  • An error should appear if more than 300 characters are provided

Email Step

  • An error should appear if:
    • The email address does not appear to be valid
    • Email addresses in the main field and confirmation field do not match

Approval Step

  • Also referred to as the Waiting Room (`/educators/waiting`)
  • Should be shown whenever teacher visits “My Classes” prior to either:
    • Email verification
    • Completion of waiting period
The waiting room page should contain...
  • If your email address is unconfirmed, there should be a card suggesting you confirm your email
  • If you have been invited to a teacher account, there should be a card describing the waiting process
  • No matter what user state, there should a card linking to helpful resources to consider

Error Step

  • If at any point there is an unaccounted for server error, this step should be reached

General Notes

  • Fields with errors should be highlighted in orange
  • Fields that are in focus should be highlighted in blue
  • Blue question marks in the description should display tooltips if hovered over

About link

Help link

Search bar

Message icon (envelope)

My Stuff icon (folder)