From 4d2fd04c6451d051d5659184e8df58fc328c24d1 Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Thu, 28 Jul 2016 17:59:31 +1200 Subject: [PATCH] FIX Behat preview mode finder being too specific (#5846) --- .../SilverStripe/Framework/Test/Behaviour/CmsUiContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php b/tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php index 0ffc737a4..c18b7c0d9 100644 --- a/tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php +++ b/tests/behat/features/bootstrap/SilverStripe/Framework/Test/Behaviour/CmsUiContext.php @@ -383,7 +383,7 @@ class CmsUiContext extends BehatContext { assertNotNull($controls, 'Preview controls not found'); $label = $controls->find('xpath', sprintf( - './/label[(@for="%s")]', + './/*[count(*)=0 and contains(text(), \'%s\')]', $mode )); assertNotNull($label, 'Preview mode switch not found');