MDL-49335 Behat: new question selector

So you can say things like
    And I click on "True" "radio" in the "First question" "question"
This commit is contained in:
Tim Hunt 2015-02-27 14:40:44 +00:00
parent f70fbc05e1
commit 92caa214ef

View File

@ -45,6 +45,7 @@ class behat_selectors {
'dialogue' => 'dialogue',
'fieldset' => 'fieldset',
'list_item' => 'list_item',
'question' => 'question',
'region' => 'region',
'section' => 'section',
'table' => 'table',
@ -71,6 +72,7 @@ class behat_selectors {
'list_item' => 'list_item',
'optgroup' => 'optgroup',
'option' => 'option',
'question' => 'question',
'radio' => 'radio',
'region' => 'region',
'section' => 'section',
@ -113,6 +115,10 @@ XPATH
XPATH
, 'list_item' => <<<XPATH
.//li[contains(normalize-space(.), %locator%)]
XPATH
, 'question' => <<<XPATH
//div[contains(concat(' ', normalize-space(@class), ' '), ' que ')]
[contains(div[@class='content']/div[@class='formulation'], %locator%)]
XPATH
, 'region' => <<<XPATH
//*[self::div | self::section | self::aside | self::header | self::footer][./@id = %locator%]