mirror of
https://github.com/silverstripe/silverstripe-behat-extension
synced 2024-10-22 17:05:32 +02:00
Merge pull request #216 from creative-commoners/pulls/4.9/int
FIX Use usleep for fractions of a second
This commit is contained in:
commit
7bb03997cf
@ -104,8 +104,8 @@ class LoginContext implements Context
|
|||||||
if ($btn->getText() !== 'Setup later') {
|
if ($btn->getText() !== 'Setup later') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// There's been issues clicking the button, so try waiting for a little bit
|
// There's been issues clicking the button, so try waiting for 0.3 seconds
|
||||||
sleep(0.3);
|
usleep(0.3 * 1000000);
|
||||||
$btn->click();
|
$btn->click();
|
||||||
$clicked = true;
|
$clicked = true;
|
||||||
break;
|
break;
|
||||||
|
@ -510,7 +510,7 @@ abstract class SilverStripeContext extends MinkContext implements SilverStripeAw
|
|||||||
}
|
}
|
||||||
|
|
||||||
$state = $this->testSessionEnvironment->getState();
|
$state = $this->testSessionEnvironment->getState();
|
||||||
$oldDatetime = \DateTime::createFromFormat('Y-m-d H:i:s', isset($state->datetime) ? $state->datetime : null);
|
$oldDatetime = \DateTime::createFromFormat('Y-m-d H:i:s', $state->datetime ?? '');
|
||||||
if ($oldDatetime) {
|
if ($oldDatetime) {
|
||||||
$newDatetime->setTime($oldDatetime->format('H'), $oldDatetime->format('i'), $oldDatetime->format('s'));
|
$newDatetime->setTime($oldDatetime->format('H'), $oldDatetime->format('i'), $oldDatetime->format('s'));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user