Problem/Motivation

Automated tests must cover as much as possible features in Anu LMS to avoid bugs during development of new features.

Acceptance criteria

  • Test covers ability to progress only lesson-by-lesson when course linear progress feature is enabled
  • Access checks should be done as part of tests to make sure that students who didn't complete previous lessons can't access locked lessons by direct URLs

Tech concept

  • Rename CoursesCreationTest and CoursesPageCreationTest to CourseTest.php and CoursesPageTest.php.
  • Extend "CourseTest" file.
  • Create a new course with 3 lessons (content no matters), set "Enable linear progress" for that course.
  • Try directly open the 2nd lesson using an absolutely URL, a user should be redirected to the main page. Try the same with 3rd lesson.
  • After that open 1st lesson and pass through all steps (Next button). That should work well.
  • After that make sure that 2nd and 3rd lessons can be opened using absolutely URLs.
  • Un-tick "Enable linear progress" for that course and hit Save.
  • Create a new user and make sure any lesson from that Course can be opened directly.

Issue fork anu_lms-3313237

Command icon 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

beloglazov91 created an issue. See original summary.

beloglazov91’s picture

Assigned: beloglazov91 » Unassigned
Status: Active » Needs review

spleshka’s picture

Status: Needs review » Fixed

Marvellous job Alexey, happy to get it in!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.