mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
8215a9421e
commit
8cf38720b5
@ -490,7 +490,7 @@ class CmsUiContext extends BehatContext {
|
||||
assertNotNull($container, 'Chosen.js field container not found');
|
||||
|
||||
// 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');
|
||||
$this->getSession()->wait(100); // wait for dropdown overlay to appear
|
||||
$linkEl->click();
|
||||
|
Loading…
Reference in New Issue
Block a user