summaryrefslogtreecommitdiff
path: root/spec/frontend/issue_spec.js
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-27 21:08:05 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-27 21:08:05 +0000
commit47579e24f3f9f29d5b8093f54e6958fefd7f2057 (patch)
treee8dedf16ceaa2143ce4e81906527a4670cb9916a /spec/frontend/issue_spec.js
parent88ccc935c04ff0e015be60bac02853770b79d28d (diff)
downloadgitlab-ce-47579e24f3f9f29d5b8093f54e6958fefd7f2057.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/issue_spec.js')
-rw-r--r--spec/frontend/issue_spec.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/frontend/issue_spec.js b/spec/frontend/issue_spec.js
index 586bd7f8529..24020daf728 100644
--- a/spec/frontend/issue_spec.js
+++ b/spec/frontend/issue_spec.js
@@ -18,6 +18,7 @@ describe('Issue', () => {
preloadFixtures('issues/closed-issue.html');
preloadFixtures('issues/issue-with-task-list.html');
preloadFixtures('issues/open-issue.html');
+ preloadFixtures('static/issue_with_mermaid_graph.html');
function expectErrorMessage() {
const $flashMessage = $('div.flash-alert');
@@ -228,4 +229,30 @@ describe('Issue', () => {
});
});
});
+
+ describe('when not displaying blocked warning', () => {
+ describe('when clicking a mermaid graph inside an issue description', () => {
+ let mock;
+ let spy;
+
+ beforeEach(() => {
+ loadFixtures('static/issue_with_mermaid_graph.html');
+ mock = new MockAdapter(axios);
+ spy = jest.spyOn(axios, 'put');
+ });
+
+ afterEach(() => {
+ mock.restore();
+ jest.clearAllMocks();
+ });
+
+ it('does not make a PUT request', () => {
+ Issue.prototype.initIssueBtnEventListeners();
+
+ $('svg a.js-issuable-actions').trigger('click');
+
+ expect(spy).not.toHaveBeenCalled();
+ });
+ });
+ });
});