diff --git a/grade/grading/form/rubric/tests/behat/behat_gradingform_rubric.php b/grade/grading/form/rubric/tests/behat/behat_gradingform_rubric.php
index 851c36a..bef83f9 100644
--- a/grade/grading/form/rubric/tests/behat/behat_gradingform_rubric.php
+++ b/grade/grading/form/rubric/tests/behat/behat_gradingform_rubric.php
@@ -29,6 +29,8 @@ require_once(__DIR__ . '/../../../../../../lib/behat/behat_base.php');
 
 use Behat\Gherkin\Node\TableNode as TableNode,
     Behat\Behat\Context\Step\Given as Given,
+    Behat\Behat\Context\Step\When as When,
+    Behat\Behat\Context\Step\Then as Then,
     Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException,
     Behat\Mink\Exception\ExpectationException as ExpectationException;
 
@@ -50,17 +52,29 @@ class behat_gradingform_rubric extends behat_base {
     /**
      * Defines the rubric with the provided data, following rubric's definition grid cells.
      *
-     * Being a smart method is nothing good when we talk about step definitions, in
-     * this case we didn't have any other options as there are no labels no elements
-     * id we can point to without having to "calculate" them.
+     * This method fills the rubric of the rubric definition
+     * form; the provided TableNode should contain one row for
+     * each criterion and each cell of the row should contain:
+     * # Criterion description
+     * # Criterion level 1 name
+     * # Criterion level 1 points
+     * # Criterion level 2 name
+     * # Criterion level 2 points
+     * # Criterion level 3 .....
      *
-     * @When /^I set the following rubric:$/
+     * Works with both JS and non-JS.
+     *
+     * @When /^I define the following rubric:$/
      * @throws ExpectationException
      * @param TableNode $rubric
      */
-    public function i_set_the_following_rubric(TableNode $rubric) {
+    public function i_define_the_following_rubric(TableNode $rubric) {
+
+        // Being a smart method is nothing good when we talk about step definitions, in
+        // this case we didn't have any other options as there are no labels no elements
+        // id we can point to without having to "calculate" them.
 
-        $steptableinfo = '| criterion description | level1 definition | level1 points | level2 definition | level2 points | ...';
+        $steptableinfo = '| criterion description | level1 name  | level1 points | level2 name | level2 points | ...';
 
         $criteria = $rubric->getRows();
 
@@ -191,20 +205,34 @@ class behat_gradingform_rubric extends behat_base {
     }
 
     /**
-     * Replaces a value from the current page's rubric definition. It can be replaced by a definition or by a score.
+     * Replaces a value from the specified criterion. You can use it when editing rubrics, to set both name or points.
      *
-     * @Given /^I replace "(?P<current_value_string>(?:[^"]|\\")*)" rubric definition value with "(?P<value_string>(?:[^"]|\\")*)"$/
+     * @When /^I replace "(?P<current_value_string>(?:[^"]|\\")*)" rubric level with "(?P<value_string>(?:[^"]|\\")*)" in "(?P<criterion_string>(?:[^"]|\\")*)" criterion$/
      * @throws ElementNotFoundException
      * @param string $currentvalue
      * @param string $value
+     * @param string $criterionname
      * @return Given[]
      */
-    public function i_replace_rubric_definition_value_with($currentvalue, $value) {
+    public function i_replace_rubric_level_with($currentvalue, $value, $criterionname) {
 
         $currentvalueliteral = $this->getSession()->getSelectorsHandler()->xpathLiteral($currentvalue);
-        $inputxpath = "//div[@id='rubric-rubric']" .
+        $criterionliteral = $this->getSession()->getSelectorsHandler()->xpathLiteral($criterionname);
+
+        $criterionxpath = "//div[@id='rubric-rubric']" .
+            "/descendant::td[contains(concat(' ', normalize-space(@class), ' '), ' description ')]";
+        // It differs between JS on/off.
+        if ($this->running_javascript()) {
+            $criterionxpath .= "/descendant::span[@class='textvalue'][text()=$criterionliteral]" .
+                "/ancestor::tr[contains(concat(' ', normalize-space(@class), ' '), ' criterion ')]";
+        } else {
+            $criterionxpath .= "/descendant::textarea[text()=$criterionliteral]" .
+                "/ancestor::tr[contains(concat(' ', normalize-space(@class), ' '), ' criterion ')]";
+        }
+
+        $inputxpath = $criterionxpath .
             "/descendant::input[@type='text'][@value=$currentvalueliteral]";
-        $textareaxpath = "//div[@id='rubric-rubric']" .
+        $textareaxpath = $criterionxpath .
             "/descendant::textarea[text()=$currentvalueliteral]";
 
         if ($this->running_javascript()) {
@@ -228,20 +256,20 @@ class behat_gradingform_rubric extends behat_base {
     }
 
     /**
-     * Fills the current page rubric. Set one line per criterion and for each criterion set | name | points | Remark |.
+     * Grades filling the current page rubric. Set one line per criterion and for each criterion set "| Criterion name | Points | Remark |".
      *
-     * @Given /^I rubric with:$/
+     * @When /^I grade by filling the rubric with:$/
      *
      * @throws ExpectationException
      * @param TableNode $rubric
      * @return void
      */
-    public function i_rubric_with(TableNode $rubric) {
+    public function i_grade_by_filling_the_rubric_with(TableNode $rubric) {
 
         $criteria = $rubric->getRowsHash();
 
-        $stepusage = '"I rubric with:" step needs you to provide a table where each row is a criterion' .
-            ' and each criterion has 3 different values: | Criterion name | number of points | Remark |';
+        $stepusage = '"I grade by filling the rubric with:" step needs you to provide a table where each row is a criterion' .
+            ' and each criterion has 3 different values: | Criterion name | Number of points | Remark text |';
 
         // To fill with the steps to execute.
         $steps = array();
@@ -296,15 +324,15 @@ class behat_gradingform_rubric extends behat_base {
     }
 
     /**
-     * Checks that the criterion's level was selected before. Works both for editing rubrics and rubrics definitions.
+     * Checks that the level was previously selected and the user changed to another level.
      *
-     * @Then /^"(?P<criterion_name_string>(?:[^"]|\\")*)" criterion's "(?P<points_number>\d+)" points level was previously selected$/
+     * @Then /^the level with "(?P<points_number>\d+)" points was previously selected for the rubric criterion "(?P<criterion_name_string>(?:[^"]|\\")*)"$/
      * @throws ExpectationException
      * @param string $criterionname
      * @param int $points
      * @return void
      */
-    public function criterion_points_level_was_previously_selected($criterionname, $points) {
+    public function the_level_with_points_was_previously_selected_for_the_rubric_criterion($points, $criterionname) {
 
         $levelxpath = $this->get_criterion_xpath($criterionname) .
             $this->get_level_xpath($points) .
@@ -325,15 +353,15 @@ class behat_gradingform_rubric extends behat_base {
     }
 
     /**
-     * Checks that the specified criterion's level is currently selected. Works both for editing rubrics and rubrics definitions.
+     * Checks that the level is currently selected. Works both when grading rubrics and viewing graded rubrics.
      *
-     * @Then /^"(?P<criterion_name_string>(?:[^"]|\\")*)" criterion's "(?P<points_number>\d+)" points level is selected$/
+     * @Then /^the level with "(?P<points_number>\d+)" points is selected for the rubric criterion "(?P<criterion_name_string>(?:[^"]|\\")*)"$/
      * @throws ExpectationException
      * @param string $criterionname
      * @param int $points
      * @return void
      */
-    public function criterion_points_level_is_selected($criterionname, $points) {
+    public function the_level_with_points_is_selected_for_the_rubric_criterion($points, $criterionname) {
 
         $levelxpath = $this->get_criterion_xpath($criterionname) .
             $this->get_level_xpath($points);
@@ -356,15 +384,15 @@ class behat_gradingform_rubric extends behat_base {
     }
 
     /**
-     * Checks that the criterion's level is not currently selected. Works both for editing rubrics and rubrics definitions.
+     * Checks that the level is not currently selected. Works both when grading rubrics and viewing graded rubrics.
      *
-     * @Then /^"(?P<criterion_name_string>(?:[^"]|\\")*)" criterion's "(?P<points_number>\d+)" points level is not selected$/
+     * @Then /^the level with "(?P<points_number>\d+)" points is not selected for the rubric criterion "(?P<criterion_name_string>(?:[^"]|\\")*)"$/
      * @throws ExpectationException
      * @param string $criterionname
      * @param int $points
      * @return void
      */
-    public function criterion_points_level_is_not_selected($criterionname, $points) {
+    public function the_level_with_points_is_not_selected_for_the_rubric_criterion($points, $criterionname) {
 
         $levelxpath = $this->get_criterion_xpath($criterionname) .
             $this->get_level_xpath($points);
@@ -385,7 +413,7 @@ class behat_gradingform_rubric extends behat_base {
 
 
     /**
-     * Makes a hidden rubric field visible and sets a value on it.
+     * Makes a hidden rubric field visible (if necessary) and sets a value on it.
      *
      * @param string $name The name of the field
      * @param string $value The value to set
@@ -434,6 +462,9 @@ class behat_gradingform_rubric extends behat_base {
      *
      * It is not including the path to the criterion.
      *
+     * It is the xpath when grading a rubric or viewing a rubric,
+     * it is not the same xpath when editing a rubric.
+     *
      * @param int $points
      * @return string
      */
@@ -445,6 +476,9 @@ class behat_gradingform_rubric extends behat_base {
     /**
      * Returns the xpath representing the selected criterion.
      *
+     * It is the xpath when grading a rubric or viewing a rubric,
+     * it is not the same xpath when editing a rubric.
+     *
      * @param string $criterionname Literal including the criterion name.
      * @return string
      */
diff --git a/grade/grading/form/rubric/tests/behat/edit_rubric.feature b/grade/grading/form/rubric/tests/behat/edit_rubric.feature
index b549bd4..2ff3a9a 100644
--- a/grade/grading/form/rubric/tests/behat/edit_rubric.feature
+++ b/grade/grading/form/rubric/tests/behat/edit_rubric.feature
@@ -28,44 +28,44 @@ Feature: Rubrics can be created and edited
     And I fill the moodle form with:
       | Name | Assignment 1 rubric |
       | Description | Rubric test description |
-    And I set the following rubric:
-      | TMP Criterion 1 description | TMP Definition 11 | 11 | TMP Definition 12 | 12 |
-      | TMP Criterion 2 description | TMP Definition 21 | 21 | TMP Definition 22 | 22 |
-      | TMP Criterion 3 description | TMP Definition 31 | 31 | TMP Definition 32 | 32 |
-      | TMP Criterion 4 description | TMP Definition 41 | 41 | TMP Definition 42 | 42 |
+    And I define the following rubric:
+      | TMP Criterion 1 | TMP Level 11 | 11 | TMP Level 12 | 12 |
+      | TMP Criterion 2 | TMP Level 21 | 21 | TMP Level 22 | 22 |
+      | TMP Criterion 3 | TMP Level 31 | 31 | TMP Level 32 | 32 |
+      | TMP Criterion 4 | TMP Level 41 | 41 | TMP Level 42 | 42 |
     # Checking that only the last ones are saved.
-    And I set the following rubric:
-      | Criterion 1 description | Definition 11 | 1 | Definition 12 | 20 | Definition 13 | 40 | Definition 14 | 50 |
-      | Criterion 2 description | Definition 21 | 10 | Definition 22 | 20 | Definition 23 | 30 |
-      | Criterion 3 description | Definition 31 | 5 | Definition 32 | 20 |
+    And I define the following rubric:
+      | Criterion 1 | Level 11 | 1 | Level 12 | 20 | Level 13 | 40 | Level 14 | 50 |
+      | Criterion 2 | Level 21 | 10 | Level 22 | 20 | Level 23 | 30 |
+      | Criterion 3 | Level 31 | 5 | Level 32 | 20 |
     And I press "Save as draft"
     And I go to "Test assignment 1 name" advanced grading definition page
-    And I click on "Move down" "button" in the "Criterion 1 description" "table_row"
+    And I click on "Move down" "button" in the "Criterion 1" "table_row"
     And I press "Save rubric and make it ready"
     Then I should see "Ready for use"
     # Grading two students.
     And I go to "Student 1" "Test assignment 1 name" activity advanced grading page
-    And I rubric with:
-      | Criterion 1 description | 50 | Very good |
+    And I grade by filling the rubric with:
+      | Criterion 1 | 50 | Very good |
     And I press "Save changes"
     # Checking that it complains if you don't select a level for each criterion.
     And I should see "Please choose something for each criterion"
-    And I rubric with:
-      | Criterion 1 description | 50 | Very good |
-      | Criterion 2 description | 10 | Mmmm, you can do it better |
-      | Criterion 3 description | 5 | Not good |
+    And I grade by filling the rubric with:
+      | Criterion 1 | 50 | Very good |
+      | Criterion 2 | 10 | Mmmm, you can do it better |
+      | Criterion 3 | 5 | Not good |
     And I complete the advanced grading form with these values:
       | Feedback comments | In general... work harder... |
     # Checking that the user grade is correct.
     And I should see "58.33" in the "Student 1" "table_row"
     # Updating the user grade.
     And I go to "Student 1" "Test assignment 1 name" activity advanced grading page
-    And I rubric with:
-      | Criterion 1 description | 20 | Bad, I changed my mind |
-      | Criterion 2 description | 10 | Mmmm, you can do it better |
-      | Criterion 3 description | 5 | Not good |
-    #And "Criterion 1 description" criterion's "50" points level was previously selected
-    #And "Criterion 1 description" criterion's "20" points level is selected
+    And I grade by filling the rubric with:
+      | Criterion 1 | 20 | Bad, I changed my mind |
+      | Criterion 2 | 10 | Mmmm, you can do it better |
+      | Criterion 3 | 5 | Not good |
+    #And the level with "50" points was previously selected for the rubric criterion "Criterion 1"
+    #And the level with "20" points is selected for the rubric criterion "Criterion 1"
     And I save the advanced grading form
     And I should see "22.62" in the "Student 1" "table_row"
     And I log out
@@ -76,17 +76,17 @@ Feature: Rubrics can be created and edited
     And I should see "22.62" in the ".feedback" "css_element"
     And I should see "Rubric test description" in the ".feedback" "css_element"
     And I should see "In general... work harder..."
-    And "Criterion 2 description" criterion's "10" points level is selected
-    And "Criterion 1 description" criterion's "20" points level is selected
-    And "Criterion 3 description" criterion's "5" points level is selected
+    And the level with "10" points is selected for the rubric criterion "Criterion 2"
+    And the level with "20" points is selected for the rubric criterion "Criterion 1"
+    And the level with "5" points is selected for the rubric criterion "Criterion 3"
     And I log out
     And I log in as "teacher1"
     And I follow "Course 1"
     # Editing a rubric definition without regrading students.
     And I go to "Test assignment 1 name" advanced grading definition page
     And "Save as draft" "button" should not exists
-    And I click on "Move up" "button" in the "Criterion 1 description" "table_row"
-    And I replace "Definition 11" rubric definition value with "Definition 11 edited"
+    And I click on "Move up" "button" in the "Criterion 1" "table_row"
+    And I replace "Level 11" rubric level with "Level 11 edited" in "Criterion 1" criterion
     And I press "Save"
     And I should see "You are about to save changes to a rubric that has already been used for grading."
     And I select "Do not mark for regrade" from "menurubricregrade"
@@ -97,14 +97,14 @@ Feature: Rubrics can be created and edited
     And I follow "Course 1"
     And I follow "Test assignment 1 name"
     And I should see "22.62" in the ".feedback" "css_element"
-    And "Criterion 1 description" criterion's "20" points level is selected
+    And the level with "20" points is selected for the rubric criterion "Criterion 1"
     And I log out
     # Editing a rubric with significant changes.
     And I log in as "teacher1"
     And I follow "Course 1"
     And I go to "Test assignment 1 name" advanced grading definition page
-    And I click on "Move down" "button" in the "Criterion 2 description" "table_row"
-    And I replace "1" rubric definition value with "11"
+    And I click on "Move down" "button" in the "Criterion 2" "table_row"
+    And I replace "1" rubric level with "11" in "Criterion 1" criterion
     And I press "Save"
     And I should see "You are about to save significant changes to a rubric that has already been used for grading. The gradebook value will be unchanged, but the rubric will be hidden from students until their item is regraded."
     And I press "Continue"
@@ -114,7 +114,7 @@ Feature: Rubrics can be created and edited
     And I follow "Course 1"
     And I follow "Test assignment 1 name"
     And I should see "22.62" in the ".feedback" "css_element"
-    And "Criterion 1 description" criterion's "20" points level is not selected
+    And the level with "20" points is not selected for the rubric criterion "Criterion 1"
     And I log out
     # Regrade student.
     And I log in as "teacher1"
@@ -129,7 +129,7 @@ Feature: Rubrics can be created and edited
     And I follow "Course 1"
     And I follow "Test assignment 1 name"
     And I should see "12.16" in the ".feedback" "css_element"
-    And "Criterion 1 description" criterion's "20" points level is selected
+    And the level with "20" points is not selected for the rubric criterion "Criterion 1"
     # Hide all rubric info for students
     And I log out
     And I log in as "teacher1"
@@ -148,9 +148,9 @@ Feature: Rubrics can be created and edited
     And I log in as "student1"
     And I follow "Course 1"
     And I follow "Test assignment 1 name"
-    And I should not see "Criterion 1 description" in the ".submissionstatustable" "css_element"
-    And I should not see "Criterion 2 description" in the ".submissionstatustable" "css_element"
-    And I should not see "Criterion 3 description" in the ".submissionstatustable" "css_element"
+    And I should not see "Criterion 1" in the ".submissionstatustable" "css_element"
+    And I should not see "Criterion 2" in the ".submissionstatustable" "css_element"
+    And I should not see "Criterion 3" in the ".submissionstatustable" "css_element"
     And I should not see "Rubric test description" in the ".feedback" "css_element"
 
   @javascript
diff --git a/grade/grading/form/rubric/tests/behat/reuse_rubrics.feature b/grade/grading/form/rubric/tests/behat/reuse_rubrics.feature
index 709e354..a6998ab 100644
--- a/grade/grading/form/rubric/tests/behat/reuse_rubrics.feature
+++ b/grade/grading/form/rubric/tests/behat/reuse_rubrics.feature
@@ -25,10 +25,10 @@ Feature: Reuse rubrics in other activities
     And I fill the moodle form with:
       | Name | Assignment 1 rubric |
       | Description | Assignment 1 description |
-    And I set the following rubric:
-      | Criterion 1 description | Definition 11 | 11 | Definition 12 | 12 | Definition 3 | 13 |
-      | Criterion 2 description | Definition 21 | 21 | Definition 22 | 22 | Definition 3 | 23 |
-      | Criterion 3 description | Definition 31 | 31 | Definition 32 | 32 |
+    And I define the following rubric:
+      | Criterion 1 | Level 11 | 11 | Level 12 | 12 | Level 3 | 13 |
+      | Criterion 2 | Level 21 | 21 | Level 22 | 22 | Level 3 | 23 |
+      | Criterion 3 | Level 31 | 31 | Level 32 | 32 |
     And I press "Save rubric and make it ready"
     And I follow "Course 1"
     When I add a "Assignment" to section "1" and I fill the form with:
@@ -37,13 +37,13 @@ Feature: Reuse rubrics in other activities
       | Grading method | Rubric |
     And I set "Test assignment 2 name" activity to use "Assignment 1 rubric" grading form
     Then I should see "Ready for use"
-    And I should see "Criterion 1 description"
-    And I should see "Criterion 2 description"
-    And I should see "Criterion 3 description"
+    And I should see "Criterion 1"
+    And I should see "Criterion 2"
+    And I should see "Criterion 3"
     And I go to "Test assignment 1 name" advanced grading definition page
-    And I should see "Criterion 1 description"
-    And I should see "Criterion 2 description"
-    And I should see "Criterion 3 description"
+    And I should see "Criterion 1"
+    And I should see "Criterion 2"
+    And I should see "Criterion 3"
     And I press "Cancel"
 
   @javascript
