@@ -31,7 +31,7 @@ |
||
31 | 31 | { |
32 | 32 | //Wait after redirection |
33 | 33 | $simulatorElementSearch = WebDriverBy::name('email'); |
34 | - $condition = WebDriverExpectedCondition::presenceOfElementLocated($simulatorElementSearch); |
|
34 | + $condition = WebDriverExpectedCondition::presenceOfElementLocated($simulatorElementSearch); |
|
35 | 35 | $this->webDriver->wait()->until($condition); |
36 | 36 | |
37 | 37 | //Fill email |
@@ -36,7 +36,7 @@ |
||
36 | 36 | { |
37 | 37 | //Wait after redirection |
38 | 38 | $simulatorElementSearch = WebDriverBy::name('password'); |
39 | - $condition = WebDriverExpectedCondition::presenceOfElementLocated($simulatorElementSearch); |
|
39 | + $condition = WebDriverExpectedCondition::presenceOfElementLocated($simulatorElementSearch); |
|
40 | 40 | $this->webDriver->wait()->until($condition); |
41 | 41 | |
42 | 42 | //Fill email |
@@ -85,7 +85,7 @@ |
||
85 | 85 | */ |
86 | 86 | public function moveToParent() |
87 | 87 | { |
88 | - $handles=$this->webDriver->getWindowHandles(); |
|
88 | + $handles = $this->webDriver->getWindowHandles(); |
|
89 | 89 | $parent = end($handles); |
90 | 90 | $this->webDriver->switchTo()->window($parent); |
91 | 91 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | do { |
48 | 48 | self::waitToLoad(); |
49 | 49 | $formStep = self::getFormStep(); |
50 | - if(self::stepIsExcluded($formStep)){ |
|
50 | + if (self::stepIsExcluded($formStep)) { |
|
51 | 51 | $continue = true; |
52 | 52 | continue; |
53 | 53 | } |
@@ -56,14 +56,14 @@ discard block |
||
56 | 56 | $stepClass = new $formStepClass(self::$webDriver); |
57 | 57 | $continue = $stepClass->run($rejected); |
58 | 58 | --$maxSteps; |
59 | - } while ($continue && $maxSteps>0); |
|
59 | + } while ($continue && $maxSteps > 0); |
|
60 | 60 | } catch (\Exception $exception) { |
61 | 61 | echo $exception->getMessage(); |
62 | 62 | echo self::$webDriver->getCurrentURL(); |
63 | 63 | } |
64 | 64 | |
65 | 65 | if ($maxSteps <= 0) { |
66 | - throw new \Exception('Error while finishing form, step: ' . $formStep); |
|
66 | + throw new \Exception('Error while finishing form, step: '.$formStep); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | return $formStep; |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | public static function stepIsExcluded($currentStep) |
78 | 78 | { |
79 | - return (substr($currentStep,0,4) === '004.'); |
|
79 | + return (substr($currentStep, 0, 4) === '004.'); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -28,15 +28,15 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function run($rejected = false) |
30 | 30 | { |
31 | - try{ |
|
31 | + try { |
|
32 | 32 | //Wait after redirection |
33 | 33 | sleep(3); |
34 | 34 | $simulatorElementSearch = WebDriverBy::id('OrderConfirmation-container'); |
35 | - $condition = WebDriverExpectedCondition::presenceOfElementLocated($simulatorElementSearch); |
|
35 | + $condition = WebDriverExpectedCondition::presenceOfElementLocated($simulatorElementSearch); |
|
36 | 36 | $this->webDriver->wait()->until($condition); |
37 | 37 | } catch (\Exception $e) { |
38 | 38 | $errorElementSearch = WebDriverBy::className('technical-error-container'); |
39 | - $condition = WebDriverExpectedCondition::presenceOfElementLocated($errorElementSearch); |
|
39 | + $condition = WebDriverExpectedCondition::presenceOfElementLocated($errorElementSearch); |
|
40 | 40 | $this->webDriver->wait()->until($condition); |
41 | 41 | $this->assertTrue((bool) $condition, "ERROR ON ".self::STEP); |
42 | 42 | return false; |
@@ -45,14 +45,14 @@ discard block |
||
45 | 45 | //Click on popup |
46 | 46 | sleep(3); |
47 | 47 | $buttonElementSearch = WebDriverBy::name('dialogButton'); |
48 | - $condition = WebDriverExpectedCondition::presenceOfElementLocated($buttonElementSearch); |
|
48 | + $condition = WebDriverExpectedCondition::presenceOfElementLocated($buttonElementSearch); |
|
49 | 49 | $this->webDriver->wait()->until($condition); |
50 | 50 | $formContinue = $this->webDriver->findElement($buttonElementSearch)->click(); |
51 | 51 | sleep(3); |
52 | 52 | |
53 | 53 | //Click on confirm |
54 | 54 | $buttonElementSearch = WebDriverBy::className('button-contained-primary'); |
55 | - $condition = WebDriverExpectedCondition::presenceOfElementLocated($buttonElementSearch); |
|
55 | + $condition = WebDriverExpectedCondition::presenceOfElementLocated($buttonElementSearch); |
|
56 | 56 | $this->webDriver->wait()->until($condition); |
57 | 57 | $formContinue = $this->webDriver->findElement($buttonElementSearch)->click(); |
58 | 58 | sleep(3); |