Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
50cdb600
Commit
50cdb600
authored
Mar 25, 2015
by
Eugene Venter
Browse files
Behat: override Mink Selenium2Driver in order to add triggerSynScript method
Change-Id: Ic614ba1f1d26672cebd58acb00ba5ff6c711102c
parent
6a6e9af2
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/testing/frameworks/behat/features/extensions/MaharaExtension.php
View file @
50cdb600
...
...
@@ -254,4 +254,30 @@ class MaharaProgressFormatter extends ProgressFormatter {
}
use
Behat\Mink\Driver\Selenium2Driver
as
Selenium2Driver
;
/**
* Selenium2 driver extension to allow extra selenium capabilities restricted by behat/mink-extension.
*/
class
MaharaSelenium2Driver
extends
Selenium2Driver
{
/**
* Public interface to run Syn scripts.
*
* @see self::executeJsOnXpath()
*
* @param string $xpath the xpath to search with
* @param string $script the script to execute
* @param Boolean $sync whether to run the script synchronously (default is TRUE)
*
* @return mixed
*/
public
function
triggerSynScript
(
$xpath
,
$script
,
$sync
=
true
)
{
return
$this
->
withSyn
()
->
executeJsOnXpath
(
$xpath
,
$script
,
$sync
);
}
}
return
new
MaharaExtension
();
htdocs/testing/frameworks/behat/features/extensions/core.xml
View file @
50cdb600
...
...
@@ -7,6 +7,7 @@
<parameter
key=
"behat.mahara.parameters"
></parameter>
<parameter
key=
"mahara.gherkin.class"
>
MaharaGherkin
</parameter>
<parameter
key=
"mahara.context.initializer.class"
>
MaharaAwareInitializer
</parameter>
<parameter
key=
"behat.mink.driver.selenium2.class"
>
MaharaSelenium2Driver
</parameter>
</parameters>
<services>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment