-
Task
-
Resolution: Fixed
-
Minor
-
2.7, 2.7.3, 2.8.1
-
MOODLE_27_STABLE, MOODLE_28_STABLE
-
MOODLE_27_STABLE, MOODLE_28_STABLE
-
MDL-44520-master -
Easy
-
-
Team '; drop tables Sprint 2
-
Medium
Some scenarios can be improved adding more selectors, I'm thinking of:
- Course section
- Activity (the whole activity row including all the actions related with activities)
For example
diff --git a/lib/behat/classes/behat_selectors.php b/lib/behat/classes/behat_selectors.php
|
index d9d9246..b7d9e65 100644
|
--- a/lib/behat/classes/behat_selectors.php
|
+++ b/lib/behat/classes/behat_selectors.php
|
@@ -41,6 +41,7 @@ class behat_selectors {
|
protected static $allowedtextselectors = array(
|
'dialogue' => 'dialogue',
|
'block' => 'block',
|
+ 'section' => 'section',
|
'region' => 'region',
|
'table_row' => 'table_row',
|
'table' => 'table',
|
@@ -55,6 +56,7 @@ class behat_selectors {
|
protected static $allowedselectors = array(
|
'dialogue' => 'dialogue',
|
'block' => 'block',
|
+ 'section' => 'section',
|
'region' => 'region',
|
'table_row' => 'table_row',
|
'link' => 'link',
|
@@ -88,6 +90,9 @@ XPATH
|
, 'block' => <<<XPATH
|
//div[contains(concat(' ', normalize-space(@class), ' '), concat(' ', %locator%, ' '))] | //div[contains(concat(' ', normalize-space(@class), ' '), ' block ')]/descendant::h2[normalize-space(.) = %locator
|
XPATH
|
+ , 'section' => <<<XPATH
|
+//li[contains(concat(' ', normalize-space(@class), ' '), ' section ')][./descendant::h3[normalize-space(.) = %locator%][contains(concat(' ', normalize-space(@class), ' '), ' sectionname ')]]
|
+XPATH
|
, 'region' => <<<XPATH
|
//*[self::div | self::section | self::aside | self::header | self::footer][./@id = %locator%]
|
XPATH
|