]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7481 fix HistoryUiTest
authorStas Vilchik <vilchiks@gmail.com>
Fri, 1 Apr 2016 15:18:04 +0000 (17:18 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Fri, 1 Apr 2016 15:18:04 +0000 (17:18 +0200)
it/it-tests/src/test/resources/measureHistory/HistoryUiTest/history-timemachine-widget/time-machine-widget.html
server/sonar-web/src/main/js/widgets/timeMachine/index.js

index 7be60626bb53d4674f2286423a7ac76d3c2114b8..300ab906b968cadd5e503844835107e1361aa5f0 100644 (file)
@@ -36,8 +36,8 @@
        <td>*Issues*26*43*</td>
 </tr>
 <tr>
-       <td>assertElementPresent</td>
-       <td>css=img[alt=&quot;Chart?cht=sl&amp;chdi=80x15&amp;chv=20141019000000,6&quot;]</td>
+       <td>waitForElementPresent</td>
+       <td>css=svg path</td>
        <td></td>
 </tr>
 </tbody></table>
index 344857cb08544d59ebe62b5eb7e4e678ad955448..bd4e6b7191b19cf67a73738a2780394098613ae1 100644 (file)
@@ -31,7 +31,8 @@ const DEFAULTS = {
 };
 
 export default function (selector) {
-  const elements = Array.from(document.querySelectorAll(selector));
+  // use [].slice instead of Array.from, because this code might be executed with polyfill
+  const elements = [].slice.call(document.querySelectorAll(selector));
 
   elements.forEach(element => {
     const { dataset } = element;