diff options
author | Phil Hughes <me@iamphill.com> | 2016-09-27 10:23:15 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2016-09-27 10:23:15 -0500 |
commit | b13213e6be86c7aaf3005a79836d62049a3e5820 (patch) | |
tree | 96d7960bf9a5a6cce8d1541d93bfeeec5c1de29e /spec/javascripts | |
parent | 3820ca5876ecb550d4d7eba0db98296f467125d8 (diff) | |
download | gitlab-ce-label-update-check-new.tar.gz |
Send ajax request for label update only if they are changed (#19472 !5071)label-update-check-new
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/labels_issue_sidebar_spec.js.es6 | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/spec/javascripts/labels_issue_sidebar_spec.js.es6 b/spec/javascripts/labels_issue_sidebar_spec.js.es6 index 840c7b6d015..1ad6f612210 100644 --- a/spec/javascripts/labels_issue_sidebar_spec.js.es6 +++ b/spec/javascripts/labels_issue_sidebar_spec.js.es6 @@ -48,9 +48,9 @@ setTimeout(() => { expect($('.dropdown-content a').length).toBe(10); - $('.dropdow-content a').each((i, $link) => { - if (i < 5) { - $link.get(0).click(); + $('.dropdown-content a').each(function (i) { + if (i < saveLabelCount) { + $(this).get(0).click(); } }); @@ -70,9 +70,9 @@ setTimeout(() => { expect($('.dropdown-content a').length).toBe(10); - $('.dropdow-content a').each((i, $link) => { - if (i < 5) { - $link.get(0).click(); + $('.dropdown-content a').each(function (i) { + if (i < saveLabelCount) { + $(this).get(0).click(); } }); @@ -86,4 +86,3 @@ }); }); })(); - |