Problems executing Behat tests

Re: Problems executing Behat tests

by Renaat Debleu -
Number of replies: 1
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Average of ratings: Useful (2)
In reply to Renaat Debleu

Re: Problems executing Behat tests

by Tim V. -

Thank you Renaat! I tried using Chrome 79 as described in MDL-58948. Now, the navigation works, Behat logs in and is doing some tests. But I'm still getting errors like "Xpath matching locator "//input[@name="tool/policy:acceptbehalf" and @value="1"]" not found. (Behat\Mink\Exception\ElementNotFoundException)".

The reason seems to be that Moodle throws the following exception when Behat clicks on "Show advanced" in the "Define roles" tab:

Exception - Unknown error type: Invalid characters passed for attempted conversion, these have been ignored in [dirroot]\lib\typo3\class.t3lib_cs.php on line 1316

Debug info:
Error code: generalexceptionmessage

Stack trace:

  • line 158 of \lib\behat\lib.php: Exception thrown
  • line ? of unknownfile: call to behat_error_handler()
  • line 1316 of \lib\typo3\class.t3lib_cs.php: call to hexdec()
  • line 2098 of \lib\typo3\class.t3lib_cs.php: call to t3lib_cs->initUnicodeData()
  • line 1727 of \lib\typo3\class.t3lib_cs.php: call to t3lib_cs->utf8_char_mapping()
  • line 433 of \lib\classes\text.php: call to t3lib_cs->specCharsToASCII()
  • line 102 of \admin\roles\classes\define_role_table_advanced.php: call to core_text::specialtoascii()
  • line 191 of \admin\roles\define.php: call to core_role_define_role_table_advanced->read_submitted_permissions()

I already re-installed Moodle 3.8.1 from the scratch but the error persists. Is there any known bug regarding this exception? I found some bug reports regarding similar exceptions but nothing that is related to the "Show advanced" button of the role definitions.