This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iPad: | |
context: | |
class: 'FeatureContext' | |
extensions: | |
Behat\MinkExtension\Extension: | |
base_url: 'https://saucelabs.com' | |
javascript_session: 'selenium2' | |
goutte: | |
selenium2: | |
browser: ipad |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: | |
paths: { features: features, bootstrap: /Users/testuser/Drupal/behatpfizer/site/sites/all/modules/custom/behat_editor/behat/features/bootstrap/FeatureContext.php } | |
extensions: { Behat\MinkExtension\Extension: { default_session: selenium2, goutte: null, selenium2: null, base_url: 'http://behateditor.localvm.com', browser_name: safari, javascript_session: selenium2 }, Drupal\DrupalExtension\Extension: { blackbox: null, api_driver: drush, drush: { alias: digitalocean.behateditorp_production }, subcontexts: { paths: [/Users/alfrednutile/Drupal/behatpfizer/site/sites/all/modules/] } } } | |
saucelabs: | |
context: { class: FeatureContext } | |
extensions: { Behat\MinkExtension\Extension: { default_session: selenium2, selenium2: { browser: chrome, wd_host: 'testuser:[email protected]/wd/hub', capabilities: { platform: 'Windows 2012', browser: chrome, version: '31', name: 'Behat Tests Module:behat_batch Filename: behat_batch|48', command-timeout: '900', max-duration: '900' } } } } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: | |
paths: { features: features, bootstrap: /Users/test/Drupal/behattest/site/sites/all/modules/custom/behat_editor/behat/features/bootstrap/FeatureContext.php } | |
extensions: { Behat\MinkExtension\Extension: { default_session: selenium2, goutte: null, selenium2: null, base_url: 'http://www.tikosyn.com', browser_name: safari, javascript_session: selenium2 }, Drupal\DrupalExtension\Extension: { blackbox: null, api_driver: drush, drush: { alias: digitalocean.behateditorp_production }, subcontexts: { paths: [/Users/test/Drupal/behatpfizer/site/sites/all/modules/] } } } | |
saucelabs: | |
context: { class: FeatureContext } | |
extensions: { Behat\MinkExtension\Extension: { default_session: selenium2, selenium2: { browser: 'internet explorer', wd_host: 'alfrednutile2:[email protected]/wd/hub', capabilities: { platform: 'Windows 2012 R2', browser: 'internet explorer', version: '11', name: 'Behat Tests Module:behat_tests Filename: test.feature', screen-resolution: 144 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* See if the element (name|label|id) is greater than the % of the window | |
* | |
* @Then /^the element "([^"]*)" should be "([^"]*)" percent or greater than the window$/ | |
*/ | |
public function theElementShouldBePercentOrGreaterThanTheWindow($arg1, $arg2) | |
{ | |
//1. make sure the target exists | |
//2. get the height of the target | |
//3. compare it to the window height |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Vagrant version 2 | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = 'precise32' | |
config.vm.box_url = 'http://files.vagrantup.com/precise32.box' | |
config.vm.hostname = 'rails-dev-box' | |
config.vm.network :forwarded_port, guest: 3000, host: 3000 | |
config.vm.provision :puppet, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default: | |
paths: | |
features: 'features' | |
extensions: | |
Behat\MinkExtension\Extension: | |
default_session: selenium2 | |
goutte: ~ | |
selenium2: ~ | |
base_url: http://saucelabs.com/test/guinea-pig | |
browser_name: safari |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sets an iFrame ID to no_name_iframe if there is no ID. You can then add a Switch to iFrame step after it using the na_name_iframe ID. | |
* | |
* @Given /^I the set the iframe located in element with an id of "([^"]*)"$/ | |
*/ | |
public function iSetTheIframeLocatedInElementWithAnIdOf($element_id) { | |
$check = 1; //@todo need to check using js if exists | |
if($check <= 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @hidden | |
* | |
* @Then /^I fill in the form field with id "([^"]*)" number "([^"]*)" with the value of "([^"]*)"$/ | |
*/ | |
public function fillInTheFormFieldWithIDNumberWithTheValueOf($arg1, $arg2, $arg3) | |
{ | |
$arg = $arg2 - 1; //most users do not start at 0 | |
$form_field = $this->getMainContext()->getSession()->getPage()->findAll('css', $arg1); | |
if($form_field) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Some forms do not have a Submit button just pass the ID | |
* | |
* @Given /^I submit the form with id "([^"]*)"$/ | |
*/ | |
public function iSubmitTheFormWithId($arg) | |
{ | |
$node = $this->getMainContext()->getSession()->getPage()->find('css', $arg); | |
if($node) { | |
$this->getMainContext()->getSession()->executeScript("jQuery('$arg').submit();"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @hidden | |
* | |
* @Then /^I click on the alert window$/ | |
*/ | |
public function iClickOnTheAlertWindow() { | |
$this->getMainContext()->getSession()->getDriver()->getWebDriverSession()->accept_alert(); | |
} |