@@ 92-102 (lines=11) @@ | ||
89 | * |
|
90 | * @BeforeStep |
|
91 | */ |
|
92 | public function beforeJavascriptStep($event) |
|
93 | { |
|
94 | /** @var \Behat\Behat\Hook\Scope\BeforeStepScope $event */ |
|
95 | $tags = $event->getFeature()->getTags(); |
|
96 | if (!in_array('javascript', $tags)) { |
|
97 | return; |
|
98 | } |
|
99 | $text = $event->getStep()->getText(); |
|
100 | if (preg_match('/(follow|press|click|submit)/i', $text)) { |
|
101 | $this->iWaitForAjaxToFinish(); |
|
102 | } |
|
103 | } |
|
104 | ||
105 | /** |
|
@@ 110-120 (lines=11) @@ | ||
107 | * |
|
108 | * @AfterStep |
|
109 | */ |
|
110 | public function afterJavascriptStep($event) |
|
111 | { |
|
112 | /** @var \Behat\Behat\Hook\Scope\BeforeStepScope $event */ |
|
113 | $tags = $event->getFeature()->getTags(); |
|
114 | if (!in_array('javascript', $tags)) { |
|
115 | return; |
|
116 | } |
|
117 | $text = $event->getStep()->getText(); |
|
118 | if (preg_match('/(follow|press|click|submit)/i', $text)) { |
|
119 | $this->iWaitForAjaxToFinish(); |
|
120 | } |
|
121 | } |
|
122 | ||
123 | /** |