MDL-43883 Atto behat: Rubrics are expecting magic tweaking in text from tinymce.
This commit is contained in:
@@ -45,7 +45,7 @@ Feature: Publish rubrics as templates
|
||||
|
||||
@javascript
|
||||
Scenario: Create a rubric template and reuse it as a teacher, with Javascript enabled
|
||||
Then the field "Description" matches value "<p>Assignment 1 description</p>"
|
||||
Then the field "Description" matches value "Assignment 1 description"
|
||||
And I should see "Criterion 1"
|
||||
And I press "Cancel"
|
||||
|
||||
|
||||
@@ -63,7 +63,8 @@ class behat_form_text extends behat_form_field {
|
||||
* @return bool The provided value matches the field value?
|
||||
*/
|
||||
public function matches($expectedvalue) {
|
||||
return $this->text_matches($expectedvalue);
|
||||
// A text editor may silently wrap the content in p tags (or not). Neither is an error.
|
||||
return $this->text_matches($expectedvalue) || $this->text_matches('<p>' . $expectedvalue . '</p>');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user