diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-02 15:10:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-02 15:10:35 +0300 |
commit | 4fa04f789e6fed5f0dfeafe718eeb7f56a5086e9 (patch) | |
tree | 5ef2d1d8232d3bd359ec79bf95c9a35ce650ae0b /spec/frontend/issue_show | |
parent | 4b9ace6c1fead1b44f173eaee0cfaa58f46a258a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/issue_show')
-rw-r--r-- | spec/frontend/issue_show/components/description_spec.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/spec/frontend/issue_show/components/description_spec.js b/spec/frontend/issue_show/components/description_spec.js index f3c078184a9..bc7511225a0 100644 --- a/spec/frontend/issue_show/components/description_spec.js +++ b/spec/frontend/issue_show/components/description_spec.js @@ -36,12 +36,27 @@ describe('Description component', () => { $('.issuable-meta .flash-container').remove(); }); - it('animates description changes', () => { + it('doesnt animate first description changes', () => { vm.descriptionHtml = 'changed'; + return vm.$nextTick().then(() => { + expect( + vm.$el.querySelector('.md').classList.contains('issue-realtime-pre-pulse'), + ).toBeFalsy(); + jest.runAllTimers(); + return vm.$nextTick(); + }); + }); + + it('animates description changes on live update', () => { + vm.descriptionHtml = 'changed'; return vm .$nextTick() .then(() => { + vm.descriptionHtml = 'changed second time'; + return vm.$nextTick(); + }) + .then(() => { expect( vm.$el.querySelector('.md').classList.contains('issue-realtime-pre-pulse'), ).toBeTruthy(); |