From 8211d3f5fcfa5a893decae54d27412507bf7c262 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 31 Mar 2014 14:30:49 +1300 Subject: [PATCH] More versatile "press button/link, confirming dialog" --- src/SilverStripe/BehatExtension/Context/BasicContext.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SilverStripe/BehatExtension/Context/BasicContext.php b/src/SilverStripe/BehatExtension/Context/BasicContext.php index 80b5bfe..543255f 100644 --- a/src/SilverStripe/BehatExtension/Context/BasicContext.php +++ b/src/SilverStripe/BehatExtension/Context/BasicContext.php @@ -320,8 +320,10 @@ JS; /** * Needs to be in single command to avoid "unexpected alert open" errors in Selenium. + * Example1: I press the "Remove current combo" button, confirming the dialog + * Example2: I follow the "Remove current combo" link, confirming the dialog * - * @Given /^I press the "([^"]*)" button, confirming the dialog$/ + * @Given /^I (?:press|follow) the "([^"]*)" (?:button|link), confirming the dialog$/ */ public function stepIPressTheButtonConfirmingTheDialog($button) {