Commit fca1ffb8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Bootstrap: Issues, Merge Requests, SSH Key completed

parent 20721eff
/* Buttons */
.grey-button{
border-radius: 5px;
font-size: 12px;
font-weight: bold;
padding: 5px 17px;
border: 1px solid #999;
color: #666;
display: inline-block;
box-shadow: 0 1px 2px rgba(0,0,0,.3);
background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.192, #fff), to(#f4f4f4));
background-image: -webkit-linear-gradient(#fff 19.2%, #f4f4f4);
background-image: -moz-linear-gradient(#fff 19.2%, #f4f4f4);
background-image: -o-linear-gradient(#fff 19.2%, #f4f4f4);
}
.red-button{
border-radius: 5px;
font-size: 12px;
font-weight: bold;
padding: 5px 17px;
border: 1px solid #999;
color: #666;
display: inline-block;
box-shadow: 0 1px 2px rgba(0,0,0,.3);
background: #D12F19;
color: white;
}
.positive-button{
border-radius: 5px;
font-size: 12px;
font-weight: bold;
padding: 5px 17px;
border: 1px solid #999;
color: #666;
display: inline-block;
box-shadow: 0 1px 2px rgba(0,0,0,.3);
background: #4A2;
color: white;
}
.lbutton,
.lite_button {
display:block;
float:left;
margin: 0px 5px 0px 0px;
padding:5px 10px;
font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;
border:1px solid #D3D3D3;
background:white;
font-size:12px !important;
line-height:130%;
text-decoration:none;
font-weight:bold;
color:#565656;
cursor:pointer;
&:hover {
border:1px solid #C2E1EF;
color: #0099FF;
}
&.hm {
margin: 0px 0px;
}
&.vm {
margin: 5px 0px;
}
}
a.button, input.button {
font-weight: bold;
padding: 10px 20px;
text-align: center;
display: inline-block;
border-radius: 5px;
color: #578E91;
font-size: 12px;
text-transform: uppercase;
border: 1px solid #8CE2E6;
background-image: -webkit-gradient(linear, 0 0, 0 34, color-stop(0.794, #dbf5f6), to(#c5eef0));
background-image: -webkit-linear-gradient(#dbf5f6 79.4%, #c5eef0);
background-image: -moz-linear-gradient(#dbf5f6 79.4%, #c5eef0);
background-image: -o-linear-gradient(#dbf5f6 79.4%, #c5eef0);
}
input.button{margin-bottom: 1.5em}
.button:hover {color: rgba(0,0,0,.8)}
.button.green {margin-right: 0; }
.button.yellow{
color: #908054;
border-color: #DDCDA1;
background-image: -webkit-gradient(linear, 0 0, 0 34, color-stop(0.794, #FFEFC3), to(#F3E3B7));
background-image: -webkit-linear-gradient(#FFEFC3 79.4%, #F3E3B7);
background-image: -moz-linear-gradient(#FFEFC3 79.4%, #F3E3B7);
background-image: -o-linear-gradient(#FFEFC3 79.4%, #F3E3B7);
}
.button.blue{
color: #417E97;
border-color: #b2cdec;
background-image: -webkit-gradient(linear, 0 0, 0 34, color-stop(0.794, #dbe8f6), to(#c7daf1));
background-image: -webkit-linear-gradient(#dbe8f6 79.4%, #c7daf1);
background-image: -moz-linear-gradient(#dbe8f6 79.4%, #c7daf1);
background-image: -o-linear-gradient(#dbe8f6 79.4%, #c7daf1);
}
.button-small{ text-shadow: none; padding: 4px 10px; }
.button-green{background: #A6B807; color: white}
......@@ -117,6 +117,7 @@ $blue_link: "#2fa0bb";
margin:10px 0 0 0;
font-size:13px;
font-weight:bold;
color:#444;
}
}
......@@ -141,6 +142,12 @@ img.avatar {
border-radius: 4px;
}
img.lil_av {
padding-left: 5px;
position: relative;
top: 3px;
}
.media-grid {
h3, h2 , h4 {
&.media_h {
......@@ -176,14 +183,6 @@ img.avatar {
@import "notes.css.scss";
@import "login.scss";
//@import "style.scss";
//@import "commits.css.scss";
//@import "dashboard.scss";
//@import "tags.scss";
//@import "buttons.scss";
/** CODE HIGHTLIGHT **/
@import "highlight.css.scss";
@import "highlight.black.css.scss";
......
.application .news-feed{margin-left: 285px; min-height: 600px; margin-top: 20px; margin-right:2px; padding:20px;}
.application .application-content{ position: relative; float: left; width: 100%; height: 100%; }
.application .news-feed h2{float: left;}
body.application aside{
min-height: 820px; position: relative; top: 0; bottom: 0; right: 0; width: 260px; float: left; border-right: 1px solid $border_color; padding:20px; padding-right:0;
h4{margin: 0; border-bottom: 1px solid #ccc; padding: 20px 20px 20px 0px; font-size: 11px; font-weight: bold; text-transform: uppercase;}
.project-list {list-style: none; margin: 0; padding: 0;}
.project-list li a {background: white; color: #{$blue_link}; display: block; border-bottom: 1px solid $lite_border_color; padding: 14px 6% 14px 0px;}
.project-list li a span.project-name{font-size: 14px; display: block; margin-bottom: 8px}
.project-list li a span.time{color: #666; font-weight: normal; font-size: 11px}
.project-list li a span.arrow{float: right; background: #E3E5EA; padding: 10px; border-radius: 5px; margin-top: 2px; text-shadow: none; color: #999}
}
body.application .news-feed .project-updates {
margin-bottom: 20px; display: block; width: 100%;
.data{ padding: 0}
a.project-update {padding: 10px; overflow: hidden; display: block;}
a.project-update:last-child{border-bottom: 0}
a.project-update img{float: left; margin-right: 10px;}
a.project-update span.update-title, .application .news-feed .project-updates li a span.update-author{display: block;}
a.project-update span.update-title{margin-bottom: 10px}
a.project-update span.update-author{color: #999; font-weight: normal; font-style: italic;}
a.project-update span.update-author strong{font-weight: bold; font-style: normal;}
}
/* eo Dashboard Page */
This diff is collapsed.
.tag {
@include round-borders-all(4px);
padding:2px 4px;
border:none;
text-shadow:none;
&.inline {
display:inline;
}
&.high, &.closed {
background: #D12F19;
color:white;
}
&.today, &.open {
background: #44aa22;
color:white;
}
&.yours {
background: #4466cc;
color:white;
}
&.normal {
background: #2c5ca6;
color:white;
}
&.notes {
background: #2c5c66;
color:white;
}
&.note {
background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #fefefe), to(#F6F7F8));
background-image: -webkit-linear-gradient(#fefefe 7.6%, #F6F7F8);
background-image: -moz-linear-gradient(#fefefe 7.6%, #F6F7F8);
background-image: -o-linear-gradient(#fefefe 7.6%, #F6F7F8);
color: #777;
border: 1px solid #DEDFE1;
}
&.issue {
background: #D12F19;
color:white;
}
&.commit {
background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #fefefe), to(#F6F7F8));
background-image: -webkit-linear-gradient(#fefefe 7.6%, #F6F7F8);
background-image: -moz-linear-gradient(#fefefe 7.6%, #F6F7F8);
background-image: -o-linear-gradient(#fefefe 7.6%, #F6F7F8);
color: #777;
border: 1px solid #DEDFE1;
}
}
......@@ -50,7 +50,7 @@ body header {
border: 1px solid #AAA;
padding: 0 10px 0 30px;
background: transparent url('images.png') no-repeat 8px -42px;
width: 160px;
width: 260px;
height:26px;
}
}
......
......@@ -52,6 +52,12 @@ class Admin::ProjectsController < ApplicationController
def update
@admin_project = Project.find_by_code(params[:id])
owner_id = params[:project][:owner_id]
if owner_id
@admin_project.owner = User.find(owner_id)
end
if @admin_project.update_attributes(params[:project])
redirect_to [:admin, @admin_project], notice: 'Project was successfully updated.'
else
......
class KeysController < ApplicationController
layout "profile"
respond_to :js
respond_to :js, :html
def index
@keys = current_user.keys.all
......
......@@ -6,28 +6,24 @@
- @admin_project.errors.full_messages.each do |msg|
%li= msg
.form-row
.clearfix
= f.label :name
%br
= f.text_field :name
.form-row
.input= f.text_field :name
.clearfix
= f.label :code
%br
= f.text_field :code
.form-row
.input= f.text_field :code
.clearfix
= f.label :path
%br
= f.text_field :path
.input= f.text_field :path
.form-row
= f.label :tag_list
%br
= f.text_area :tag_list, :placeholder => "project tags", :style => "height:50px", :id => :tag_field
- unless @admin_project.new_record?
.clearfix
= f.label :owner_id
.input= f.select :owner_id, User.all.map { |user| [user.name, user.id] }
.form-row
.clearfix
= f.label :description
%br
= f.text_area :description
.input= f.text_area :description
.clear
%br
.actions
......@@ -36,4 +32,5 @@
:javascript
$(function(){
taggifyForm();
$('#project_owner_id').chosen();
})
......@@ -2,48 +2,41 @@
= form_for [:admin, @admin_user] do |f|
-if @admin_user.errors.any?
#error_explanation
%h2= "#{pluralize(@admin_user.errors.count, "error")} prohibited this admin_user from being saved:"
%ul
- @admin_user.errors.full_messages.each do |msg|
%li= msg
.form-row
.clearfix
= f.label :name
%br
= f.text_field :name
.form-row
.input= f.text_field :name
.clearfix
= f.label :email
%br
= f.text_field :email
.form-row
.input= f.text_field :email
.clearfix
= f.label :password
%br
= f.password_field :password
.form-row
.input= f.password_field :password
.clearfix
= f.label :password_confirmation
%br
= f.password_field :password_confirmation
.form-row
.input= f.password_field :password_confirmation
.clearfix
= f.check_box :admin
= f.label :admin
.form-row
= f.text_field :projects_limit, :class => "small_input"
.clearfix
= f.label :projects_limit
.input= f.text_field :projects_limit, :class => "small_input"
.form-row
.clearfix
= f.label :skype
%br
= f.text_field :skype
.form-row
.input= f.text_field :skype
.clearfix
= f.label :linkedin
%br
= f.text_field :linkedin
.form-row
.input= f.text_field :linkedin
.clearfix
= f.label :twitter
%br
= f.text_field :twitter
.input= f.text_field :twitter
.clear
%br
.actions
= f.submit 'Save', :class => "btn"
= f.submit 'Save', :class => "btn primary"
= link_to 'Cancel', admin_users_path, :class => "btn"
%h1 New user
%h2 New user
%hr
= render 'form'
%br
= link_to 'Back', admin_users_path, :class => ""
......@@ -29,5 +29,9 @@
:javascript
$(function(){
CommitsList.init("#{@ref}", 20);
$('.project-refs-select').chosen();
});
:javascript
$(function(){
$('.project-refs-select').chosen();
});
......@@ -5,6 +5,6 @@
%strong
= merge_request.project.name
&ndash;
Issue #
Merge Request #
= merge_request.id
= truncate merge_request.title, :length => 50
%li.wll{ :id => dom_id(issue), :class => "issue #{issue.critical ? "critical" : ""}", :url => project_issue_path(issue.project, issue) }
= image_tag gravatar_icon(issue.author_email), :class => "avatar"
= image_tag gravatar_icon(issue.assignee_email), :class => "avatar"
%span.update-author
assigned to
%strong
= link_to project_team_member_path(@project, @project.team_member_by_id(issue.author_id)), :class => "author_link" do
= issue.author_name
authored
= time_ago_in_words(issue.created_at)
ago
= issue.assignee_name
- if issue.critical
%span.label.important critical
- if issue.today?
......
- if current_user.private_token
= content_for :rss_icon do
.rss-icon
= link_to project_issues_path(@project, :atom, { :private_token => current_user.private_token }) do
= image_tag "Rss-UI.PNG", :width => 22, :title => "feed"
.issues_content
%h3
Issues
%span.rss-icon
= link_to project_issues_path(@project, :atom, { :private_token => current_user.private_token }) do
= image_tag "Rss-UI.PNG", :width => 22, :title => "feed"
- if can? current_user, :write_issue, @project
= link_to new_project_issue_path(@project), :class => "right btn small", :title => "New Issue", :remote => true do
New Issue
......
:plain
$('#issues-table tbody').html("#{escape_javascript(render('issues'))}");
$('#issues-table').html("#{escape_javascript(render('issues'))}");
setSortable();
%h3
Issue ##{@issue.id}
%small
created at
= @issue.created_at.stamp("Aug 21, 2011")
%span.right
- if can?(current_user, :admin_project, @project) || @issue.author == current_user
......@@ -20,21 +23,18 @@
%div.well
%div
%span.entity-info
= image_tag gravatar_icon(@issue.author_email), :class => "left", :width => 40, :style => "padding-right:5px;"
%span.commit-title
%strong
%span.commit-author
%strong
= link_to project_team_member_path(@project, @project.team_member_by_id(@issue.author.id)) do
%span.author= @issue.author_name
&rarr;
= link_to project_team_member_path(@project, @project.team_member_by_id(@issue.assignee.id)) do
%span.author= @issue.assignee_name
%br
.cgray= @issue.created_at.stamp("Aug 21, 2011 9:23pm")
%cite.cgray Created by
= image_tag gravatar_icon(@issue.author_email), :width => 16, :class => "lil_av"
= link_to project_team_member_path(@project, @project.team_member_by_id(@issue.author.id)) do
%strong.author= @issue.author_name
%cite.cgray and currently assigned to
= image_tag gravatar_icon(@issue.assignee_email), :width => 16, :class => "lil_av"
= link_to project_team_member_path(@project, @project.team_member_by_id(@issue.assignee.id)) do
%strong.author= @issue.assignee_name
%hr
%div= simple_format @issue.title
......
%div
= form_for @key, :remote => true do |f|
= form_for @key do |f|
-if @key.errors.any?
%ul
- @key.errors.full_messages.each do |msg|
%li= msg
.alert-message.block-message.error
%ul
- @key.errors.full_messages.each do |msg|
%li= msg
.form-row
.clearfix
= f.label :title
= f.text_field :title, :style => "width:300px"
.form-row
.input= f.text_field :title
.clearfix
= f.label :key
= f.text_area :key, :style => "width:300px; height:130px"
.form-row
= f.submit 'Save', :class => "grey-button"
.input= f.text_area :key, :class => "xlarge"
.actions
= f.submit 'Save', :class => "primary btn"
= link_to "Cancel", keys_path, :class => "btn"
%a.update-item{:href => key_path(key)}
%span.update-title
= key.title
%span.update-author
Added
= time_ago_in_words(key.created_at)
ago
%li.entry
= link_to key_path(key) do
%strong= key.title
%span.right.cgray
Added
= time_ago_in_words(key.created_at)
ago
%h2.icon
%span>
%h3
SSH Keys
%div#new-key-holder.right
= link_to "Add new", new_key_path, :remote => true, :class => "grey-button"
%br
= link_to "Add new", new_key_path, :class => "btn small right"
%hr
%div#keys-table{ :class => "update-data ui-box ui-box-small ui-box-big" }
.data
%ul.unstyled
- @keys.each do |key|
= render(:partial => 'show', :locals => {:key => key})
:javascript
$('.delete-key').live('ajax:success', function() {
$(this).closest('.update-item').fadeOut(); });
%h1 New key
%h3 New key
%hr
= render 'form'
= link_to 'Back', keys_path
.ui-box.width-100p
%h3= @key.title
.data
%pre= @key.key
.clear
.buttons
= link_to 'Remove', @key, :confirm => 'Are you sure?', :method => :delete, :class => "red-button delete-key right"
.clear
%h3= @key.title
%hr
%pre= @key.key
.actions
= link_to 'Remove', @key, :confirm => 'Are you sure?', :method => :delete, :class => "btn danger delete-key"
......@@ -11,10 +11,6 @@
= truncate @project.name, :length => 28
.git_url_wrapper
%input.git-url.text{:id => "", :name => "", :readonly => "", :type => "text", :value => @project.url_to_repo, :class => "one_click_select"}
-#- if @project.repo_exists?
.left{:style => "margin-left:5px;"}
= render :partial => "projects/refs", :locals => { :destination => controller.controller_name == "commits" ? "commits" : "tree" }
= yield :rss_icon
.account-box
......
......@@ -6,14 +6,14 @@
- if @project.repo_exists?
= link_to "Repository", project_repository_path(@project), :class => repository_tab_class
= link_to "Tree", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class
= link_to "Code", tree_project_ref_path(@project, @project.root_ref), :class => tree_tab_class
= link_to "Commits", project_commits_path(@project), :class => (controller.controller_name == "commits") ? "current" : nil
= link_to "Network", graph_project_path(@project), :class => current_page?(:controller => "projects", :action => "graph", :id => @project) ? "current" : nil
= link_to project_issues_filter_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do
Issues
= link_to project_merge_requests_path(@project), :class => (controller.controller_name == "merge_requests") ? "current" : nil do
Merge Requests
= link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do
Wall
@Wall
- if @project.common_notes.today.count > 0
%span.label= @project.common_notes.today.count
= link_to project_merge_requests_path(@project), :class => (controller.controller_name == "merge_requests") ? "current" : nil do
Requests
......@@ -13,13 +13,15 @@
= render :partial => "layouts/head_panel"
.container-fluid
.sidebar
.fixed
%aside
= link_to "Profile", profile_path, :class => current_page?(:controller => "profile", :action => :show) ? "current" : nil
= link_to "Password & token", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil
= link_to "Design", profile_design_path, :class => current_page?(:controller => "profile", :action => :design) ? "current" : nil
= link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do
Keys
- unless current_user.keys.empty?
%span{ :class => "number" }= current_user.keys.count
.content= yield
%aside
= link_to "Profile", profile_path, :class => current_page?(:controller => "profile", :action => :show) ? "current" : nil
= link_to "Password & token", profile_password_path, :class => current_page?(:controller => "profile", :action => :password) ? "current" : nil
= link_to "Design", profile_design_path, :class => current_page?(:controller => "profile", :action => :design) ? "current" : nil
= link_to keys_path, :class => controller.controller_name == "keys" ? "current" : nil do
Keys
- unless current_user.keys.empty?
%span.label= current_user.keys.count
.content
.row
.span10= yield
.span4= render "layouts/projects_side"
......@@ -5,6 +5,10 @@
&rarr;
%span.label= @merge_request.target_branch
%small
created at
= @merge_request.created_at.stamp("Aug 21, 2011")
%span.right
- if can?(current_user, :admin_project, @project) || @merge_request.author == current_user
- if @merge_request.closed
......@@ -24,19 +28,17 @@
%div.well
%div
%span.entity-info
= image_tag gravatar_icon(@merge_request.author_email), :class => "left", :width => 40, :style => "padding-right:5px;"
%span.commit-title
%strong
%span.commit-author
%strong
= link_to project_team_member_path(@project, @project.team_member_by_id(@merge_request.author.id)) do
%span.author= @merge_request.author_name
&rarr;
= link_to project_team_member_path(@project, @project.team_member_by_id(@merge_request.assignee.id)) do
%span.author= @merge_request.assignee_name
%br
.cgray= @merge_request.created_at.stamp("Aug 21, 2011 9:23pm")
%cite.cgray Created by
= image_tag gravatar_icon(@merge_request.author_email), :width => 16, :class => "lil_av"
= link_to project_team_member_path(@project, @project.team_member_by_id(@merge_request.author.id)) do
%strong.author= @merge_request.author_name
%cite.cgray and currently assigned to
= image_tag gravatar_icon(@merge_request.assignee_email), :width => 16, :class => "lil_av"
= link_to project_team_member_path(@project, @project.team_member_by_id(@merge_request.assignee.id)) do
%strong.author= @merge_request.assignee_name
%hr
%div= simple_format @merge_request.title
......@@ -56,7 +58,7 @@
%img{:src => "/assets/ajax-loader-facebook.gif", :class => "dashboard-loader"}
.merge-request-notes
.issue_notes= render "notes/notes"
.merge_request_notes= render "notes/notes"
.loading{ :style => "display:none;"}
%center= image_tag "ajax-loader.gif"
.clear
......
.ui-box.width-100p
%h3 Design
= form_for @user, :url => profile_update_path, :method => :put do |f|
.data
.left.dark_scheme_box
%label{:for => "user_dark_scheme_false"}
= image_tag "white.png", :width => 310, :height => 212
%center
%h4
= f.radio_button :dark_scheme, false
White code preview
.right.dark_scheme_box
%label{:for => "user_dark_scheme_true"}
= image_tag "dark.png", :width => 310, :height => 212
%center
%h4
= f.radio_button :dark_scheme, true
Dark code preview
.clear
.buttons
= f.submit 'Save', :class => "btn"
%h3 Design
%hr
= form_for @user, :url => profile_update_path, :method => :put do |f|
.row
%label.span4{:for => "user_dark_scheme_false"}
= image_tag "white.png", :width => 210
%center
%h4
= f.radio_button :dark_scheme, false
White code preview
%label.span4{:for => "user_dark_scheme_true"}
= image_tag "dark.png", :width => 210
%center
%h4
= f.radio_button :dark_scheme, true
Dark code preview
.clearfix
.actions
= f.submit 'Save', :class => "btn"
.ui-box.width-100p.append-bottom-20
%h3 Password
= form_for @user, :url => profile_password_path, :method => :put do |f|
.data
%p After successfull password update you will be redirected to login page where you should login with new password
-if @user.errors.any?
#error_explanation
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
%h3 Password
%hr
= form_for @user, :url => profile_password_path, :method => :put do |f|
.data
%p After successfull password update you will be redirected to login page where you should login with new password
-if @user.errors.any?
#error_explanation
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
.form-row
= f.label :password
%br
= f.password_field :password
.form-row
= f.label :password_confirmation
%br
= f.password_field :password_confirmation
.buttons
= f.submit 'Save', :class => "btn"
.clear
.ui-box.width-100p
%h3
Private token
%em.cred.right
keep it in secret!
= form_for @user, :url => profile_reset_private_token_path, :method => :put do |f|
.data
%p Private token used to access application resources without authentication.
%p For example its required to access commits feed.
%hr
%p.cgray
- if current_user.private_token
= text_field_tag "token", current_user.private_token
- else
You don`t have one yet. Click generate to fix it.
.buttons
.clearfix
= f.label :password
.input= f.password_field :password
.clearfix
= f.label :password_confirmation
.input= f.password_field :password_confirmation
.actions
= f.submit 'Save', :class => "btn"
%h3
Private token
%span.cred.right
keep it in secret!
%hr
= form_for @user, :url => profile_reset_private_token_path, :method => :put do |f|
.data
%p Private token used to access application resources without authentication.
%p For example its required to access commits feed.
%hr
%p.cgray
- if current_user.private_token
= f.submit 'Reset', :confirm => "Are you sure?", :class => "grey-button"
= text_field_tag "token", current_user.private_token
- else
= f.submit 'Generate', :class => "btn"
You don`t have one yet. Click generate to fix it.
.actions
- if current_user.private_token
= f.submit 'Reset', :confirm => "Are you sure?", :class => "btn"
- else
= f.submit 'Generate', :class => "btn"
%h3= @user.name
.media-grid
= link_to "#" do
= image_tag gravatar_icon(@user.email, 90), :class => "thumbnail"
%h3.media_h= @user.name
%hr
= form_for @user, :url => profile_update_path, :method => :put do |f|
-if @user.errors.any?
......
......@@ -34,14 +34,7 @@ describe "User MergeRequests" do
it { should have_content(@merge_request1.title[0..10]) }
it { should have_content(@merge_request1.project.name) }
it { should have_content(@merge_request1.target_branch) }
it { should have_content(@merge_request1.source_branch) }
it { should have_content(@merge_request1.assignee.name) }
it { should have_content(@merge_request2.title[0..10]) }
it { should have_content(@merge_request2.project.name) }
it { should have_content(@merge_request2.target_branch) }
it { should have_content(@merge_request2.source_branch) }
it { should have_content(@merge_request2.assignee.name) }
end
end
......@@ -51,17 +51,17 @@ describe "Issues" do
# admin access to remove issue
@user.users_projects.destroy_all
project.add_access(@user, :read, :write, :admin)
visit project_issues_path(project)
visit edit_project_issue_path(project, @issue)
end
it "should remove entry" do
expect {
click_link "destroy_issue_#{@issue.id}"
click_link "Remove"
}.to change { Issue.count }.by(-1)
end
end
describe "statuses", :js => true do
describe "statuses" do
before do
@closed_issue = Factory :issue,
:author => @user,
......@@ -76,13 +76,13 @@ describe "Issues" do
end
it "should show only closed" do
choose "closed_issues"
click_link "Closed"
should have_no_content(@issue.title)
should have_content(@closed_issue.title[0..25])
end
it "should show all" do
choose "all_issues"
click_link "All"
should have_content(@issue.title[0..25])
should have_content(@closed_issue.title[0..25])
end
......@@ -182,7 +182,6 @@ describe "Issues" do
:assignee => @user,
:project => project
visit project_issues_path(project)
page.execute_script("$('.action-links').css('display', 'block');")
click_link "Edit"
end
......@@ -200,7 +199,6 @@ describe "Issues" do
it "should update issue fields" do
click_button "Save"
page.should_not have_content("Issue ##{@issue.id}")
page.should have_content @user.name
page.should have_content "bug 345"
page.should have_content project.name
......@@ -226,7 +224,7 @@ describe "Issues" do
@issue.save
visit project_issues_path(project)
choose 'closed_issues'
click_link 'Closed'
fill_in 'issue_search', :with => 'foobar'
page.should have_content 'foobar'
......
......@@ -5,7 +5,7 @@ describe "Projects" do
describe "GET /projects" do
before do
@project = Factory :project
@project = Factory :project, :owner => @user
@project.add_access(@user, :read)
visit projects_path
end
......@@ -15,7 +15,7 @@ describe "Projects" do
end
it "should have link to new project" do
page.should have_content("Create new project")
page.should have_content("New Project")
end
it "should have project" do
......@@ -26,7 +26,7 @@ describe "Projects" do
describe "GET /projects/new" do
before do
visit projects_path
click_link "Create new project"
click_link "New Project"
end
it "should be correct path" do
......@@ -68,7 +68,7 @@ describe "Projects" do
describe "GET /projects/show" do
before do
@project = Factory :project
@project = Factory :project, :owner => @user
@project.add_access(@user, :read)
visit project_path(@project)
......@@ -128,7 +128,7 @@ describe "Projects" do
describe "PUT /projects/:id" do
before do
@project = Factory :project
@project = Factory :project, :owner => @user
@project.add_access(@user, :admin, :read)
visit edit_project_path(@project)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment