\ No newline at end of file
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb
index 8c4da21cd..695586600 100644
--- a/app/views/devise/registrations/new.html.erb
+++ b/app/views/devise/registrations/new.html.erb
@@ -33,7 +33,7 @@
<% end %>
diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb
index d41a28bb6..504923748 100644
--- a/app/views/layouts/_header.html.erb
+++ b/app/views/layouts/_header.html.erb
@@ -12,13 +12,11 @@
+
+
+
+
Estamos abriendo Madrid
+
Para que todos los madrileños decidamos que ciudad queremos tener.
+ <%= link_to 'Participa en los últimos debates e iniciativas', new_debate_path, :class => 'button radius' %>
+
+
\ No newline at end of file
diff --git a/app/views/shared/_tags.html.erb b/app/views/shared/_tags.html.erb
index 2537e274b..645fd2b4f 100644
--- a/app/views/shared/_tags.html.erb
+++ b/app/views/shared/_tags.html.erb
@@ -1,5 +1,3 @@
<% if debate.tags.any? %>
-
- Temas: <%= tags(debate) %>
-
+ <%= tags(debate) %>
<% end %>
\ No newline at end of file
diff --git a/spec/features/comments_spec.rb b/spec/features/comments_spec.rb
index 31c07770c..64cec27a8 100644
--- a/spec/features/comments_spec.rb
+++ b/spec/features/comments_spec.rb
@@ -59,7 +59,7 @@ feature 'Comments' do
end
end
- scenario "N replies" do
+ scenario "N replies", :js do
debate = create(:debate)
parent = create(:comment, commentable: debate)
diff --git a/spec/features/debates_spec.rb b/spec/features/debates_spec.rb
index df1b8bb3c..f0b5b346b 100644
--- a/spec/features/debates_spec.rb
+++ b/spec/features/debates_spec.rb
@@ -11,8 +11,8 @@ feature 'Debates' do
within first('.debate') do
expect(page).to have_content "Debate title"
expect(page).to have_content "Debate description"
- expect(page).to have_content "Creado el: #{I18n.l Date.today}"
- expect(page).to have_content "por: #{Debate.first.author.name}"
+ expect(page).to have_content "Por #{Debate.first.author.name}"
+ expect(page).to have_content "el #{I18n.l Date.today}"
end
end
@@ -23,8 +23,8 @@ feature 'Debates' do
expect(page).to have_content "Debate title"
expect(page).to have_content "Debate description"
- expect(page).to have_content "Creado el: #{I18n.l Date.today}"
- expect(page).to have_content "por: #{debate.author.name}"
+ expect(page).to have_content "Por #{debate.author.name}"
+ expect(page).to have_content "el #{I18n.l Date.today}"
end
scenario 'Create' do
@@ -41,8 +41,8 @@ feature 'Debates' do
expect(page).to have_content 'Debate creado correctamente'
expect(page).to have_content 'Acabar con los desahucios'
expect(page).to have_content 'Esto es un tema muy importante porque...'
- expect(page).to have_content "Creado el: #{I18n.l Date.today}"
- expect(page).to have_content "por: #{author.name}"
+ expect(page).to have_content "Por #{author.name}"
+ expect(page).to have_content "el #{I18n.l Date.today}"
end
scenario 'Update should not be posible if logged user is not the author' do
diff --git a/spec/features/tags_spec.rb b/spec/features/tags_spec.rb
index 4be725c7a..27b2528bd 100644
--- a/spec/features/tags_spec.rb
+++ b/spec/features/tags_spec.rb
@@ -9,11 +9,11 @@ feature 'Tags' do
visit debates_path
within "#debate-#{earth.id}" do
- expect(page).to have_content "Temas: Medio Ambiente"
+ expect(page).to have_content "Medio Ambiente"
end
within "#debate-#{money.id}" do
- expect(page).to have_content "Temas: Economía"
+ expect(page).to have_content "Economía"
end
end
@@ -24,9 +24,11 @@ feature 'Tags' do
visit debates_path
first(:link, "Salud").click
- expect(page).to have_css('.debate', count: 2)
- expect(page).to have_content('Temas: Salud')
- expect(page).to_not have_content('Temas: Hacienda')
+ within('#debates') do
+ expect(page).to have_css('.debate', count: 2)
+ expect(page).to have_content('Salud')
+ expect(page).to_not have_content('Hacienda')
+ end
end
scenario 'Show' do
@@ -34,7 +36,7 @@ feature 'Tags' do
visit debate_path(debate)
- expect(page).to have_content "Temas: Economía, Hacienda"
+ expect(page).to have_content "Economía, Hacienda"
end
scenario 'Tag Cloud' do
@@ -65,7 +67,7 @@ feature 'Tags' do
click_button 'Crear Debate'
expect(page).to have_content 'Debate creado correctamente'
- expect(page).to have_content 'Temas: Economía, Hacienda, Impuestos'
+ expect(page).to have_content 'Economía, Hacienda, Impuestos'
end
scenario 'Update' do
@@ -80,8 +82,7 @@ feature 'Tags' do
click_button 'Actualizar Debate'
expect(page).to have_content 'Debate actualizado correctamente'
- within('#tags') do
- expect(page).to have_content 'Temas:'
+ within('.tags') do
expect(page).to have_css('a', text: 'Economía')
expect(page).to have_css('a', text: 'Hacienda')
end
@@ -97,7 +98,7 @@ feature 'Tags' do
click_button 'Actualizar Debate'
expect(page).to have_content 'Debate actualizado correctamente'
- expect(page).to_not have_content 'Temas:'
+ expect(page).to_not have_content 'Economía'
end
end
\ No newline at end of file
diff --git a/spec/features/users_spec.rb b/spec/features/users_spec.rb
index 30755c56f..e0fbb1edd 100644
--- a/spec/features/users_spec.rb
+++ b/spec/features/users_spec.rb
@@ -4,8 +4,7 @@ feature 'Users' do
scenario 'Sign up' do
visit '/'
- click_link 'Login'
- click_link 'Sign up'
+ click_link 'Registrarse'
fill_in 'user_first_name', with: 'Manuela'
fill_in 'user_last_name', with: 'Carmena'
@@ -13,7 +12,7 @@ feature 'Users' do
fill_in 'user_password', with: 'judgementday'
fill_in 'user_password_confirmation', with: 'judgementday'
- click_button 'Sign up'
+ click_button 'Registrarse'
expect(page).to have_content '¡Bienvenido! Has sido identificado.'
end
@@ -22,10 +21,10 @@ feature 'Users' do
user = create(:user, email: 'manuela@madrid.es', password: 'judgementday')
visit '/'
- click_link 'Login'
+ click_link 'Entrar'
fill_in 'user_email', with: 'manuela@madrid.es'
fill_in 'user_password', with: 'judgementday'
- click_button 'Log in'
+ click_button 'Entrar'
expect(page).to have_content 'Has iniciado sesión correctamente.'
end
@@ -35,7 +34,7 @@ feature 'Users' do
login_as(user)
visit "/"
- click_link 'Logout'
+ click_link 'Salir'
expect(page).to have_content 'Has cerrado la sesión correctamente.'
end
diff --git a/spec/features/votes_spec.rb b/spec/features/votes_spec.rb
index fb4fc29dd..f5399c9b1 100644
--- a/spec/features/votes_spec.rb
+++ b/spec/features/votes_spec.rb
@@ -17,7 +17,7 @@ feature 'Votes' do
visit debate_path(@debate)
- expect(page).to have_content "Votos 2"
+ expect(page).to have_content "2 votos"
within('#in_favor') do
expect(page).to have_content "50%"
@@ -29,21 +29,21 @@ feature 'Votes' do
end
scenario 'Create' do
- click_link 'up'
+ find('#in_favor a').click
expect(page).to have_content "Gracias por votar"
end
scenario 'Update' do
- click_link 'up'
- click_link 'down'
+ find('#in_favor a').click
+ find('#against a').click
expect(page).to have_content "Gracias por votar"
end
scenario 'Trying to vote multiple times' do
- click_link 'up'
- click_link 'up'
+ find('#in_favor a').click
+ find('#in_favor a').click
expect(page).to have_content "Tu voto ya ha sido registrado"
- expect(page).to have_content "Votos 1"
+ expect(page).to have_content "1 voto"
end
end
\ No newline at end of file
Comentarios
+