Problem/Motivation
Automated tests must cover as much as possible features in Anu LMS to avoid bugs during development of new features.
Acceptance criteria
- The new test is added to "anu_lms_assessments" module and requires only "anu_lms + anu_lms_assessments"
- The test covers all types of questions for quizzes
- The test covers all possible settings for quizzes
Tech concept
- Add a new test in anu_lms_assessments module (it should be FunctionalJavascript test)
- Create a new quiz
- Add Question: Long answer
- Add Question: Multiple choice
- Add Question: Scale
- Add Question: Short answer
- Add Question: Single choice
- Save it.
- Use correct/incorrect answers for all questions and make sure after hitting Submit it gets some explanation (f.e. for "Short Answer" should appear "Suggested answer CORRECT_ANSWER" message under the input).
- Also make sure that Finish button is disabled till form will not be Submitted.
- Edit that quiz and tick "Hide correct answers". Save it.
- Go through all questions and make sure that correct answers don't appear on the page after submitting any answers.
- Edit that quiz and tick "Prevent multiple submissions". Save it.
- Go through all questions again.
- Open the quiz page again and go through all steps, make sure that all fields are disabled because were filled out before.
Issue fork anu_lms-3313461
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
beloglazov91Comment #3
beloglazov91Comment #4
beloglazov91Comment #5
beloglazov91Comment #6
beloglazov91Comment #8
beloglazov91Comment #10
spleshkaGreat job, more tests in the module!