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

Ability to search in the activity chooser

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Setup

      1. Login as Admin.
      2. Create a Course.

      Test 1 (search for an activity name or description)

      1. Go to the Course.
      2. Turn editing on.
      3. Click on any 'Add activity or resource' link.
      4. In the activity chooser
        • make sure there a search bar at the very top of activity chooser
      5. Enter a search query in the search bar that corresponds to a name of an existing activity  (ex. "Lesson", "Less") 
        • make sure the search results are updated on each key press while entering the search query
        • make sure there is a text label that indicates the number of search results found ("N results found")
        • make sure the correct search results (activities) are being displayed
          (Note: the search results might include activities that contain the search query in their description)
      6. Enter a search query in the search bar that corresponds to a description of an existing activity  (ex. "The lesson activity module enables a teacher")
        •  make sure the correct search results (activities) are being displayed (ex. "Lesson")

      Test 2 (search for a non-existing activity)

      1. Go to the Course.
      2. Turn editing on.
      3. Click on any 'Add activity or resource' link.
      4. In the activity chooser enter a search query in the search bar that does NOT correspond to a name or description of an existing activity (ex. "Random query string") 
        • make sure the search results are updated on each key press while entering the search query
        • make sure there is a text label that indicates that 0 search results were found ("0 results found")

      Test 3 (remove search query manually, return to default chooser state)

      1. Go to the Course.
      2. Turn editing on.
      3. Click on any 'Add activity or resource' link.
      4. In the activity chooser enter a search query in the search bar that corresponds to a name of an existing activity  (ex. "Lesson", "Less") 
        • make sure the correct search results (activities) are being displayed
      5. In the search bar remove the search query using the keyboard
        • make sure you CANNOT see the search results anymore nor the "N results found" text label
        • make sure you CAN see the default chooser state (all available activities displayed)

      Test 4 (remove search query using "clear" button, return to default chooser state)

      1. Go to the Course.
      2. Turn editing on.
      3. Click on any 'Add activity or resource' link.
      4. In the activity chooser, before entering a search query
        • make sure the is NOT a "clear" search button in the search bar
      5. Enter a search query in the search bar that corresponds to a name of an existing activity  (ex. "Lesson", "Less") 
        • make sure there IS a "clear" search button in the search bar
      6. Click on the "clear" search button in the search bar
        • make sure you CANNOT see the search results anymore nor the "N results found" text label
        • make sure you CAN see the default chooser state (all available activities displayed)

      Test 5 (search query should be removed after the activity chooser is closed)

      1. Go to the Course.
      2. Turn editing on.
      3. Click on any 'Add activity or resource' link.
      4. Enter a random search query in the search bar (ex. "Some random query") 
      5. Close the activity chooser dialog (using the "X" button or the "Esc" key)
      6. Click again on the same 'Add activity or resource' link.
        • make sure the search bar does not contain the previously entered search query and is empty.
      Show
      Setup Login as Admin. Create a Course. Test 1 (search for an activity name or description) Go to the Course. Turn editing on. Click on any 'Add activity or resource' link. In the activity chooser make sure there a search bar at the very top of activity chooser Enter a search query in the search bar that corresponds to a name of an existing activity  (ex. "Lesson", "Less")  make sure the search results are updated on each key press while entering the search query make sure there is a text label that indicates the number of search results found ("N results found") make sure the correct search results (activities) are being displayed (Note: the search results might include activities that contain the search query in their description) Enter a search query in the search bar that corresponds to a description of an existing activity  (ex. "The lesson activity module enables a teacher")   make sure the correct search results (activities) are being displayed (ex. "Lesson") Test 2 (search for a non-existing activity) Go to the Course. Turn editing on. Click on any 'Add activity or resource' link. In the activity chooser enter a search query in the search bar that does NOT correspond to a name or description of an existing activity (ex. "Random query string")  make sure the search results are updated on each key press while entering the search query make sure there is a text label that indicates that 0 search results were found ("0 results found") Test 3 (remove search query manually, return to default chooser state) Go to the Course. Turn editing on. Click on any 'Add activity or resource' link. In the activity chooser enter a search query in the search bar that corresponds to a name of an existing activity  (ex. "Lesson", "Less")  make sure the correct search results (activities) are being displayed In the search bar remove the search query using the keyboard make sure you CANNOT see the search results anymore nor the "N results found" text label make sure you CAN see the default chooser state (all available activities displayed) Test 4 (remove search query using "clear" button, return to default chooser state) Go to the Course. Turn editing on. Click on any 'Add activity or resource' link. In the activity chooser, before entering a search query make sure the is NOT a "clear" search button in the search bar Enter a search query in the search bar that corresponds to a name of an existing activity  (ex. "Lesson", "Less")  make sure there IS a "clear" search button in the search bar Click on the "clear" search button in the search bar make sure you CANNOT see the search results anymore nor the "N results found" text label make sure you CAN see the default chooser state (all available activities displayed) Test 5 (search query should be removed after the activity chooser is closed) Go to the Course. Turn editing on. Click on any 'Add activity or resource' link. Enter a random search query in the search bar (ex. "Some random query")  Close the activity chooser dialog (using the "X" button or the "Esc" key) Click again on the same 'Add activity or resource' link. make sure the search bar does not contain the previously entered search query and is empty.
    • Affected Branches:
      MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_39_STABLE
    • Pull Master Branch:
      MDL-67263-master
    • Story Points:
      3
    • Sprint:
      Activity Sprint 6, Activity Sprint 7, Activity Sprint 8

      Description

      User Stories Approach
      As a teacher I should be able to search for elements in the modal based on title and information  
      As a teacher, i should be to see searched elements grouped by tabs  
      As a teacher I should be able to go back to the default view of the modal once I finish searching Either by removing search or pressing back button
      As a teacher when I perform a search I should be able to see what triggered the result Have this behave like the H5P search. Results are shown, but no context (if the search result is in the more info section).
      As a teacher, after i perform a search, I should be able to navigate between the information and search results seamlessly When viewing details of an activity, after clicking back, the search should still be active.

      Acceptance criteria

      • A search bar should be located at the top of the activity chooser when it is opened.
      • Typing anything into the search bar should immediately start showing results (no need to click a search button).
      • The search should search both the name, and the information to show a result.
      • Search results should remove the tabs previously shown and show the results on the one page. Results should be categorised i.e. Starred, Recommended, Activities, H5P.
      • There must be a way to quickly get back to the default state. Clearing the search box being one way. A back button being another. Please implement both.
      • If there are no search results then a message should be displayed saying as much.
      • The search results should remain intact while viewing information on an activity, or starring an activity.
      • Behat tests must cover the above features.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Geshoski Mihail Geshoski
              Reporter:
              peterdias Peter Dias
              Peer reviewer:
              Peter Dias
              Integrator:
              Andrew Nicols
              Tester:
              Andrew Nicols
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/Jun/20

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 days, 1 hour, 5 minutes
                  4d 1h 5m