summaryrefslogtreecommitdiff
path: root/app/views/projects/commit/_commit_box.html.haml
diff options
context:
space:
mode:
authorZeff Morgan <zeff.morgan@gmail.com>2018-12-04 01:03:58 -0500
committerZeff Morgan <zeff.morgan@gmail.com>2018-12-11 14:06:22 -0500
commit12c358f1b781fc6401eceee80237232bd0bb005a (patch)
tree57a40a9aaa873f06e71a2822fd8a1802287d3e29 /app/views/projects/commit/_commit_box.html.haml
parentbdcd37610a8a5eec13b0bb3b2d86f9032a7c4083 (diff)
downloadgitlab-ce-12c358f1b781fc6401eceee80237232bd0bb005a.tar.gz
Add tests for plain diff/email patch options
Add spec file using before(:context) to reduce test time. With testing almost identical things, unnecessary to make them completely atomic. Includes two helper methods. Since the raw_content method is the only function needed on that page, created the method in the spec instead of adding another page object. Setup new project/commit page object and update project/show to add go_to_commit method. The go_to_commit method is near duplicate of go_to_file method, but decided to split them off to reduce overall refactoring and simplify language. Also add selectors to commit box partial and update qa.rb to load new page object.
Diffstat (limited to 'app/views/projects/commit/_commit_box.html.haml')
-rw-r--r--app/views/projects/commit/_commit_box.html.haml6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml
index aab5712d197..2a919a767c0 100644
--- a/app/views/projects/commit/_commit_box.html.haml
+++ b/app/views/projects/commit/_commit_box.html.haml
@@ -28,7 +28,7 @@
= link_to project_tree_path(@project, @commit), class: "btn btn-default append-right-10 d-none d-sm-none d-md-inline" do
#{ _('Browse files') }
.dropdown.inline
- %a.btn.btn-default.dropdown-toggle{ data: { toggle: "dropdown" } }
+ %a.btn.btn-default.dropdown-toggle.qa-options-button{ data: { toggle: "dropdown" } }
%span= _('Options')
= icon('caret-down')
%ul.dropdown-menu.dropdown-menu-right
@@ -48,8 +48,8 @@
%li.dropdown-header
#{ _('Download') }
- unless @commit.parents.length > 1
- %li= link_to s_("DownloadCommit|Email Patches"), project_commit_path(@project, @commit, format: :patch)
- %li= link_to s_("DownloadCommit|Plain Diff"), project_commit_path(@project, @commit, format: :diff)
+ %li= link_to s_("DownloadCommit|Email Patches"), project_commit_path(@project, @commit, format: :patch), class: "qa-email-patches"
+ %li= link_to s_("DownloadCommit|Plain Diff"), project_commit_path(@project, @commit, format: :diff), class: "qa-plain-diff"
.commit-box{ data: { project_path: project_path(@project) } }
%h3.commit-title