From Expertiza_Wiki
Revision as of 05:27, 7 November 2023 by Asharm52 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

The Expertiza project is software to create reusable learning objects through peer review. It also supports team projects, and the submission of almost any document type, including URLs and wiki pages.

Test Login Credentials

  • UserId: instructor6
  • Password: password
  • Problem Statement

    ISSUE 1

    Background: An instructor can create late policies for any assignment, where the instructor can specify the points per unit and the maximum penalty that can be applied for any assignment submission. One way to reach late policy creation link is as follows:

    1. Log into Expertiza as an Instructor.
    2. Edit an assignment by clicking on edit logo under the “Action” column.
    3. Under the “Due Date” tab click on the "New late policy" link
    4. In “New late policy” fill in the required details.
    5. Clicks “Create” to save the policy, to go to page which shows all late policies.

    ISSUE 2

    FAILED TO SAVE THE ASSIGNMENT error message shows up unexpectedly

    Determine why this error message shows up, and fix this error so that it doesn’t occur when clicking on “New Late Policy” in “due date” tab. Add a test case that verifies the error doesn’t occur.

    ISSUE 3

    On the “New Late Policy” page, once you click “Create”, it shows you a list of late policies. The “back” link on this page should go to the “Due Date” page of the assignment which was being edited when clicked. Currently it gives error as it can’t find an assignment number. Add a test case to check the above issues and verify it passes.


    Solution

    It was obvious from the beginning that the main changes would have to be made in the view and controller files around the issues present. Our main work included refactoring and editing code. We didn't take into much consideration design principles and patterns.


    Back Link Issue:

    The fix for this issue included added a jQuery rule. Anytime a back link is clicked, the rule is put into effect and you are taken to the correct due dates tab.

    Most of the code included refactoring

    Error Message Issue

    Passed assignment id in to the session , made error message print out entire message so that user knows what the issue is

    Back Link error from list of late policies

    The fix for this issue included added a jQuery rule. Anytime a back link is clicked, the rule is put into effect and you are taken to the correct due dates tab.


    Test Plan

    Rspec Unit Tests

    Functionalities to be tested:

    1. Back link works when changing late policy
    2. Error message shows up only when needed and is correct
    3. Back link works as expected from list of all late policies

    The test suite for the Assignment Creation Topics Tab focuses on the functionality related to late policy management within an assignment editing context. The suite includes tests for user interactions with the late policy features, such as creating a new late policy, handling error messages, and navigating back to the assignment edit page. Below is an evaluation of the test plan based on the provided scenarios:

    Pre-Conditions and Setup:

    The setup includes creating deadline types and courses, which are necessary pre-conditions for assignment creation. An assignment specific for late policy testing is created, and the user is logged in as 'instructor6'. The user is navigated to the 'Due Dates' tab of the assignment edit page, which is a crucial step for all subsequent tests.

    Test for Flash Error Message on New Late Policy Page:

    This test checks for the presence of a flash error message when the late policy creation fails. The test correctly identifies the assignment and navigates to the 'Due Dates' tab before attempting to create a new late policy. However, the test seems to have a syntax error with the fails if statement, which is not a valid RSpec syntax and should be corrected. The test could be improved by specifying what actions lead to the failure to save the assignment, thus triggering the error message.

    Test for Back Button Interaction on New Late Policy Page:

    This scenario tests the functionality of the 'Back' button from the 'New Late Policy' page. The test ensures that the user is returned to the assignment edit page after clicking the 'Back' button. The test could be enhanced by including assertions to check if any changes made on the 'New Late Policy' page are not saved upon returning back.

    Test for Back Button Interaction on New Late Policy Page while creating:

    This test is an extension of the previous scenario where the user fills in the details for a new late policy before hitting the 'Back' button. The test checks if the user is routed back to the assignment edit page after attempting to create a new late policy. It would be beneficial to include a check to ensure that the late policy is not created if the user navigates back in the middle of the creation process.


    Project Mentor

    Srilekha Gudipati (sngudipa@ncsu.edu)

    Team Members

    Arul Sharma (asharm52@ncsu.edu)

    Sarvesh Somasundaram (ssomasu@ncsu.edu)

    Retrieved from ""