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
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-12-21 16:15:55 +0300
committerFilipa Lacerda <filipa@gitlab.com>2018-12-21 16:15:55 +0300
commit82772caf727e3ea59513ffff6693bab1ee37b53f (patch)
treee139078fad49c8c09cf1e1da5e97ca31cf402aed
parent6749ef30b3484625de573ecf1709d34b4176421d (diff)
parent3019a567f0795e8611bddd2b108cbcb5c7aedafa (diff)
Merge branch 'markdown-toolbar-btn-fix' into 'master'
Fixes the markdown toolbar buttons Closes #55618 See merge request gitlab-org/gitlab-ce!23979
-rw-r--r--app/assets/javascripts/lib/utils/text_markdown.js4
-rw-r--r--changelogs/unreleased/markdown-toolbar-btn-fix.yml5
-rw-r--r--spec/features/issues/user_creates_issue_spec.rb6
3 files changed, 12 insertions, 3 deletions
diff --git a/app/assets/javascripts/lib/utils/text_markdown.js b/app/assets/javascripts/lib/utils/text_markdown.js
index c095a017866..1254ec798a6 100644
--- a/app/assets/javascripts/lib/utils/text_markdown.js
+++ b/app/assets/javascripts/lib/utils/text_markdown.js
@@ -82,7 +82,7 @@ export function insertMarkdownText({
tag,
cursorOffset,
blockTag,
- selected,
+ selected = '',
wrap,
select,
}) {
@@ -212,7 +212,7 @@ export function addMarkdownListeners(form) {
blockTag: $this.data('mdBlock'),
wrap: !$this.data('mdPrepend'),
select: $this.data('mdSelect'),
- tagContent: $this.data('mdTagContent').toString(),
+ tagContent: $this.data('mdTagContent'),
});
});
}
diff --git a/changelogs/unreleased/markdown-toolbar-btn-fix.yml b/changelogs/unreleased/markdown-toolbar-btn-fix.yml
new file mode 100644
index 00000000000..eefb4d19f86
--- /dev/null
+++ b/changelogs/unreleased/markdown-toolbar-btn-fix.yml
@@ -0,0 +1,5 @@
+---
+title: Fixed markdown toolbar buttons
+merge_request:
+author:
+type: fixed
diff --git a/spec/features/issues/user_creates_issue_spec.rb b/spec/features/issues/user_creates_issue_spec.rb
index 830d56035aa..e60486f6dcb 100644
--- a/spec/features/issues/user_creates_issue_spec.rb
+++ b/spec/features/issues/user_creates_issue_spec.rb
@@ -14,7 +14,7 @@ describe "User creates issue" do
visit(new_project_issue_path(project))
end
- it "creates issue" do
+ it "creates issue", :js do
page.within(".issue-form") do
expect(page).to have_no_content("Assign to")
.and have_no_content("Labels")
@@ -27,11 +27,15 @@ describe "User creates issue" do
issue_title = "500 error on profile"
fill_in("Title", with: issue_title)
+ first('.js-md').click
+ first('.qa-issuable-form-description').native.send_keys('Description')
+
click_button("Submit issue")
expect(page).to have_content(issue_title)
.and have_content(user.name)
.and have_content(project.name)
+ expect(page).to have_selector('strong', text: 'Description')
end
end