()
| 164 | } |
| 165 | |
| 166 | function waitForDragCover() { |
| 167 | return new Promise(function(resolve) { |
| 168 | var interval = 5; |
| 169 | var timeout = 5000; |
| 170 | |
| 171 | var id = setInterval(function() { |
| 172 | var dragCoverNode = document.querySelector('.dragcover'); |
| 173 | if(dragCoverNode) { |
| 174 | clearInterval(id); |
| 175 | resolve(dragCoverNode); |
| 176 | } |
| 177 | |
| 178 | timeout -= interval; |
| 179 | if(timeout < 0) { |
| 180 | clearInterval(id); |
| 181 | throw new Error('waitForDragCover: timeout'); |
| 182 | } |
| 183 | }, interval); |
| 184 | }); |
| 185 | } |
| 186 | |
| 187 | function waitForDragCoverRemoval() { |
| 188 | return new Promise(function(resolve) { |
no outgoing calls
no test coverage detected
searching dependent graphs…