@@ -67,13 +67,6 @@ class Webhooks extends Block
67
67
*/
68
68
private $ webhookDeleteButton = '[class*="webhook-delete"] ' ;
69
69
70
- /**
71
- * Css selector of popup block for delete webhook confirmation.
72
- *
73
- * @var string
74
- */
75
- private $ webhookDeleteConfirmOverlay = '[class="appriseOuter"] ' ;
76
-
77
70
/**
78
71
* Css selector of confirming button for deleting webhook.
79
72
*
@@ -96,7 +89,7 @@ public function create($team)
96
89
continue ;
97
90
}
98
91
99
- $ this ->addWebhook ($ handlerUrl , $ webhookEventCode , $ webhookEventName , $ team );
92
+ $ this ->addWebhook ($ handlerUrl , $ webhookEventCode , $ team );
100
93
}
101
94
}
102
95
@@ -135,44 +128,32 @@ private function getWebhook($team, $webhookEventName)
135
128
/**
136
129
* Delete webhook element with confirmation popup.
137
130
*
138
- * Signifyd creates the same popup every time Selenium click on delete button,
139
- * so we need to wait that previous popup will be closed.
140
- *
141
131
* @param ElementInterface $webhook
142
132
* @return void
143
133
*/
144
134
private function deleteWebhook (ElementInterface $ webhook )
145
135
{
146
136
$ webhook ->find ($ this ->webhookDeleteButton )->click ();
147
137
$ this ->_rootElement ->find ($ this ->webhookDeleteConfirmButton )->click ();
148
-
149
- $ this ->_rootElement ->waitUntil (
150
- function () {
151
- return $ this ->_rootElement ->find ($ this ->webhookDeleteConfirmOverlay )
152
- ->isPresent () ? null : true ;
153
- }
154
- );
155
138
}
156
139
157
140
/**
158
141
* Sets webhook data and add it.
159
142
*
160
143
* @param string $handlerUrl
161
144
* @param string $webhookEventCode
162
- * @param string $webhookEventName
163
145
* @param string $team
164
146
* @return void
165
147
*/
166
148
private function addWebhook (
167
149
$ handlerUrl ,
168
150
$ webhookEventCode ,
169
- $ webhookEventName ,
170
151
$ team
171
152
) {
172
153
$ this ->setEvent ($ webhookEventCode );
173
154
$ this ->setTeam ($ team );
174
155
$ this ->setUrl ($ handlerUrl );
175
- $ this ->submit ($ webhookEventName , $ handlerUrl );
156
+ $ this ->submit ();
176
157
}
177
158
178
159
/**
@@ -216,25 +197,11 @@ private function setUrl($handlerUrl)
216
197
/**
217
198
* Add webhook element.
218
199
*
219
- * Selenium needs to wait until webhook will be added to grid
220
- * before proceed to next step.
221
- *
222
- * @param string $webhookEventName
223
- * @param string $handlerUrl
224
200
* @return void
225
201
*/
226
- private function submit ($ webhookEventName , $ handlerUrl )
202
+ private function submit ()
227
203
{
228
204
$ this ->_rootElement ->find ($ this ->webhookAddButton )->click ();
229
-
230
- $ this ->_rootElement ->waitUntil (
231
- function () use ($ webhookEventName , $ handlerUrl ) {
232
- return $ this ->_rootElement ->find (
233
- sprintf ($ this ->webhookAddedElement , $ handlerUrl , $ webhookEventName ),
234
- Locator::SELECTOR_XPATH
235
- )->isPresent () ? true : null ;
236
- }
237
- );
238
205
}
239
206
240
207
/**
0 commit comments