Updated test to match with switched commits
Added compare switch
This commit is contained in:
parent
6d93eafa6a
commit
9916e8d6dc
3 changed files with 14 additions and 2 deletions
|
@ -300,3 +300,12 @@
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-family: $monospace;
|
font-family: $monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.commits-compare-switch{
|
||||||
|
background: url('switch_icon.png');
|
||||||
|
width: 16px;
|
||||||
|
height: 18px;
|
||||||
|
text-indent: -9999px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
|
@ -13,12 +13,15 @@
|
||||||
= text_field_tag :from, params[:from], placeholder: "master", class: "xlarge"
|
= text_field_tag :from, params[:from], placeholder: "master", class: "xlarge"
|
||||||
= "..."
|
= "..."
|
||||||
= text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge"
|
= text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge"
|
||||||
|
= link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'}
|
||||||
- if @refs_are_same
|
- if @refs_are_same
|
||||||
.alert
|
.alert
|
||||||
%span Refs are the same
|
%span Refs are the same
|
||||||
.actions
|
.actions
|
||||||
= submit_tag "Compare", class: "btn primary wide commits-compare-btn"
|
= submit_tag "Compare", class: "btn primary wide commits-compare-btn"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
:javascript
|
:javascript
|
||||||
$(function() {
|
$(function() {
|
||||||
var availableTags = #{@project.ref_names.to_json};
|
var availableTags = #{@project.ref_names.to_json};
|
||||||
|
|
|
@ -32,8 +32,8 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
|
||||||
end
|
end
|
||||||
|
|
||||||
And 'I fill compare fields with refs' do
|
And 'I fill compare fields with refs' do
|
||||||
fill_in "from", with: "bcf03b5de6c33f3869ef70d68cf06e679d1d7f9a"
|
fill_in "from", with: "8716fc78f3c65bbf7bcf7b574febd583bc5d2812"
|
||||||
fill_in "to", with: "8716fc78f3c65bbf7bcf7b574febd583bc5d2812"
|
fill_in "to", with: "bcf03b5de6c33f3869ef70d68cf06e679d1d7f9a"
|
||||||
click_button "Compare"
|
click_button "Compare"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue