Skip to content

Courses Tests

Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-001Dashboard loads instructor statsUser has published courses with enrollments1. Navigate to /business/apps/courses.Stats displayed (total courses, total students, completion rates). Up to 5 recent courses shown.P0
CRS-002Dashboard empty stateNew instructor, no courses1. Navigate to dashboard.Stats show zeros. Empty state with CTA to create first course.P1
Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-010List all instructor coursesUser has courses1. Navigate to /business/apps/courses/list.All courses listed with title, status, type, and enrollment count.P0
CRS-011Filter by searchUser has multiple courses1. Enter search term in search field.Courses matching the search term are shown.P1
CRS-012Filter by statusUser has draft and published courses1. Set ?status=published.Only published courses shown.P1
CRS-013Filter by typeUser has courses of different types1. Set ?type=self-paced.Only self-paced courses shown.P2

Create Course (/business/apps/courses/new)

Section titled “Create Course (/business/apps/courses/new)”
Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-020Create course with valid dataUser is signed in1. Navigate to /business/apps/courses/new. 2. Fill title, description, price, type, level. 3. Submit form.Course created. User redirected to /business/apps/courses/{id}?new=1.P0
CRS-021Create course with validation errorsNone1. Submit form with empty required fields (e.g., missing title).Returns 400 with form validation errors. Course not created.P1
CRS-022Unauthenticated create redirectsNot signed in1. Navigate to /business/apps/courses/new.Redirected to /login.P0

Course Detail (/business/apps/courses/[id])

Section titled “Course Detail (/business/apps/courses/[id])”
Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-030View course detail with chaptersCourse exists with chapters and lessons1. Navigate to /business/apps/courses/{id}.Course details shown. Chapters listed with nested lessons. Enrollment count displayed. Chapter and lesson forms available.P0
CRS-031Publish courseCourse is in draft status1. Submit publish action.Course published. published: true returned. Course status changes to published.P0
CRS-032Unpublish courseCourse is published1. Submit unpublish action.Course unpublished. unpublished: true returned. Course goes back to draft.P1
CRS-033Delete courseCourse exists1. Submit delete action.Course deleted. User redirected to /business/apps/courses/list.P0
CRS-034Access another instructor’s courseCourse belongs to different user1. Navigate to /business/apps/courses/{other-user-course-id}.Returns 403 Forbidden.P0
CRS-035Non-existent course returns 404None1. Navigate to /business/apps/courses/{nonexistent-id}.Returns 404 “Course not found”.P1
Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-040Create chapterCourse exists1. Fill chapter form (title). 2. Submit create-chapter action.Chapter created. Success message “Chapter created!” displayed. Chapter appears in course structure.P0
CRS-041Create chapter with validation errorsNone1. Submit create-chapter with empty title.Returns 400 with form validation errors.P1
CRS-042Delete chapterChapter exists1. Submit delete-chapter action with chapter_id.Chapter deleted. deleted: true returned. Chapter and its lessons removed.P1
CRS-043Delete chapter missing IDNone1. Submit delete-chapter without chapter_id.Returns 400 “Missing chapter ID”.P2
Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-050Create lessonCourse and chapter exist1. Fill lesson form (title, chapter, content type). 2. Submit create-lesson action.Lesson created. Success message “Lesson created!” displayed. Lesson appears under its chapter.P0
CRS-051Create lesson with validation errorsNone1. Submit create-lesson with invalid data.Returns 400 with form validation errors.P1
CRS-052Delete lessonLesson exists1. Submit delete-lesson action with lesson_id.Lesson deleted. deleted: true returned.P1
CRS-053Delete lesson missing IDNone1. Submit delete-lesson without lesson_id.Returns 400 “Missing lesson ID”.P2

Edit Course (/business/apps/courses/[id]/edit)

Section titled “Edit Course (/business/apps/courses/[id]/edit)”
Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-060Load edit form with existing dataCourse exists1. Navigate to /business/apps/courses/{id}/edit.Form pre-populated with title, description, short_description, thumbnail_url, promo_video_url, price, type, level, is_free, and capacity.P0
CRS-061Update courseCourse exists1. Modify course fields. 2. Submit form.Course updated. Success message “Course updated!” displayed.P0
CRS-062Update with validation errorsNone1. Submit with invalid data (e.g., empty title).Returns 400 with validation errors.P1
CRS-063Non-instructor cannot editCourse belongs to different instructor1. Navigate to edit page for another instructor’s course.Returns 403.P0

Assignments (/business/apps/courses/[id]/assignments)

Section titled “Assignments (/business/apps/courses/[id]/assignments)”
Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-070List assignmentsCourse has assignments1. Navigate to /business/apps/courses/{id}/assignments.All assignments listed for the course.P0
CRS-071Access control on assignments listCourse belongs to another instructor1. Navigate to assignments list for another instructor’s course.Returns 403.P0

Create Assignment (/business/apps/courses/[id]/assignments/new)

Section titled “Create Assignment (/business/apps/courses/[id]/assignments/new)”
Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-080Create assignmentCourse exists1. Navigate to /business/apps/courses/{id}/assignments/new. 2. Fill assignment form (title, instructions, due date, max points). 3. Submit form.Assignment created. User redirected to /business/apps/courses/{id}/assignments/{assignmentId}.P0
CRS-081Create assignment with validation errorsNone1. Submit with empty required fields.Returns 400 with form validation errors.P1

Assignment Detail (/business/apps/courses/[id]/assignments/[assignmentId])

Section titled “Assignment Detail (/business/apps/courses/[id]/assignments/[assignmentId])”
Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-090View assignment with submissionsAssignment exists with student submissions1. Navigate to assignment detail page.Assignment details, list of submissions, and grade form displayed.P0
CRS-091Grade submissionSubmission exists for the assignment1. Fill grade form (score, feedback). 2. Submit grade action.Submission graded. Success message “Submission graded!” displayed.P0
CRS-092Grade with invalid dataNone1. Submit grade with invalid form data.Returns 400 with validation errors.P1
CRS-093Return submission with feedbackSubmission exists1. Submit return action with submission_id and optional feedback.Submission returned. returned: true displayed.P1
CRS-094Return submission missing IDNone1. Submit return without submission_id.Returns 400 “Missing submission ID”.P2
CRS-095Publish assignmentAssignment in draft1. Submit publish action.Assignment status set to “published”. published: true returned.P1
CRS-096Delete assignmentAssignment exists1. Submit delete action.Assignment deleted. User redirected to assignments list.P1
CRS-097Non-existent assignment returns 404None1. Navigate to /business/apps/courses/{id}/assignments/{nonexistent}.Returns 404 “Assignment not found”.P1

Quizzes List (/business/apps/courses/[id]/quizzes)

Section titled “Quizzes List (/business/apps/courses/[id]/quizzes)”
Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-100List quizzes for courseCourse has quizzes1. Navigate to /business/apps/courses/{id}/quizzes.All quizzes listed for the course.P0
CRS-101Access control on quiz listCourse belongs to another instructor1. Navigate to quiz list for another instructor’s course.Returns 403.P0

Create Quiz (/business/apps/courses/[id]/quizzes/new)

Section titled “Create Quiz (/business/apps/courses/[id]/quizzes/new)”
Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-110Create quizCourse exists1. Navigate to new quiz page. 2. Fill form (title, description, time limit, passing score). 3. Submit form.Quiz created. User redirected to /business/apps/courses/{id}/quizzes/{quizId}.P0
CRS-111Create quiz with validation errorsNone1. Submit with invalid data.Returns 400 with form validation errors.P1

Quiz Detail (/business/apps/courses/[id]/quizzes/[quizId])

Section titled “Quiz Detail (/business/apps/courses/[id]/quizzes/[quizId])”
Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-120View quiz with questionsQuiz has questions1. Navigate to quiz detail.Quiz details shown. All questions listed with type, content, points, and answers.P0
CRS-121Add multiple choice questionQuiz exists1. Fill question form (content, type: multiple_choice, points). 2. Include answers_json with answer options and correct flag. 3. Submit add-question action.Question added. Success message “Question added!” displayed.P0
CRS-122Add true/false questionQuiz exists1. Fill question form with type: true_false. 2. Submit add-question.Question added with true/false answer structure.P1
CRS-123Add descriptive questionQuiz exists1. Fill question form with type: descriptive. 2. Submit add-question.Question added without predefined answers.P1
CRS-124Add question with validation errorsNone1. Submit add-question with empty content.Returns 400 with form validation errors.P1
CRS-125Update questionQuestion exists1. Submit update-question with question_id, modified content, type, points, and answers_json.Question updated. updated: true returned.P1
CRS-126Update question missing IDNone1. Submit update-question without question_id.Returns 400 “Missing question ID”.P2
CRS-127Delete questionQuestion exists1. Submit delete-question with question_id.Question deleted. deleted: true returned.P1
CRS-128Reorder questionsQuiz has multiple questions1. Submit reorder-questions with ordered_ids JSON array.Questions reordered. reordered: true returned.P1
Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-130Publish quizQuiz in draft with questions1. Submit publish action.Quiz status set to “published”. published: true returned.P0
CRS-131Unpublish quizQuiz is published1. Submit unpublish action.Quiz status set to “draft”. unpublished: true returned.P1
CRS-132Delete quizQuiz exists1. Submit delete action.Quiz deleted. User redirected to /business/apps/courses/{id}/quizzes.P1
CRS-133Non-existent quiz returns 404None1. Navigate to quiz detail with invalid quizId.Returns 404 “Quiz not found”.P1

Quiz Results (/business/apps/courses/[id]/quizzes/[quizId]/results)

Section titled “Quiz Results (/business/apps/courses/[id]/quizzes/[quizId]/results)”
Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-140View quiz resultsQuiz has student submissions1. Navigate to results page.All quiz results listed with student name (from profile lookup), score, and completion date.P0
CRS-141Results with student profilesResults exist with valid user IDs1. Navigate to results page.Student profiles (full_name, username) are resolved and displayed alongside results.P1
CRS-142Results empty stateQuiz has no submissions1. Navigate to results page.Empty results state displayed. No errors.P1

Students (/business/apps/courses/[id]/students)

Section titled “Students (/business/apps/courses/[id]/students)”
Test IDDescriptionPreconditionsStepsExpected ResultPriority
CRS-150View enrolled studentsCourse has enrollments1. Navigate to /business/apps/courses/{id}/students.All enrolled students listed with profile info (full_name, username, avatar). Enrollment details shown.P0
CRS-151Student profiles resolvedEnrollments exist1. Navigate to students page.Student profiles fetched via service role and displayed correctly. Missing profiles show fallback.P1
CRS-152Empty enrollment listCourse has no students1. Navigate to students page for course with zero enrollments.Empty state displayed. No service role query executed for zero user IDs.P1
CRS-153Access control on students pageCourse belongs to another instructor1. Navigate to students for another instructor’s course.Returns 403.P0