Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-06-20 12:56:18 +0300
committerPhil Hughes <me@iamphill.com>2017-06-20 12:58:07 +0300
commit5dc253f138a8a2e333bcc8901087cc660bef05cc (patch)
tree4c7bc80486e5d20af0371320095f7264d42c14ae /spec
parentbf57a7e80c44080dc7ec0fd774148afdae29cc31 (diff)
Stop showing task status if no tasks are present
Previously the task status would be visible even if there where no tasks in the description. This fixes that by changing the regex to check for tasks without 0. This also fixes a bug where update the description inline would not update the task status text on screen. Closes #33880
Diffstat (limited to 'spec')
-rw-r--r--spec/javascripts/issue_show/components/description_spec.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/javascripts/issue_show/components/description_spec.js b/spec/javascripts/issue_show/components/description_spec.js
index 886462c4b9a..f3fdbff01a6 100644
--- a/spec/javascripts/issue_show/components/description_spec.js
+++ b/spec/javascripts/issue_show/components/description_spec.js
@@ -95,6 +95,18 @@ describe('Description component', () => {
done();
});
});
+
+ it('clears task status text when no tasks are present', (done) => {
+ vm.taskStatus = '0 of 0';
+
+ setTimeout(() => {
+ expect(
+ document.querySelector('.issuable-meta #task_status').textContent.trim(),
+ ).toBe('');
+
+ done();
+ });
+ });
});
it('applies syntax highlighting and math when description changed', (done) => {