<commit_before>Feature: Coach reorders lesson resources
   Coaches need to be able to (re)order the resources in a lesson according to their needs

  Background:
    Given I am signed in to Kolibri as coach user
      And I am on *Coach > Plan > Lessons* page
      And I see the lesson <lesson_title>

  Scenario: Coach reorders the resources in the lesson
  When I click the lesson <lesson_title>
    Then I am on the <lesson_title> page
      And I see the list of resources included in the <lesson_title>
      And I see that each resource has *arrow up/down* buttons 
    When I click the *arrow down* button of a <resource> resource that I want to move below
    Then the snackbar notification appears
			And I see the resource move downward
    When I click the *arrow up* button of a <resource> resource that I want to move above
    Then the snackbar notification appears
      And I see the resource move upward

Examples:
| lesson_title   | resource          |
| Read the story | Night Trouble     |<commit_msg>Keyboard reorder resources in the lesson<commit_after>Feature: Coach reorders lesson resources
   Coaches need to be able to (re)order the resources in a lesson according to their needs

  Background:
    Given I am signed in to Kolibri as coach user
      And I am on *Coach > Plan > Lessons* page
      And I see the lesson <lesson_title>

  Scenario: Reorder resources in the lesson by mouse drag and drop
    When I click the lesson <lesson_title>
      Then I am on the <lesson_title> page
        And I see the list of resources included in the <lesson_title>
      When I move the cursor over a resource
      Then it transforms to a hand
      When I drag and drop the resource up or down 
      Then the snackbar notification appears
        And I see the resource in the new position

  Scenario: Reorder resources in the lesson by keyboard
    When I click the lesson <lesson_title>
      Then I am on the <lesson_title> page
        And I see the list of resources included in the <lesson_title>
      When I use the TAB key to focus the resource 
      Then I see the focus ring around either up or down arrow
      When I press the ENTER or SPACEBAR key  
      Then the snackbar notification appears
        And I see the resource in the new position

Examples:
| lesson_title   | resource          |
| Read the story | Night Trouble     |
{'fraction_non_alphanumeric': 0.030303030303030304, 'fraction_numerical': 0.0, 'mean_word_length': 2.890343698854337, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5155833', 'n_tokens_mistral': 628, 'n_tokens_neox': 605, 'n_words': 362}