mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Merge branch '4'
This commit is contained in:
commit
be83e2afa8
@ -1,6 +1,6 @@
|
|||||||
language: php
|
language: php
|
||||||
|
|
||||||
dist: precise
|
dist: xenial
|
||||||
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
@ -21,8 +21,8 @@ env:
|
|||||||
before_script:
|
before_script:
|
||||||
- export PATH=~/.composer/vendor/bin:$PATH
|
- export PATH=~/.composer/vendor/bin:$PATH
|
||||||
- composer validate
|
- composer validate
|
||||||
- composer require --prefer-dist --no-update silverstripe/recipe-core:5.x-dev
|
- composer require --no-update silverstripe/recipe-core:5.x-dev
|
||||||
- composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
|
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
|
||||||
- if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi
|
- if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi
|
||||||
- phpenv rehash
|
- phpenv rehash
|
||||||
|
|
||||||
|
@ -442,6 +442,24 @@ JS;
|
|||||||
$button->click();
|
$button->click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Given /^I press the "([^"]*)" buttons$/
|
||||||
|
* @param string $text A list of button names can be provided by seperating the entries with the | character.
|
||||||
|
*/
|
||||||
|
public function stepIPressTheButtons($text)
|
||||||
|
{
|
||||||
|
$buttonNames = explode('|', $text);
|
||||||
|
foreach ($buttonNames as $name) {
|
||||||
|
$button = $this->findNamedButton(trim($name));
|
||||||
|
if ($button) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assertNotNull($button, "{$text} button not found");
|
||||||
|
$button->click();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Needs to be in single command to avoid "unexpected alert open" errors in Selenium.
|
* 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
|
* Example1: I press the "Remove current combo" button, confirming the dialog
|
||||||
|
@ -240,6 +240,11 @@ abstract class SilverStripeContext extends MinkContext implements SilverStripeAw
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$webDriverSession = $this->getSession();
|
||||||
|
if (!$webDriverSession->isStarted()) {
|
||||||
|
$webDriverSession->start();
|
||||||
|
}
|
||||||
|
|
||||||
$state = $this->getTestSessionState();
|
$state = $this->getTestSessionState();
|
||||||
$this->testSessionEnvironment->startTestSession($state);
|
$this->testSessionEnvironment->startTestSession($state);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user