Commit 8eb02d6ba8f46d6ec31f96401b1b7f027bb07580
1 parent
ce5ea762
Exists in
colab
and in
4 other branches
Layout with Twitter Bootstrap
Signed-off-by: Fellipe Souto <fllsouto@gmail.com>
Showing
28 changed files
with
207 additions
and
91 deletions
Show diff stats
Gemfile
... | ... | @@ -39,9 +39,12 @@ gem 'devise', '~> 3.1.0' |
39 | 39 | # Kalibro integration |
40 | 40 | gem 'kalibro_entities', "~> 0.0.1.rc2" |
41 | 41 | |
42 | -#PostgreSQL integration | |
42 | +# PostgreSQL integration | |
43 | 43 | gem "pg", "~> 0.17.0" |
44 | 44 | |
45 | +# Twitter Bootstrap for layout | |
46 | +gem "twitter-bootstrap-rails", "~> 2.2.8" | |
47 | + | |
45 | 48 | group :doc do |
46 | 49 | # bundle exec rake doc:rails generates the API under doc/api. |
47 | 50 | gem 'sdoc', require: false | ... | ... |
Gemfile.lock
... | ... | @@ -221,6 +221,11 @@ GEM |
221 | 221 | polyglot (>= 0.3.1) |
222 | 222 | turbolinks (1.3.0) |
223 | 223 | coffee-rails |
224 | + twitter-bootstrap-rails (2.2.8) | |
225 | + actionpack (>= 3.1) | |
226 | + execjs | |
227 | + rails (>= 3.1) | |
228 | + railties (>= 3.1) | |
224 | 229 | tzinfo (0.3.38) |
225 | 230 | uglifier (2.2.1) |
226 | 231 | execjs (>= 0.3.0) |
... | ... | @@ -264,4 +269,5 @@ DEPENDENCIES |
264 | 269 | sqlite3 |
265 | 270 | therubyracer |
266 | 271 | turbolinks |
272 | + twitter-bootstrap-rails (~> 2.2.8) | |
267 | 273 | uglifier (>= 1.3.0) | ... | ... |
1.84 KB
2.68 KB
app/assets/javascripts/application.js
app/assets/stylesheets/application.css
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | * You're free to add application-wide styles to this file and they'll appear at the top of the |
9 | 9 | * compiled file, but it's generally better to create a new file per style scope. |
10 | 10 | * |
11 | - *= boilerplate/main.css | |
11 | + *= boilerplate/main.css | |
12 | 12 | *= boilerplate/normalize.css |
13 | 13 | *= require_self |
14 | 14 | *= require_tree . | ... | ... |
... | ... | @@ -0,0 +1,20 @@ |
1 | +/* | |
2 | + =require twitter-bootstrap-static/bootstrap | |
3 | + | |
4 | + Use Font Awesome icons (default) | |
5 | + To use Glyphicons sprites instead of Font Awesome, replace with "require twitter-bootstrap-static/sprites" | |
6 | + =require twitter-bootstrap-static/fontawesome | |
7 | + */ | |
8 | + | |
9 | +footer div { | |
10 | + width: 50%; | |
11 | +} | |
12 | + | |
13 | +.footer-right { | |
14 | + float: right; | |
15 | + text-align: right; | |
16 | +} | |
17 | + | |
18 | +.footer-left { | |
19 | + float: left; | |
20 | +} | |
0 | 21 | \ No newline at end of file | ... | ... |
app/views/devise/confirmations/new.html.erb
1 | -<h2>Resend confirmation instructions</h2> | |
1 | +<h1>Resend confirmation instructions</h1> | |
2 | 2 | |
3 | 3 | <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %> |
4 | 4 | <%= devise_error_messages! %> |
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <div><%= f.label :email %><br /> |
7 | 7 | <%= f.email_field :email, :autofocus => true %></div> |
8 | 8 | |
9 | - <div><%= f.submit "Resend confirmation instructions" %></div> | |
9 | + <div><%= f.submit "Resend confirmation instructions", class: 'btn btn-default' %></div> | |
10 | 10 | <% end %> |
11 | 11 | |
12 | 12 | <%= render "devise/shared/links" %> | ... | ... |
app/views/devise/passwords/edit.html.erb
1 | -<h2>Change your password</h2> | |
1 | +<h1>Change your password</h1> | |
2 | 2 | |
3 | 3 | <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %> |
4 | 4 | <%= devise_error_messages! %> |
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | <div><%= f.label :password_confirmation, "Confirm new password" %><br /> |
11 | 11 | <%= f.password_field :password_confirmation %></div> |
12 | 12 | |
13 | - <div><%= f.submit "Change my password" %></div> | |
13 | + <div><%= f.submit "Change my password", class: 'btn btn-warning' %></div> | |
14 | 14 | <% end %> |
15 | 15 | |
16 | 16 | <%= render "devise/shared/links" %> | ... | ... |
app/views/devise/passwords/new.html.erb
1 | -<h2>Forgot your password?</h2> | |
1 | +<h1>Forgot your password?</h1> | |
2 | 2 | |
3 | 3 | <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %> |
4 | 4 | <%= devise_error_messages! %> |
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <div><%= f.label :email %><br /> |
7 | 7 | <%= f.email_field :email, :autofocus => true %></div> |
8 | 8 | |
9 | - <div><%= f.submit "Send me reset password instructions" %></div> | |
9 | + <div><%= f.submit "Send me reset password instructions", class: 'btn btn-warning' %></div> | |
10 | 10 | <% end %> |
11 | 11 | |
12 | 12 | <%= render "devise/shared/links" %> | ... | ... |
app/views/devise/registrations/edit.html.erb
1 | -<h2>Edit <%= resource_name.to_s.humanize %></h2> | |
1 | +<h1>Edit <%= resource_name.to_s.humanize %></h1> | |
2 | 2 | |
3 | 3 | <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> |
4 | 4 | <%= devise_error_messages! %> |
... | ... | @@ -22,11 +22,9 @@ |
22 | 22 | <div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br /> |
23 | 23 | <%= f.password_field :current_password %></div> |
24 | 24 | |
25 | - <div><%= f.submit "Update" %></div> | |
25 | + <div><%= f.submit "Update", class: 'btn btn-primary' %></div> | |
26 | 26 | <% end %> |
27 | 27 | |
28 | -<h3>Cancel my account</h3> | |
28 | +<h2>Cancel my account</h2> | |
29 | 29 | |
30 | -<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %></p> | |
31 | - | |
32 | -<%= link_to "Back", root_path %> | |
30 | +<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete, class: 'btn btn-danger' %></p> | ... | ... |
app/views/devise/registrations/new.html.erb
1 | -<h2>Sign up</h2> | |
1 | +<h1>Sign up</h1> | |
2 | 2 | |
3 | 3 | <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> |
4 | 4 | <%= devise_error_messages! %> |
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | <div><%= f.label :password_confirmation %><br /> |
16 | 16 | <%= f.password_field :password_confirmation %></div> |
17 | 17 | |
18 | - <div><%= f.submit "Sign up" %></div> | |
18 | + <div><%= f.submit "Sign up", class: 'btn btn-primary' %></div> | |
19 | 19 | <% end %> |
20 | 20 | |
21 | 21 | <%= render "devise/shared/links" %> | ... | ... |
app/views/devise/sessions/new.html.erb
1 | -<h2>Sign in</h2> | |
1 | +<h1>Sign in</h1> | |
2 | 2 | |
3 | 3 | <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %> |
4 | 4 | <div><%= f.label :email %><br /> |
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div> |
12 | 12 | <% end -%> |
13 | 13 | |
14 | - <div><%= f.submit "Sign in" %></div> | |
14 | + <div><%= f.submit "Sign in", class: 'btn btn-primary' %></div> | |
15 | 15 | <% end %> |
16 | 16 | |
17 | 17 | <%= render "devise/shared/links" %> | ... | ... |
app/views/devise/unlocks/new.html.erb
1 | -<h2>Resend unlock instructions</h2> | |
1 | +<h1>Resend unlock instructions</h1> | |
2 | 2 | |
3 | 3 | <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %> |
4 | 4 | <%= devise_error_messages! %> |
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <div><%= f.label :email %><br /> |
7 | 7 | <%= f.email_field :email, :autofocus => true %></div> |
8 | 8 | |
9 | - <div><%= f.submit "Resend unlock instructions" %></div> | |
9 | + <div><%= f.submit "Resend unlock instructions", class: 'btn btn-primary' %></div> | |
10 | 10 | <% end %> |
11 | 11 | |
12 | 12 | <%= render "devise/shared/links" %> | ... | ... |
app/views/home/index.html.erb
1 | -<% if user_signed_in? %> | |
2 | - <%= link_to('Edit', edit_user_registration_path) %> | |
3 | - <%= link_to('New Project', new_project_path) %> | |
4 | - <%= link_to('Logout', destroy_user_session_path, :method => :delete) %> | |
5 | -<% else %> | |
6 | - <%= link_to('Login', new_user_session_path) %> | |
7 | - <%= link_to('Sign Up', new_user_registration_path) %> | |
8 | -<% end %> | |
1 | +<div class="hero-unit"> | |
2 | +<p><h1>Hello world!</h1></p> | |
9 | 3 | |
10 | -<p><h2>Latest Projects</h2></p> | |
4 | +<p>This is Mezuro! A <strong>free</strong> (with the same meaning as freedom) web platform for <strong>collaborative</strong> source code <strong>evalution</strong>.</p> | |
5 | + | |
6 | +<p>Here you can evaluate your source code with most of the SCM, just by giving it's URL. For now you can evaluate <strong>Java</strong>, <strong>C/C++</strong> and <strong>Python</strong> source-code, but soon we hope to support more languages!</p> | |
7 | + | |
8 | +</div> | |
9 | + | |
10 | +<h2>Latest projects</h2> | |
11 | 11 | <ul> |
12 | 12 | <% @latest_projects.each do |project| %> |
13 | 13 | <li><%= link_to(project.name, project_path(project.id)) %></li> |
14 | 14 | <% end %> |
15 | -</ul> | |
16 | -<p><%= link_to('All Projects', projects_path) %></p> | |
17 | 15 | \ No newline at end of file |
16 | +</ul> | |
18 | 17 | \ No newline at end of file | ... | ... |
app/views/layouts/application.html.erb
1 | 1 | <!DOCTYPE html> |
2 | -<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
3 | -<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
4 | -<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
5 | -<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
2 | +<html lang="en"> | |
6 | 3 | <head> |
7 | - <meta charset="utf-8" /> | |
8 | - <meta name="viewport" content="width=device-width,initial-scale=1" /> | |
4 | + <meta charset="utf-8"> | |
5 | + <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> | |
6 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
9 | 7 | |
10 | - <title>Base Rails App</title> | |
8 | + <title><%= content_for?(:title) ? yield(:title) : "Mezuro" %></title> | |
11 | 9 | |
12 | 10 | <link type="text/plain" rel="author" href="humans.txt" /> |
11 | + | |
13 | 12 | <%= javascript_include_tag :modernizr %> |
14 | 13 | |
15 | - <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %> | |
14 | + <!-- Le HTML5 shim, for IE6-8 support of HTML elements --> | |
15 | + <!--[if lt IE 9]> | |
16 | + <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js" type="text/javascript"></script> | |
17 | + <![endif]--> | |
18 | + | |
19 | + <%= stylesheet_link_tag "application", :media => "all" %> | |
20 | + | |
21 | + <!-- For third-generation iPad with high-resolution Retina display: --> | |
22 | + <!-- Size should be 144 x 144 pixels --> | |
23 | + <%= favicon_link_tag 'apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %> | |
24 | + | |
25 | + <!-- For iPhone with high-resolution Retina display: --> | |
26 | + <!-- Size should be 114 x 114 pixels --> | |
27 | + <%= favicon_link_tag 'apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114' %> | |
28 | + | |
29 | + <!-- For first- and second-generation iPad: --> | |
30 | + <!-- Size should be 72 x 72 pixels --> | |
31 | + <%= favicon_link_tag 'apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72' %> | |
16 | 32 | |
17 | - <%= javascript_include_tag "application", "data-turbolinks-track" => true %> | |
33 | + <!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: --> | |
34 | + <!-- Size should be 57 x 57 pixels --> | |
35 | + <%= favicon_link_tag 'apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png' %> | |
36 | + | |
37 | + <!-- For all other devices --> | |
38 | + <!-- Size should be 32 x 32 pixels --> | |
39 | + <%= favicon_link_tag 'favicon.ico', :rel => 'shortcut icon' %> | |
40 | + | |
41 | + <%= javascript_include_tag "application" %> | |
18 | 42 | |
19 | 43 | <%= csrf_meta_tags %> |
20 | 44 | </head> |
21 | - | |
22 | 45 | <body> |
23 | - <p class="notice"><%= notice %></p> | |
24 | - <p class="alert"><%= alert %></p> | |
25 | 46 | |
47 | + <div class="navbar navbar-fluid-top"> | |
48 | + <div class="navbar-inner"> | |
49 | + <div class="container-fluid"> | |
50 | + <a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse"> | |
51 | + <span class="icon-bar"></span> | |
52 | + <span class="icon-bar"></span> | |
53 | + <span class="icon-bar"></span> | |
54 | + </a> | |
55 | + <%= link_to image_tag('logo.png'), root_path, class: 'brand' %></a> | |
56 | + <div class="container-fluid nav-collapse"> | |
57 | + <ul class="nav"> | |
58 | + <li><%= link_to 'Home', root_path %></li> | |
59 | + <li><%= link_to 'Project', projects_path %></li> | |
60 | + </ul> | |
61 | + <ul class="nav" style="float: right;"> | |
62 | + <% if user_signed_in? %> | |
63 | + <li><%= link_to 'Edit Account', edit_user_registration_path %></li> | |
64 | + <li><%= link_to 'Logout', destroy_user_session_path, :method => :delete %></li> | |
65 | + <% else %> | |
66 | + <li><%= link_to 'Login', new_user_session_path %></li> | |
67 | + <li><%= link_to 'Sign Up', new_user_registration_path %></li> | |
68 | + <% end %> | |
69 | + </ul> | |
70 | + </div><!--/.nav-collapse --> | |
71 | + </div> | |
72 | + </div> | |
73 | + </div> | |
74 | + | |
75 | + <div class="container-fluid"> | |
76 | + <div class="row-fluid"> | |
77 | + <div class="span3"> | |
78 | + <div class="well sidebar-nav"> | |
79 | + <ul class="nav nav-list"> | |
80 | + <% if user_signed_in? %> | |
81 | + <li class="nav-header">User info</li> | |
82 | + <li>Hello, <strong><%= current_user.name %></strong></li> | |
83 | + <% end %> | |
84 | + <% if content_for?(:sidebar) %> | |
85 | + <%= yield :sidebar %> | |
86 | + <% else %> | |
87 | + <%= render 'shared/short_about' %> | |
88 | + <% end %> | |
89 | + </ul> | |
90 | + </div><!--/.well --> | |
91 | + </div><!--/span--> | |
92 | + <div class="span9"> | |
93 | + <%= bootstrap_flash %> | |
94 | + <%= yield %> | |
95 | + </div> | |
96 | + </div><!--/row--> | |
97 | + | |
98 | + <footer> | |
99 | + <div class="footer-left">© <%= link_to "The Mezuro Team", "humans.txt" %> 2013</div> | |
100 | + <div class="footer-right"><%= link_to(image_tag('agplv3-88x31.png'), 'http://www.gnu.org/licenses/agpl-3.0-standalone.html') %> <%= link_to "Fork me", "https://github.com/mezuro/mezuro-standalone" %></div> | |
101 | + </footer> | |
26 | 102 | |
27 | - <%= yield %> | |
103 | + </div> <!-- /container --> | |
28 | 104 | |
29 | 105 | </body> |
30 | 106 | </html> | ... | ... |
app/views/projects/_form.html.erb
1 | -<%= form_for(@project) do |f| %> | |
1 | +<%= form_for(@project, :html => { role: 'form' }) do |f| %> | |
2 | 2 | <%= render :partial => 'shared/form_errors', :locals => {:object => @project} %> |
3 | 3 | |
4 | - <div class="field"> | |
4 | + <div class="form-group"> | |
5 | 5 | <%= f.label :name %><br> |
6 | - <%= f.text_field :name %> | |
6 | + <%= f.text_field :name, class: 'form-control' %> | |
7 | 7 | </div> |
8 | 8 | |
9 | - <div class="field"> | |
9 | + <div class="form-group"> | |
10 | 10 | <%= f.label :description %><br> |
11 | - <%= f.text_area :description %> | |
11 | + <%= f.text_area :description, class: 'form-control' %> | |
12 | 12 | </div> |
13 | 13 | |
14 | - <div class="actions"> | |
15 | - <%= f.submit %> | |
16 | - </div> | |
14 | + <%= f.submit 'Save', class: 'btn btn-default' %> | |
17 | 15 | <% end %> | ... | ... |
app/views/projects/index.html.erb
1 | 1 | <h1>Listing Projects</h1> |
2 | 2 | |
3 | -<table> | |
3 | +<p><%= link_to 'New Project', new_project_path, class: 'btn btn-primary' %></p> | |
4 | + | |
5 | +<table class="table table-hover"> | |
4 | 6 | <thead> |
5 | 7 | <tr> |
6 | 8 | <th>Name</th> |
... | ... | @@ -14,15 +16,13 @@ |
14 | 16 | <tr> |
15 | 17 | <td><%= project.name %></td> |
16 | 18 | <td><%= project.description %></td> |
17 | - <td><%= link_to 'Show', project_path(project.id) %></td> | |
18 | - <% if project_owner? project.id %> | |
19 | - <td><%= link_to 'Edit', edit_project_path(project.id) %></td> | |
20 | - <% end %> | |
19 | + <td><%= link_to 'Show', project_path(project.id), class: 'btn btn-info' %></td> | |
20 | + <td> | |
21 | + <% if project_owner? project.id %> | |
22 | + <%= link_to 'Edit', edit_project_path(project.id), class: 'btn btn-info' %> | |
23 | + <% end %> | |
24 | + </td> | |
21 | 25 | </tr> |
22 | 26 | <% end %> |
23 | 27 | </tbody> |
24 | 28 | </table> |
25 | - | |
26 | -<br> | |
27 | - | |
28 | -<%= link_to 'New Project', new_project_path %> | ... | ... |
app/views/projects/new.html.erb
app/views/projects/show.html.erb
... | ... | @@ -10,8 +10,6 @@ |
10 | 10 | |
11 | 11 | <p> |
12 | 12 | <% if project_owner? @project.id %> |
13 | - <%= link_to 'Destroy', project_path(@project.id), method: :delete, data: { confirm: 'Are you sure?' } %> | |
13 | + <%= link_to 'Destroy', project_path(@project.id), method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' %> | |
14 | 14 | <% end %> |
15 | 15 | </p> |
16 | - | |
17 | -<%= link_to 'Back', projects_path %> | ... | ... |
... | ... | @@ -0,0 +1,4 @@ |
1 | +<li class="nav-header">About Mezuro</li> | |
2 | +<li> | |
3 | +<small>Mezuro is the front-end for the <%= link_to 'Kalibro Project', 'https://github.com/mezuro/kalibro' %>. It is intended to be a service where you can evaluate your code quality and, if you want, define wich set of metrics you want to use.</small> | |
4 | +</li> | |
0 | 5 | \ No newline at end of file | ... | ... |
... | ... | @@ -0,0 +1,18 @@ |
1 | +# Sample localization file for English. Add more files in this directory for other locales. | |
2 | +# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. | |
3 | + | |
4 | +en: | |
5 | + helpers: | |
6 | + actions: "Actions" | |
7 | + links: | |
8 | + back: "Back" | |
9 | + cancel: "Cancel" | |
10 | + confirm: "Are you sure?" | |
11 | + destroy: "Delete" | |
12 | + new: "New" | |
13 | + edit: "Edit" | |
14 | + titles: | |
15 | + edit: "Edit %{model}" | |
16 | + save: "Save %{model}" | |
17 | + new: "New %{model}" | |
18 | + delete: "Delete %{model}" | ... | ... |
features/homepage.feature
... | ... | @@ -7,8 +7,8 @@ Feature: Homepage |
7 | 7 | Given I am at the homepage |
8 | 8 | Then I should see Login |
9 | 9 | And I should see Sign Up |
10 | - And I should see Latest Projects | |
11 | - And I should see All Projects | |
10 | + And I should see Latest projects | |
11 | + And I should see Project | |
12 | 12 | |
13 | 13 | Scenario: Signed in |
14 | 14 | Given I am a regular user |
... | ... | @@ -16,5 +16,5 @@ Feature: Homepage |
16 | 16 | And I am at the homepage |
17 | 17 | Then I should see Edit |
18 | 18 | And I should see Logout |
19 | - And I should see Latest Projects | |
20 | - And I should see All Projects | |
21 | 19 | \ No newline at end of file |
20 | + And I should see Latest projects | |
21 | + And I should see Project | |
22 | 22 | \ No newline at end of file | ... | ... |
features/project/create.feature
... | ... | @@ -17,7 +17,7 @@ Feature: Project Creation |
17 | 17 | And I am at the New Project page |
18 | 18 | And I fill the Name field with "Kalibro" |
19 | 19 | And I fill the Description field with "Web Service to collect metrics" |
20 | - When I press the Create Project button | |
20 | + When I press the Save button | |
21 | 21 | Then I should see Kalibro |
22 | 22 | And I should see Web Service to collect metrics |
23 | 23 | |
... | ... | @@ -29,7 +29,7 @@ Feature: Project Creation |
29 | 29 | And I am at the New Project page |
30 | 30 | And I fill the Name field with "Kalibro" |
31 | 31 | And I fill the Description field with "Web Service to collect metrics" |
32 | - When I press the Create Project button | |
32 | + When I press the Save button | |
33 | 33 | Then I should see There's already |
34 | 34 | |
35 | 35 | @kalibro_restart |
... | ... | @@ -39,5 +39,5 @@ Feature: Project Creation |
39 | 39 | And I am at the New Project page |
40 | 40 | And I fill the Name field with " " |
41 | 41 | And I fill the Description field with "Web Service to collect metrics" |
42 | - When I press the Create Project button | |
42 | + When I press the Save button | |
43 | 43 | Then I should see Name can't be blank |
44 | 44 | \ No newline at end of file | ... | ... |
features/project/edition.feature
... | ... | @@ -18,8 +18,8 @@ Feature: Project |
18 | 18 | And I am signed in |
19 | 19 | And I have a sample project |
20 | 20 | And I am at the All Projects page |
21 | - Then I should not see Edit | |
22 | - | |
21 | + Then I should not see "Edit" within "table tr td" | |
22 | + | |
23 | 23 | @kalibro_restart |
24 | 24 | Scenario: Should not render the edit page if the project doesn't belongs to the current user |
25 | 25 | Given I am a regular user |
... | ... | @@ -47,7 +47,7 @@ Feature: Project |
47 | 47 | And I am at the sample project edit page |
48 | 48 | And I fill the Name field with "Kalibro" |
49 | 49 | And I fill the Description field with "Web Service to collect metrics" |
50 | - When I press the Update button | |
50 | + When I press the Save button | |
51 | 51 | Then I should see Kalibro |
52 | 52 | And I should see Web Service to collect metrics |
53 | 53 | |
... | ... | @@ -59,7 +59,7 @@ Feature: Project |
59 | 59 | And I own a project named "Kalibro" |
60 | 60 | And I am at the sample project edit page |
61 | 61 | And I fill the Name field with "Qt-Calculator" |
62 | - When I press the Update button | |
62 | + When I press the Save button | |
63 | 63 | Then I should see There's already |
64 | 64 | |
65 | 65 | @kalibro_restart |
... | ... | @@ -69,7 +69,7 @@ Feature: Project |
69 | 69 | And I own a sample project |
70 | 70 | And I am at the sample project edit page |
71 | 71 | And I fill the Description field with "Web Service to collect metrics" |
72 | - When I press the Update button | |
72 | + When I press the Save button | |
73 | 73 | And I should see Web Service to collect metrics |
74 | 74 | |
75 | 75 | @kalibro_restart |
... | ... | @@ -79,5 +79,5 @@ Feature: Project |
79 | 79 | And I own a sample project |
80 | 80 | And I am at the sample project edit page |
81 | 81 | And I fill the Name field with " " |
82 | - When I press the Update button | |
82 | + When I press the Save button | |
83 | 83 | Then I should see Name can't be blank | ... | ... |
features/project/listing.feature
... | ... | @@ -5,7 +5,7 @@ Feature: Project listing |
5 | 5 | |
6 | 6 | Scenario: Listing projects |
7 | 7 | Given I am at the homepage |
8 | - When I click the All Projects link | |
8 | + When I click the Project link | |
9 | 9 | Then I should see Listing Projects |
10 | 10 | And I should see Name |
11 | 11 | And I should see Description |
... | ... | @@ -27,14 +27,4 @@ Feature: Project listing |
27 | 27 | When I click the Show link |
28 | 28 | Then I should see Name |
29 | 29 | And I should see Description |
30 | - And I should see Back | |
31 | - And the sample project should be there | |
32 | - | |
33 | - @wip @kalibro_restart | |
34 | - Scenario: Should go back to the All Projects page from show project view | |
35 | - Given I am a regular user | |
36 | - And I am signed in | |
37 | - And I have a sample project | |
38 | - And I am at the Sample Project page | |
39 | - When I click the Back link | |
40 | - Then I should be in the All Projects page | |
41 | 30 | \ No newline at end of file |
31 | + And the sample project should be there | |
42 | 32 | \ No newline at end of file | ... | ... |
features/step_definitions/project_steps.rb
... | ... | @@ -42,6 +42,10 @@ Then(/^I should not see (.+)$/) do |text| |
42 | 42 | page.should_not have_content(text) |
43 | 43 | end |
44 | 44 | |
45 | +Then(/^I should not see "(.+)"" within "(.+)"$/) do |text, selector| | |
46 | + page.find(selector).should_not have_content(text) | |
47 | +end | |
48 | + | |
45 | 49 | Then(/^the sample project should be there$/) do |
46 | 50 | page.should have_content(@project.name) |
47 | 51 | page.should have_content(@project.description) | ... | ... |