The-CodingSloth / haha-funny-leetcode-extension

MIT License
408 stars 79 forks source link

Extension tests #5

Open The-CodingSloth opened 1 year ago

The-CodingSloth commented 1 year ago

There's no tests for the extension, which makes it annoying to check some features, here's some test's I've thought of so far:

  1. Test the redirect rule if the user hasn't solved the problem
  2. Test the chrome.webRequest.onCompleted listener to test if the extension knows when the user solves the problem.
  3. Test the redirect rule if the user has solved the problem.
  4. Test the alarm listener to make sure it's updating the problem
  5. Test if the popup contains the correct information about the problem.
  6. Test the popup before they solve it and after they solve it.
  7. Test for situations where if the user turns off the extension, or service worker is inactive that their state is the same.
  8. Test if storage is working correctly
  9. Test that users can't exploit their submission by reusing an old submission, or is on a different problem