Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-77991

Create a new generic select and search style element

XMLWordPrintable

    • MOODLE_403_STABLE
    • Hide

      Functionality tests:

      1. Covered by both existing and new behat
      2. General smoke test across both the single view & user reports

      Regression tests:

      Some steps have been updated from their related MDLs as some parts have changed after they landed

      MDL-77451:
      1. Create a course and enrol a few users in it.
      2. Go into the course and click on the "reports" from the primary navigation.
      3. Go to the "Users report" (from the secondary navigation menu)
      4. Open the browser's console
      5. Execute the following statement in the console
        • setInterval(function() {
           document.querySelector('div[aria-label="Toggle the following dropdown"]').click();
          }, 5);

      6. Verify that you see a drop-down constantly appearing and disappearing
      7. Wait for about 10 seconds and verify that no warning is shown on the page
      MDL-76246:
      1. Create a course and enrol some users in it
      2. Create 2 assignments in the course
      3. Go to the course's grade book
      4. Go to the user report
      5. Try to search for an user within the search input.
      6. Verify that the "Search users" text box is focused
      7. Verify that you can move between options using the up and down arrow keys
      8. Verify that the focus stays on the search box when you move up/down through the options
      9. Press Tab
      10. Verify that "All users" is focused
      11. Verify that Pressing Tab key multiple times only switch the focus between the "Search users" and the "All users" elements
      MDL-75837: covered by behat but just incase you want it:
      1. Login as admin.
      2. Create a course.
        • Set Group mode = 'Separate groups'
      3. Enrol several students in the course and add some of them to the created groups
      4. Navigate to the Gradebook (Grades)
      5. Go to the User report.
      6. Click on the group selector (also test this by pressing enter/space/down arrow using the keyboard)
        1. confirm that the selector opens in a dropdown
        2. confirm that the immediate focus is on the search input element
      7. Try to search for an user within the search input.
        1. confirm that only relevant results are displayed
        2. confirm that there is a 'clear search' option on the search input element
      8. Click on the 'clear search' element
        1. confirm that the value in the search input is cleared
        2. confirm that you cannot see the 'clear search' option
      9. Try to search for an user within the search input.
      10. While the focus on the search element, press tab using the keyboard
        1. confirm that the focus now shifts on the list of results
        2. confirm that you can navigate through the items in the list using up/down arrow keys
      11. Press Esc
        1. confirm that the dropdown closes and the focus is back on the user search input
      12. Repeat steps 6-11 with the user selector in the User report and confirm that everything works as expected.
      13. Repeat steps 6-11 with the grade selector in the Single view report (Grade > Single view > Grade items) and confirm that everything works as expected.
      14. Repeat steps 6-11 with the user selector in the Single view report (Grade > Single view > Users) and confirm that everything works as expected.
      MDL-78377
      1. Create an "S" size course using Make test course developer option
      2. Navigate to created course
      3. Edit course settings:
        • Group mode: Visible groups
      4. Add group
      5. Add 10 members of course to group
      6. Navigate to course gradebook
      7. Use pagination toolbar to switch to second page
      8. From Select visible groups element, choose created group
      9. Confirm all group members are shown on grade page
      Show
      Functionality tests: Covered by both existing and new behat General smoke test across both the single view & user reports Regression tests: Some steps have been updated from their related MDLs as some parts have changed after they landed MDL-77451 : Create a course and enrol a few users in it. Go into the course and click on the "reports" from the primary navigation. Go to the "Users report" (from the secondary navigation menu) Open the browser's console Execute the following statement in the console setInterval(function() { document.querySelector( 'div[aria-label="Toggle the following dropdown"]' ).click(); }, 5 ); Verify that you see a drop-down constantly appearing and disappearing Wait for about 10 seconds and verify that no warning is shown on the page MDL-76246 : Create a course and enrol some users in it Create 2 assignments in the course Go to the course's grade book Go to the user report Try to search for an user within the search input. Verify that the "Search users" text box is focused Verify that you can move between options using the up and down arrow keys Verify that the focus stays on the search box when you move up/down through the options Press Tab Verify that "All users" is focused Verify that Pressing Tab key multiple times only switch the focus between the "Search users" and the "All users" elements MDL-75837 : covered by behat but just incase you want it: Login as admin. Create a course. Set Group mode = 'Separate groups' Enrol several students in the course and add some of them to the created groups Navigate to the Gradebook (Grades) Go to the User report. Click on the group selector (also test this by pressing enter/space/down arrow using the keyboard) confirm that the selector opens in a dropdown confirm that the immediate focus is on the search input element Try to search for an user within the search input. confirm that only relevant results are displayed confirm that there is a 'clear search' option on the search input element Click on the 'clear search' element confirm that the value in the search input is cleared confirm that you cannot see the 'clear search' option Try to search for an user within the search input. While the focus on the search element, press tab using the keyboard confirm that the focus now shifts on the list of results confirm that you can navigate through the items in the list using up/down arrow keys Press Esc confirm that the dropdown closes and the focus is back on the user search input Repeat steps 6-11 with the user selector in the User report and confirm that everything works as expected. Repeat steps 6-11 with the grade selector in the Single view report (Grade > Single view > Grade items) and confirm that everything works as expected. Repeat steps 6-11 with the user selector in the Single view report (Grade > Single view > Users) and confirm that everything works as expected. MDL-78377 Create an "S" size course using  Make test course  developer option Navigate to created course Edit course settings: Group mode: Visible groups Add group Add 10 members of course to group Navigate to course gradebook Use pagination toolbar to switch to second page From  Select visible groups  element, choose created group Confirm  all group members are shown on grade page
    • 3
    • Team Alpha - Planning sprint, Team Alpha - Sprint 1 I2-2023, Team Alpha - Sprint 2 I2-2023

      The gradebook has this sort of selector for the single view report and other areas. The initial intention was to move this into a general library once it had proved itself in the gradebook. The concept is good, but due to some important aspects not being included, and the solution to that added regressions for backwards compatibility; we've ended up with a component that is difficult to understand and use.

      We should take all of the lessons that we learned from the development in the gradebook and create a replacement that can be used anywhere in Moodle.

      The existing element should be deprecated so that we push third party developers to a better solution.

            mathewmay Mathew May
            abgreeve Adrian Greeve
            Mihail Geshoski Mihail Geshoski
            Jun Pataleta Jun Pataleta
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 week, 1 day Original Estimate - 1 week, 1 day
                1w 1d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 weeks, 5 hours, 8 minutes
                4w 5h 8m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.