Merge branch 'fix-inconsistent-cancel-button' into 'master'
Change button text to more specific "Discard draft" Closes #47475 See merge request gitlab-org/gitlab-ce!20140
This commit is contained in:
commit
3755d828fb
|
@ -194,7 +194,7 @@ js-autosize markdown-area js-vue-issue-note-form js-vue-textarea"
|
||||||
class="btn btn-cancel note-edit-cancel js-close-discussion-note-form"
|
class="btn btn-cancel note-edit-cancel js-close-discussion-note-form"
|
||||||
type="button"
|
type="button"
|
||||||
@click="cancelHandler()">
|
@click="cancelHandler()">
|
||||||
Cancel
|
{{ __('Discard draft') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -40,5 +40,5 @@
|
||||||
|
|
||||||
= yield(:note_actions)
|
= yield(:note_actions)
|
||||||
|
|
||||||
%a.btn.btn-cancel.js-note-discard{ role: "button", data: {cancel_text: "Cancel" } }
|
%a.btn.btn-cancel.js-note-discard{ role: "button", data: {cancel_text: "Discard draft" } }
|
||||||
Discard draft
|
Discard draft
|
||||||
|
|
|
@ -62,7 +62,7 @@ describe "User adds a comment on a commit", :js do
|
||||||
click_diff_line(sample_commit.line_code)
|
click_diff_line(sample_commit.line_code)
|
||||||
|
|
||||||
expect(page).to have_css(".js-temp-notes-holder form.new-note")
|
expect(page).to have_css(".js-temp-notes-holder form.new-note")
|
||||||
.and have_css(".js-close-discussion-note-form", text: "Cancel")
|
.and have_css(".js-close-discussion-note-form", text: "Discard draft")
|
||||||
|
|
||||||
# The `Cancel` button closes the current form. The page should not have any open forms after that.
|
# The `Cancel` button closes the current form. The page should not have any open forms after that.
|
||||||
find(".js-close-discussion-note-form").click
|
find(".js-close-discussion-note-form").click
|
||||||
|
|
Loading…
Reference in New Issue