Uploaded image for project: 'KS QA Test Cases'
  1. KS QA Test Cases
  2. KSQATC-7

TEST Changing the order of sections on the UI

    Details

      Description

      Test that the order of UI sections can be changed by ?

      Solution:
      Order of sections can be changed by GWT deferred binding and configuration.

      Custom configuration of this issue was also covered in https://test.kuali.org/jira/browse/KSLAB-677.
      File need to modify directly is located in ks-lum-ui/:
      (fully qualified path:
      /ks-lum/ks-lum-ui/src/main/java/org/kuali/student/lum/lu/ui/course/client/configuration/course/CourseConfigurer.java
      )
      CourseConfigurer.java

      Example of original page of New Course Proposal is in the attached file: SectionOrder1.png

      public void configureCourseProposal(ConfigurableLayout layout) {
      groupName = LUConstants.COURSE_GROUP_NAME;

      addCluStartSection(layout);

      String editTabLabel = getLabel(LUConstants.EDIT_TAB_LABEL_KEY);
      layout.addSection(new String[]

      {editTabLabel, getLabel(LUConstants.PROPOSAL_INFORMATION_LABEL_KEY)}, generateGovernanceSection());
      layout.addSection(new String[] {editTabLabel, getLabel(LUConstants.PROPOSAL_INFORMATION_LABEL_KEY)}

      , generateCourseLogisticsSection());
      layout.addSection(new String[]

      {editTabLabel, getLabel(LUConstants.ACADEMIC_CONTENT_LABEL_KEY)}, generateCourseInfoSection());
      layout.addSection(new String[] {editTabLabel, getLabel(LUConstants.ACADEMIC_CONTENT_LABEL_KEY)}

      , generateLearningObjectivesSection());
      layout.addSection(new String[]

      {editTabLabel, getLabel(LUConstants.STUDENT_ELIGIBILITY_LABEL_KEY)}, generateCourseRequisitesSection());
      layout.addSection(new String[] {editTabLabel, getLabel(LUConstants.ADMINISTRATION_LABEL_KEY)}, generateActiveDatesSection());
      //layout.addSection(new String[] {editTabLabel, getLabel(LUConstants.ADMINISTRATION_LABEL_KEY)}, generateFinancialsSection());
      layout.addSection(new String[] {getLabel(LUConstants.SUMMARY_LABEL_KEY)}, generateSummarySection());

      Test result with Cucumber scenario SectionOrder1 is shown in the attached file: Sectionorder1_Test.png

      @SectionOrder1
      Scenario: Create a new course proposal
      Given I am logged in as "eric" with the password "eric"
      And I am on the kuali homepage
      When I follow "Curriculum Management"
      Then I should see "Create an Academic Credit Course"
      And I press "Start Blank Proposal"
      And I wait for "2" seconds
      Then I should see "New Course Proposal"
      And I should see linkindex "1" with text "Governance"
      And I should see linkindex "2" with text "Course Logistics"
      And I should see linkindex "3" with text "Course Information"
      And I should see linkindex "4" with text "Learning Objectives"
      And I should see linkindex "5" with text "Course Requisites"
      And I should see linkindex "6" with text "Active Dates"


      Example of changed page of New Course Proposal is in the attached file: SectionOrder2.png
      Modified code of CourseConfigurer.java for Cucumber SectionOrder2 test:

      public void configureCourseProposal(ConfigurableLayout layout) {
      groupName = LUConstants.COURSE_GROUP_NAME;

      addCluStartSection(layout);

      String editTabLabel = getLabel(LUConstants.EDIT_TAB_LABEL_KEY);
      //layout.addSection(new String[] {editTabLabel, getLabel(LUConstants.PROPOSAL_INFORMATION_LABEL_KEY)}, generateGovernanceSection());
      layout.addSection(new String[] {editTabLabel, getLabel(LUConstants.ACADEMIC_CONTENT_LABEL_KEY)}, generateCourseInfoSection());
      layout.addSection(new String[] {editTabLabel, getLabel(LUConstants.PROPOSAL_INFORMATION_LABEL_KEY)}, generateCourseLogisticsSection());
      //layout.addSection(new String[] {editTabLabel, getLabel(LUConstants.ACADEMIC_CONTENT_LABEL_KEY)}, generateCourseInfoSection());
      layout.addSection(new String[] {editTabLabel, getLabel(LUConstants.PROPOSAL_INFORMATION_LABEL_KEY)}, generateGovernanceSection());
      layout.addSection(new String[] {editTabLabel, getLabel(LUConstants.ACADEMIC_CONTENT_LABEL_KEY)}, generateLearningObjectivesSection());
      layout.addSection(new String[] {editTabLabel, getLabel(LUConstants.STUDENT_ELIGIBILITY_LABEL_KEY)}

      , generateCourseRequisitesSection());
      //layout.addSection(new String[]

      {editTabLabel, getLabel(LUConstants.ADMINISTRATION_LABEL_KEY)}, generateActiveDatesSection());
      //layout.addSection(new String[] {editTabLabel, getLabel(LUConstants.ADMINISTRATION_LABEL_KEY)}

      , generateFinancialsSection());
      layout.addSection(new String[]

      {getLabel(LUConstants.SUMMARY_LABEL_KEY)}

      , generateSummarySection());

      In the code we also removed section for "Active Dates" by commenting out the appropriate code line (3rd from the bottom).
      (the change of page was emphasized also by CSS changes of this page, see wiki:
      https://test.kuali.org/confluence/display/KULSTG/Configuration+procedure+for+customizing+CSS+styles+of+UI)

      Running the original Cucumber test SectionOrder1 above produced the error shown in the SectionOrder1_Test_error.png file. Test detected immediately that the "Governance" section with the linkindex equal "1" is not on the page with the old index "1".

      Corrected test Cucumber code SectionOrder2 with the positive result (all green) and the proper link indexes in test is shown in the attached file: SectionOrder2_test.png

      Cucumber SectionOrder2 test code:
      @SectionOrder2
      Scenario: Create a new course proposal
      Given I am logged in as "eric" with the password "eric"
      And I am on the kuali homepage
      When I follow "Curriculum Management"
      Then I should see "Create an Academic Credit Course"
      And I press "Start Blank Proposal"
      And I wait for "2" seconds
      Then I should see "New Course Proposal"
      And I should see linkindex "1" with text "Course Information"
      And I should see linkindex "2" with text "Learning Objectives"
      And I should see linkindex "3" with text "Course Logistics"
      And I should see linkindex "4" with text "Governance"
      And I should see linkindex "5" with text "Course Requisites

        Attachments

        1.  section_order_after_m10.jpg
          section_order_after_m10.jpg
          17 kB
        2. section_order_before_m10.jpg
          section_order_before_m10.jpg
          16 kB
        3. SectionOrder1_Page.png
          SectionOrder1_Page.png
          72 kB
        4. SectionOrder1_Test_error.png
          SectionOrder1_Test_error.png
          91 kB
        5. SectionOrder2_Page.png
          SectionOrder2_Page.png
          70 kB
        6. SectionOrder2_Test.png
          SectionOrder2_Test.png
          75 kB
        7. SectioOrder1_Test.png
          SectioOrder1_Test.png
          78 kB

          Issue Links

            Activity

            Hide
            bclark Ben Clark (Inactive) added a comment -

            Regress against M9-M10 using the Configuration Guide in concert with the UBC KS Project

            Show
            bclark Ben Clark (Inactive) added a comment - Regress against M9-M10 using the Configuration Guide in concert with the UBC KS Project
            Hide
            dchew Doug Chew (Inactive) added a comment -

            section order before configuration: Consultations is after Authors & Collaborators

            Show
            dchew Doug Chew (Inactive) added a comment - section order before configuration: Consultations is after Authors & Collaborators
            Hide
            dchew Doug Chew (Inactive) added a comment -

            section order before configuration: Consultations is after Authors & Collaborators

            Show
            dchew Doug Chew (Inactive) added a comment - section order before configuration: Consultations is after Authors & Collaborators
            Hide
            dchew Doug Chew (Inactive) added a comment -

            section order before configuration: Consultations is after Authors & Collaborators

            Show
            dchew Doug Chew (Inactive) added a comment - section order before configuration: Consultations is after Authors & Collaborators
            Hide
            dchew Doug Chew (Inactive) added a comment -

            changed section order so Authors & Collaborators is after Consultations

            Show
            dchew Doug Chew (Inactive) added a comment - changed section order so Authors & Collaborators is after Consultations
            Hide
            dchew Doug Chew (Inactive) added a comment - - edited

            M10 - passed tests - extended CourseConfigurer with CdmCourseConfigurer and used deferred binding to load my CdmCourseConfigurer. Configured sections and swapped the order of "Consultations" and "Authors & Collaborators"

            Show
            dchew Doug Chew (Inactive) added a comment - - edited M10 - passed tests - extended CourseConfigurer with CdmCourseConfigurer and used deferred binding to load my CdmCourseConfigurer. Configured sections and swapped the order of "Consultations" and "Authors & Collaborators"

              People

              • Assignee:
                dchew Doug Chew (Inactive)
                Reporter:
                rkaushik Rajiv Kaushik (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: