Fix Chosen.js selector for Behat feature

The recent upgrade to Chosen.js 1.5 changes the generated markup:
It still renders an <a> tag, but without the "href" attribute.
This attribute isn't actually required to uniquely identify
the link in this structure.
This commit is contained in:
Ingo Schommer 2016-04-20 13:52:51 +12:00
parent 8215a9421e
commit 8cf38720b5

View File

@ -490,7 +490,7 @@ class CmsUiContext extends BehatContext {
assertNotNull($container, 'Chosen.js field container not found'); assertNotNull($container, 'Chosen.js field container not found');
// Click on newly expanded list element, indirectly setting the dropdown value // Click on newly expanded list element, indirectly setting the dropdown value
$linkEl = $container->find('xpath', './/a[./@href]'); $linkEl = $container->find('xpath', './/a');
assertNotNull($linkEl, 'Chosen.js link element not found'); assertNotNull($linkEl, 'Chosen.js link element not found');
$this->getSession()->wait(100); // wait for dropdown overlay to appear $this->getSession()->wait(100); // wait for dropdown overlay to appear
$linkEl->click(); $linkEl->click();