From 6643f971959529963d91aca6898218d5c5b627d4 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 25 Aug 2015 13:51:25 +0200 Subject: [PATCH 1/7] Updates custom icons font --- app/assets/fonts/icons.eot | Bin 5716 -> 5824 bytes app/assets/fonts/icons.svg | 1 + app/assets/fonts/icons.ttf | Bin 5560 -> 5668 bytes app/assets/fonts/icons.woff | Bin 4380 -> 4464 bytes app/assets/stylesheets/icons.scss | 4 ++++ 5 files changed, 5 insertions(+) diff --git a/app/assets/fonts/icons.eot b/app/assets/fonts/icons.eot index 2c00f1f5b9cb03572d4edc47b957eb166f49e9e1..a1cc83d43d12151ca8a386601a45b4974e3b0142 100644 GIT binary patch delta 501 zcmcbjb3m8vfEWXVir7RpGnP5elNu&EH_J_|C}2oom;jWw z0P+>`5_41etvYWrFo;M1#qtXBi%XbKG8X`C=>W=yF)#v2AZ|!{J|~{v<|_j?6HtJG z;S%FBMP!ZUnDWWnn4B3UC;woo1(J=-9g_{1IVW?nXtQwGF)(a4VUZL_W@K<HgWi&H35*ITzG6ynE7&kFXDcC40>1ivm3vvqx zhzUr_TdOMR8YwX|w({x9%km3w|Jw(Y;GW2C}l1xyjLy@eB;2a~K#HWZYd`-5A^$*ns>RAYZ{h zSl`J1cg$`E2F3^=KP)*nu^@0`*gqiu4G@>5Cl(j{|Ife-R9^y==Sa_~OtY_aS72aZ zp25H%Ad!)pn8GS`IdQT8qkKIRP{#(KDyy9QP(Fl#5l8}Ysy>c5Y+^dmqd$!mbi%- SPp%b{VU(CWOH7If* + diff --git a/app/assets/fonts/icons.ttf b/app/assets/fonts/icons.ttf index 808c75487bf0422da6e512d3c1049bc9e25a6f6d..aa9c63faae88382db31d66dded442022c23bbae3 100644 GIT binary patch delta 554 zcmYL`KWGzS7{;IPzDs%#(p>QpO^hVDR7GM8Txt|eD)=XHkrb6sq$<}WHbbvHOra5! zb`caDs^{R4v5Q;LMMOjp1Q!KY9qbYv+{8f(thFY5Co#%$?5u~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ropriate --- app/assets/stylesheets/admin.scss | 4 ++-- app/assets/stylesheets/debates.scss | 19 +++++++++++++++ app/assets/stylesheets/participacion.scss | 23 +++++++++++++++++-- app/assets/stylesheets/variables.scss | 1 + app/views/comments/_actions.html.erb | 8 +++++-- app/views/comments/_comment.html.erb | 10 +++----- .../_flag_as_inappropiate_actions.html.erb | 21 +++++++++++++++-- .../_flag_as_inappropiate_actions.html.erb | 19 +++++++++++++-- app/views/debates/show.html.erb | 4 ++-- config/locales/en.yml | 2 +- config/locales/es.yml | 2 +- 11 files changed, 92 insertions(+), 21 deletions(-) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 7e6096bc3..f62b5efd6 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -140,7 +140,7 @@ body.admin { .delete { border-bottom: 1px dotted #CF2A0E; - color: #F04124; + color: $delete; font-size: rem-calc(12); &:hover, &:active, &:focus { @@ -160,7 +160,7 @@ body.admin { } .rejected { - color: #F04124; + color: $delete; } .level { diff --git a/app/assets/stylesheets/debates.scss b/app/assets/stylesheets/debates.scss index 66ea491af..641e7ccff 100644 --- a/app/assets/stylesheets/debates.scss +++ b/app/assets/stylesheets/debates.scss @@ -5,6 +5,7 @@ // 03. Show // 04. New // 05. Comments +// 06. Flags // // 01. Debates @@ -541,6 +542,10 @@ font-size: rem-calc(12); margin: rem-calc(6) 0; padding: rem-calc(6); + + .divider { + color: $text-light; + } } .comment-user { @@ -608,3 +613,17 @@ .faded { opacity: 0.4; } + +// 06. Flags +// - - - - - - - - - - - - - - - - - - - - - - - - - + +.flag-disable { + color: $text-medium; + line-height: rem-calc(24); + vertical-align: middle; +} + +.flag-active { + @extend .flag-disable; + color: $delete; +} diff --git a/app/assets/stylesheets/participacion.scss b/app/assets/stylesheets/participacion.scss index 485dbfd60..b3ee7046a 100644 --- a/app/assets/stylesheets/participacion.scss +++ b/app/assets/stylesheets/participacion.scss @@ -150,6 +150,25 @@ h1, h2, h3, h4, h5, h6 { } } +.f-dropdown { + + li a { + font-size: rem-calc(12); + + &:hover { + color: $link-hover; + } + } + + li:hover, .f-dropdown li:focus { + background: white; + } + + &.open { + outline: none; + } +} + // 04. Header // - - - - - - - - - - - - - - - - - - - - - - - - - @@ -692,13 +711,13 @@ form { } } -img.admin-avatar, img.moderator-avatar { +img.avatar, img.admin-avatar, img.moderator-avatar { border-radius: rem-calc(1000); position: relative; } img.initialjs-avatar { - @extend .moderator-avatar; + @extend .avatar; } .author-deleted { diff --git a/app/assets/stylesheets/variables.scss b/app/assets/stylesheets/variables.scss index 4be7028e3..64861e215 100644 --- a/app/assets/stylesheets/variables.scss +++ b/app/assets/stylesheets/variables.scss @@ -38,6 +38,7 @@ $votes-like-act: #5D9E7F; $votes-unlike: #EF8585; $votes-unlike-act: #BD6A6A; +$delete: #F04124; $check: #46DB91; // 03. Forms diff --git a/app/views/comments/_actions.html.erb b/app/views/comments/_actions.html.erb index 5454179f0..51a6743e0 100644 --- a/app/views/comments/_actions.html.erb +++ b/app/views/comments/_actions.html.erb @@ -1,12 +1,16 @@ + + <%= render 'comments/flag_as_inappropiate_actions', comment: comment %> + + <% if can? :hide, comment %> -  |  +  •  <%= link_to t("admin.actions.hide").capitalize, hide_moderation_comment_path(comment), method: :put, remote: true, data: { confirm: t('admin.actions.confirm') } %> <% end %> <% if can? :hide, comment.user %> -  |  +  •  <%= link_to t("admin.actions.hide_author").capitalize, hide_moderation_user_path(comment.user_id, debate_id: @debate.id), method: :put, data: { confirm: t('admin.actions.confirm') } %> <% end %> diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index ca7474ebd..6f93bdde4 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -58,10 +58,6 @@ <% end %>  • <%= time_ago_in_words(comment.created_at) %> - - - <%= render 'comments/flag_as_inappropiate_actions', comment: comment %> - <% if comment.as_administrator? %> @@ -81,11 +77,11 @@ <%= render 'comments/votes', comment: comment %> -

+

<%= t("debates.comment.responses", count: comment.children_count) %> <% if user_signed_in? %> -  |  +  |  <%= link_to(comment_link_text(comment), "", class: "js-add-comment-link", data: {'id': dom_id(comment)}) %> @@ -93,7 +89,7 @@ <%= render 'comments/form', {parent: comment, toggeable: true} %> <% end %> -

+
<% end %> diff --git a/app/views/comments/_flag_as_inappropiate_actions.html.erb b/app/views/comments/_flag_as_inappropiate_actions.html.erb index fad83d4d6..0b62715e3 100644 --- a/app/views/comments/_flag_as_inappropiate_actions.html.erb +++ b/app/views/comments/_flag_as_inappropiate_actions.html.erb @@ -1,6 +1,23 @@ <% if can? :flag_as_inappropiate, comment %> - <%= link_to t('shared.flag_as_inappropiate'), flag_as_inappropiate_comment_path(comment), method: :put, remote: true %> +  |  + + <% end %> + <% if can? :undo_flag_as_inappropiate, comment %> - <%= link_to t('shared.undo_flag_as_inappropiate'), undo_flag_as_inappropiate_comment_path(comment), method: :put, remote: true %> +  |  + + <% end %> diff --git a/app/views/debates/_flag_as_inappropiate_actions.html.erb b/app/views/debates/_flag_as_inappropiate_actions.html.erb index 8003600e0..6db9bc5f4 100644 --- a/app/views/debates/_flag_as_inappropiate_actions.html.erb +++ b/app/views/debates/_flag_as_inappropiate_actions.html.erb @@ -1,6 +1,21 @@ <% if can? :flag_as_inappropiate, debate %> - <%= link_to t('shared.flag_as_inappropiate'), flag_as_inappropiate_debate_path(debate), method: :put, remote: true %> + + <% end %> + <% if can? :undo_flag_as_inappropiate, debate %> - <%= link_to t('shared.undo_flag_as_inappropiate'), undo_flag_as_inappropiate_debate_path(debate), method: :put, remote: true %> + + <% end %> diff --git a/app/views/debates/show.html.erb b/app/views/debates/show.html.erb index 47ff9e34f..a6765e1b0 100644 --- a/app/views/debates/show.html.erb +++ b/app/views/debates/show.html.erb @@ -41,8 +41,8 @@  •    <%= link_to t("debates.show.comments", count: @debate.comment_threads.count), "#comments" %> - - +  •  + <%= render 'debates/flag_as_inappropiate_actions', debate: @debate %> diff --git a/config/locales/en.yml b/config/locales/en.yml index ce3339b25..55e06af4e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -135,7 +135,7 @@ en: tags_cloud: tags: Topics flag_as_inappropiate: Flag as inappropiate - undo_flag_as_inappropiate: Undo flag as inappropiate + undo_flag_as_inappropiate: Undo flag collective: Collective mailer: comment: diff --git a/config/locales/es.yml b/config/locales/es.yml index 1e2cca785..d548f2334 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -135,7 +135,7 @@ es: tags_cloud: tags: Temas flag_as_inappropiate: Denunciar como inapropiado - undo_flag_as_inappropiate: Deshacer denunciar como inapropiado + undo_flag_as_inappropiate: Deshacer denuncia collective: Colectivo mailer: comment: From 8037a82fef911661fe769b8b3e0ce51d8c8e71ad Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 25 Aug 2015 15:19:34 +0200 Subject: [PATCH 3/7] Adds styles to moderation admin --- app/assets/stylesheets/admin.scss | 17 +++++-- app/assets/stylesheets/participacion.scss | 3 +- .../moderation/comments_controller.rb | 2 +- .../moderation/debates_controller.rb | 2 +- app/models/comment.rb | 2 +- app/models/debate.rb | 2 +- app/views/moderation/_menu.html.erb | 12 ++--- app/views/moderation/comments/index.html.erb | 50 +++++++++++-------- app/views/moderation/debates/index.html.erb | 47 +++++++++-------- config/locales/moderation.en.yml | 18 +++---- config/locales/moderation.es.yml | 19 ++++--- 11 files changed, 99 insertions(+), 75 deletions(-) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index f62b5efd6..5afa088d1 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -151,11 +151,16 @@ body.admin { .verified { color: $check; + + a { + border-bottom: 1px dotted $check; + color: $check; + font-size: rem-calc(12); + } } -.verified a { - border-bottom: 1px dotted $check; - color: $check; +.archived { + color: $text-medium; font-size: rem-calc(12); } @@ -163,6 +168,12 @@ body.admin { color: $delete; } +.date { + color: $text-medium; + font-size: rem-calc(12); + font-style: italic; +} + .level { font-size: rem-calc(12); } diff --git a/app/assets/stylesheets/participacion.scss b/app/assets/stylesheets/participacion.scss index b3ee7046a..619f25d48 100644 --- a/app/assets/stylesheets/participacion.scss +++ b/app/assets/stylesheets/participacion.scss @@ -135,6 +135,7 @@ h1, h2, h3, h4, h5, h6 { } .sub-nav dt, .sub-nav dd, .sub-nav li { + padding: rem-calc(3) 0; &.active { background: #008CBA; @@ -142,7 +143,7 @@ h1, h2, h3, h4, h5, h6 { color: white; cursor: default; font-weight: normal; - padding: 0.16667rem 0.88889rem; + padding: rem-calc(3) rem-calc(14); a:hover { color: #737373; diff --git a/app/controllers/moderation/comments_controller.rb b/app/controllers/moderation/comments_controller.rb index 03667e286..6434c708e 100644 --- a/app/controllers/moderation/comments_controller.rb +++ b/app/controllers/moderation/comments_controller.rb @@ -31,7 +31,7 @@ class Moderation::CommentsController < Moderation::BaseController end def set_valid_filters - @valid_filters = %w{all pending_review reviewed} + @valid_filters = %w{all pending_review archived} end def parse_filter diff --git a/app/controllers/moderation/debates_controller.rb b/app/controllers/moderation/debates_controller.rb index 22e4eac6b..89360ddaa 100644 --- a/app/controllers/moderation/debates_controller.rb +++ b/app/controllers/moderation/debates_controller.rb @@ -31,7 +31,7 @@ class Moderation::DebatesController < Moderation::BaseController end def set_valid_filters - @valid_filters = %w{all pending_review reviewed} + @valid_filters = %w{all pending_review archived} end def parse_filter diff --git a/app/models/comment.rb b/app/models/comment.rb index 824f1dbf0..0fa84dc6e 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -19,7 +19,7 @@ class Comment < ActiveRecord::Base scope :sorted_for_moderation, -> { order(inappropiate_flags_count: :desc, updated_at: :desc) } scope :pending_review, -> { where(reviewed_at: nil, hidden_at: nil) } - scope :reviewed, -> { where("reviewed_at IS NOT NULL AND hidden_at IS NULL") } + scope :archived, -> { where("reviewed_at IS NOT NULL AND hidden_at IS NULL") } scope :flagged_as_inappropiate, -> { where("inappropiate_flags_count > 0") } def self.build(commentable, user, body) diff --git a/app/models/debate.rb b/app/models/debate.rb index c16048f70..e31a82a85 100644 --- a/app/models/debate.rb +++ b/app/models/debate.rb @@ -25,7 +25,7 @@ class Debate < ActiveRecord::Base scope :sorted_for_moderation, -> { order(inappropiate_flags_count: :desc, updated_at: :desc) } scope :pending_review, -> { where(reviewed_at: nil, hidden_at: nil) } - scope :reviewed, -> { where("reviewed_at IS NOT NULL AND hidden_at IS NULL") } + scope :archived, -> { where("reviewed_at IS NOT NULL AND hidden_at IS NULL") } scope :flagged_as_inappropiate, -> { where("inappropiate_flags_count > 0") } # Ahoy setup diff --git a/app/views/moderation/_menu.html.erb b/app/views/moderation/_menu.html.erb index 41e84287a..d7c76b31a 100644 --- a/app/views/moderation/_menu.html.erb +++ b/app/views/moderation/_menu.html.erb @@ -4,17 +4,17 @@ <%= t("moderation.dashboard.index.title") %> -
  • > +
  • > <%= link_to moderation_debates_path do %> - - <%= t('moderation.menu.flagged_debates') %> + + <%= t("moderation.menu.flagged_debates") %> <% end %>
  • -
  • > +
  • > <%= link_to moderation_comments_path do %> - - <%= t('moderation.menu.flagged_comments') %> + + <%= t("moderation.menu.flagged_comments") %> <% end %>
  • diff --git a/app/views/moderation/comments/index.html.erb b/app/views/moderation/comments/index.html.erb index 0d89114f1..02b503497 100644 --- a/app/views/moderation/comments/index.html.erb +++ b/app/views/moderation/comments/index.html.erb @@ -1,45 +1,52 @@ -

    <%= t('moderation.comments.index.title') %>

    +

    <%= t("moderation.comments.index.title") %>

    + +

    <%= page_entries_info @comments %>

    - - - - - + + + + <% @comments.each do |comment| %> - - - - - + + + <% if can? :mark_as_reviewed, comment %> <% end %> <% if comment.reviewed? %> - <% end %> @@ -47,4 +54,3 @@
    <%= t('moderation.comments.index.headers.flags') %><%= t('moderation.comments.index.headers.updated_at') %><%= t('moderation.comments.index.headers.commentable_type') %><%= t('moderation.comments.index.headers.commentable') %><%= t('moderation.comments.index.headers.comment') %> + <%= t("moderation.comments.index.headers.commentable") %> |  + <%= t("moderation.comments.index.headers.commentable_type") %> |  + <%= t("moderation.comments.index.headers.updated_at") %> + <%= t("moderation.comments.index.headers.comment") %><%= t("moderation.comments.index.headers.flags") %><%= t("moderation.debates.index.headers.actions") %>
    <%= comment.inappropiate_flags_count %><%= l comment.updated_at.to_date %><%= comment.commentable_type.constantize.model_name.human %><%= link_to comment.commentable.title, comment.commentable %><%= comment.body %> - <%= link_to t('moderation.comments.index.hide'), hide_in_moderation_screen_moderation_comment_path(comment, request.query_parameters), method: :put %> + <%= link_to comment.commentable.title, comment.commentable %> +
    + <%= comment.commentable_type.constantize.model_name.human %> + <%= l comment.updated_at.to_date %> +
    <%= comment.body %><%= comment.inappropiate_flags_count %> + <%= link_to t("moderation.comments.index.hide"), hide_in_moderation_screen_moderation_comment_path(comment, request.query_parameters), method: :put, class: "delete" %> - <%= link_to t('moderation.comments.index.mark_as_reviewed'), mark_as_reviewed_moderation_comment_path(comment, request.query_parameters), method: :put %> + <%= link_to t("moderation.comments.index.archive"), mark_as_reviewed_moderation_comment_path(comment, request.query_parameters), method: :put, class: "button radius tiny warning" %> - <%= t('moderation.comments.index.reviewed') %> + + <%= t("moderation.comments.index.archived") %>
    <%= paginate @comments %> - diff --git a/app/views/moderation/debates/index.html.erb b/app/views/moderation/debates/index.html.erb index 611f68e16..68de5807d 100644 --- a/app/views/moderation/debates/index.html.erb +++ b/app/views/moderation/debates/index.html.erb @@ -1,43 +1,51 @@ -

    <%= t('moderation.debates.index.title') %>

    +

    <%= t("moderation.debates.index.title") %>

    + +

    <%= page_entries_info @debates %>

    - - - - + + + <% @debates.each do |debate| %> - - - - + + <% if can? :mark_as_reviewed, debate %> <% end %> <% if debate.reviewed? %> - <% end %> @@ -45,4 +53,3 @@
    <%= t('moderation.debates.index.headers.flags') %><%= t('moderation.debates.index.headers.updated_at') %><%= t('moderation.debates.index.headers.title') %><%= t('moderation.debates.index.headers.description') %> + <%= t("moderation.debates.index.headers.title") %> |  + <%= t("moderation.debates.index.headers.updated_at") %> |  + <%= t("moderation.debates.index.headers.description") %> + <%= t("moderation.debates.index.headers.flags") %><%= t("moderation.debates.index.headers.actions") %>
    <%= debate.inappropiate_flags_count %><%= l debate.updated_at.to_date %><%= link_to debate.title, debate %><%= debate.description %> - <%= link_to t('moderation.debates.index.hide'), hide_in_moderation_screen_moderation_debate_path(debate, request.query_parameters), method: :put %> + <%= link_to debate.title, debate, target: "_blank" %> +
    + <%= l debate.updated_at.to_date %> +
    + <%= debate.description %> +
    <%= debate.inappropiate_flags_count %> + <%= link_to t("moderation.debates.index.hide"), hide_in_moderation_screen_moderation_debate_path(debate, request.query_parameters), method: :put, class: "delete" %> - <%= link_to t('moderation.debates.index.mark_as_reviewed'), mark_as_reviewed_moderation_debate_path(debate, request.query_parameters), method: :put %> + <%= link_to t("moderation.debates.index.archive"), mark_as_reviewed_moderation_debate_path(debate, request.query_parameters), method: :put, class: "button radius tiny warning" %> - <%= t('moderation.debates.index.reviewed') %> + + <%= t("moderation.debates.index.archived") %>
    <%= paginate @debates %> - diff --git a/config/locales/moderation.en.yml b/config/locales/moderation.en.yml index 2728f10d9..7688dfa09 100644 --- a/config/locales/moderation.en.yml +++ b/config/locales/moderation.en.yml @@ -8,7 +8,7 @@ en: title: Moderation comments: index: - title: Comments flagged as inappropiate + title: Comments flagged as inappropriate headers: flags: Flags updated_at: Date @@ -16,27 +16,27 @@ en: commentable: Root comment: Comment hide: Hide - mark_as_reviewed: Mark as reviewed - reviewed: Reviewed + archive: Archive + archived: Archived filter: Filter filters: all: All pending_review: Pending - reviewed: Reviewed + archived: Archived debates: index: - title: Debates flagged as inappropiate + title: Debates flagged as inappropriate headers: flags: Flags updated_at: Date title: Title description: Description + actions: Actions hide: Hide - mark_as_reviewed: Mark as reviewed - reviewed: Reviewed + archive: Archive + archived: Archived filter: Filter filters: all: All pending_review: Pending - reviewed: Reviewed - + archived: Archived diff --git a/config/locales/moderation.es.yml b/config/locales/moderation.es.yml index 2afaec7a9..61d6b5f5c 100644 --- a/config/locales/moderation.es.yml +++ b/config/locales/moderation.es.yml @@ -8,7 +8,7 @@ es: title: Moderación comments: index: - title: Comentarios Denunciados como Inapropiados + title: Comentarios denunciados como inapropiados headers: flags: Denuncias updated_at: Fecha @@ -16,28 +16,27 @@ es: commentable: Raíz comment: Comentario hide: Ocultar - mark_as_reviewed: Marcar como revisado - reviewed: Revisado + archive: Archivar + archived: Archivado filter: Filtrar filters: all: Todos pending_review: Pendientes - reviewed: Revisados + archived: Archivados debates: index: - title: Debates Denunciados como Inapropiados + title: Debates denunciados como inapropiados headers: flags: Denuncias updated_at: Fecha title: Título description: Descripción + actions: Acciones hide: Ocultar - mark_as_reviewed: Marcar como revisado - reviewed: Revisado + archive: Archivar + archived: Archivado filter: Filtrar filters: all: Todos pending_review: Pendientes - reviewed: Revisados - - + archived: Archivados From 8bdf03c50d17dd5ad2c9ee19a7b7cbff87fe4ef0 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Tue, 25 Aug 2015 16:02:36 +0200 Subject: [PATCH 4/7] Changes some test for moderation --- .../_flag_as_inappropiate_actions.html.erb | 4 +-- config/locales/en.yml | 2 +- spec/features/comments_spec.rb | 14 +++++----- spec/features/moderation/comments_spec.rb | 28 +++++++++---------- spec/features/moderation/debates_spec.rb | 28 +++++++++---------- 5 files changed, 38 insertions(+), 38 deletions(-) diff --git a/app/views/comments/_flag_as_inappropiate_actions.html.erb b/app/views/comments/_flag_as_inappropiate_actions.html.erb index 0b62715e3..07440f600 100644 --- a/app/views/comments/_flag_as_inappropiate_actions.html.erb +++ b/app/views/comments/_flag_as_inappropiate_actions.html.erb @@ -5,7 +5,7 @@ <% end %> @@ -17,7 +17,7 @@ <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 55e06af4e..98ac387fc 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -134,7 +134,7 @@ en: shared: tags_cloud: tags: Topics - flag_as_inappropiate: Flag as inappropiate + flag_as_inappropiate: Flag as inappropriate undo_flag_as_inappropiate: Undo flag collective: Collective mailer: diff --git a/spec/features/comments_spec.rb b/spec/features/comments_spec.rb index 4ed16d915..b1b09a777 100644 --- a/spec/features/comments_spec.rb +++ b/spec/features/comments_spec.rb @@ -133,7 +133,7 @@ feature 'Comments' do expect(page).to have_css(".comment.comment.comment.comment.comment.comment.comment.comment") end - scenario "Flagging as inappropiate", :js do + scenario "Flagging as inappropriate", :js do user = create(:user) debate = create(:debate) comment = create(:comment, commentable: debate) @@ -142,15 +142,15 @@ feature 'Comments' do visit debate_path(debate) within "#comment_#{comment.id}" do - expect(page).to_not have_link "Undo flag as inappropiate" - click_on 'Flag as inappropiate' - expect(page).to have_link "Undo flag as inappropiate" + expect(page).to_not have_link "Undo flag as inappropriate" + click_on 'Flag as inappropriate' + expect(page).to have_link "Undo flag as inappropriate" end expect(InappropiateFlag.flagged?(user, comment)).to be end - scenario "Undoing flagging as inappropiate", :js do + scenario "Undoing flagging as inappropriate", :js do user = create(:user) debate = create(:debate) comment = create(:comment, commentable: debate) @@ -160,9 +160,9 @@ feature 'Comments' do visit debate_path(debate) within "#comment_#{comment.id}" do - expect(page).to_not have_link("Flag as inappropiate", exact: true) + expect(page).to_not have_link("Flag as inappropriate", exact: true) click_on 'Undo flag as inappropiate' - expect(page).to have_link("Flag as inappropiate", exact: true) + expect(page).to have_link("Flag as inappropriate", exact: true) end expect(InappropiateFlag.flagged?(user, comment)).to_not be diff --git a/spec/features/moderation/comments_spec.rb b/spec/features/moderation/comments_spec.rb index 5a4100f77..91ed0b083 100644 --- a/spec/features/moderation/comments_spec.rb +++ b/spec/features/moderation/comments_spec.rb @@ -104,43 +104,43 @@ feature 'Moderate Comments' do visit moderation_comments_path expect(page).to_not have_link('All') expect(page).to have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') visit moderation_comments_path(filter: 'all') expect(page).to_not have_link('All') expect(page).to have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') visit moderation_comments_path(filter: 'pending_review') expect(page).to have_link('All') expect(page).to_not have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') - visit moderation_comments_path(filter: 'reviewed') + visit moderation_comments_path(filter: 'archived') expect(page).to have_link('All') expect(page).to have_link('Pending') - expect(page).to_not have_link('Reviewed') + expect(page).to_not have_link('Archived') end scenario "Filtering comments" do create(:comment, :flagged_as_inappropiate, body: "Pending comment") create(:comment, :flagged_as_inappropiate, :hidden, body: "Hidden comment") - create(:comment, :flagged_as_inappropiate, :reviewed, body: "Reviewed comment") + create(:comment, :flagged_as_inappropiate, :reviewed, body: "Archived comment") visit moderation_comments_path(filter: 'all') expect(page).to have_content('Pending comment') expect(page).to_not have_content('Hidden comment') - expect(page).to have_content('Reviewed comment') + expect(page).to have_content('Archived comment') visit moderation_comments_path(filter: 'pending_review') expect(page).to have_content('Pending comment') expect(page).to_not have_content('Hidden comment') - expect(page).to_not have_content('Reviewed comment') + expect(page).to_not have_content('Archived comment') - visit moderation_comments_path(filter: 'reviewed') + visit moderation_comments_path(filter: 'archived') expect(page).to_not have_content('Pending comment') expect(page).to_not have_content('Hidden comment') - expect(page).to have_content('Reviewed comment') + expect(page).to have_content('Archived comment') end scenario "Reviewing links remember the pagination setting and the filter" do @@ -149,7 +149,7 @@ feature 'Moderate Comments' do visit moderation_comments_path(filter: 'pending_review', page: 2) - click_link('Mark as reviewed', match: :first) + click_link('Archive', match: :first) uri = URI.parse(current_url) query_params = Rack::Utils.parse_nested_query(uri.query).symbolize_keys @@ -172,7 +172,7 @@ feature 'Moderate Comments' do expect(page).to have_content('spammy spam') expect(page).to have_content('1') expect(page).to have_link('Hide') - expect(page).to have_link('Mark as reviewed') + expect(page).to have_link('Archive') end end @@ -189,13 +189,13 @@ feature 'Moderate Comments' do scenario 'Marking the comment as reviewed' do within("#comment_#{@comment.id}") do - click_link('Mark as reviewed') + click_link('Archive') end expect(current_path).to eq(moderation_comments_path) within("#comment_#{@comment.id}") do - expect(page).to have_content('Reviewed') + expect(page).to have_content('Archived') end expect(@comment.reload).to be_reviewed diff --git a/spec/features/moderation/debates_spec.rb b/spec/features/moderation/debates_spec.rb index 1ea3101e0..9a2dfbd24 100644 --- a/spec/features/moderation/debates_spec.rb +++ b/spec/features/moderation/debates_spec.rb @@ -47,43 +47,43 @@ feature 'Moderate debates' do visit moderation_debates_path expect(page).to_not have_link('All') expect(page).to have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') visit moderation_debates_path(filter: 'all') expect(page).to_not have_link('All') expect(page).to have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') visit moderation_debates_path(filter: 'pending_review') expect(page).to have_link('All') expect(page).to_not have_link('Pending') - expect(page).to have_link('Reviewed') + expect(page).to have_link('Archived') - visit moderation_debates_path(filter: 'reviewed') + visit moderation_debates_path(filter: 'archived') expect(page).to have_link('All') expect(page).to have_link('Pending') - expect(page).to_not have_link('Reviewed') + expect(page).to_not have_link('Archived') end scenario "Filtering debates" do create(:debate, :flagged_as_inappropiate, title: "Pending debate") create(:debate, :flagged_as_inappropiate, :hidden, title: "Hidden debate") - create(:debate, :flagged_as_inappropiate, :reviewed, title: "Reviewed debate") + create(:debate, :flagged_as_inappropiate, :reviewed, title: "Archived debate") visit moderation_debates_path(filter: 'all') expect(page).to have_content('Pending debate') expect(page).to_not have_content('Hidden debate') - expect(page).to have_content('Reviewed debate') + expect(page).to have_content('Archived debate') visit moderation_debates_path(filter: 'pending_review') expect(page).to have_content('Pending debate') expect(page).to_not have_content('Hidden debate') - expect(page).to_not have_content('Reviewed debate') + expect(page).to_not have_content('Archived debate') - visit moderation_debates_path(filter: 'reviewed') + visit moderation_debates_path(filter: 'archived') expect(page).to_not have_content('Pending debate') expect(page).to_not have_content('Hidden debate') - expect(page).to have_content('Reviewed debate') + expect(page).to have_content('Archived debate') end scenario "Reviewing links remember the pagination setting and the filter" do @@ -92,7 +92,7 @@ feature 'Moderate debates' do visit moderation_debates_path(filter: 'pending_review', page: 2) - click_link('Mark as reviewed', match: :first) + click_link('Archive', match: :first) uri = URI.parse(current_url) query_params = Rack::Utils.parse_nested_query(uri.query).symbolize_keys @@ -114,7 +114,7 @@ feature 'Moderate debates' do expect(page).to have_content('buy buy buy') expect(page).to have_content('1') expect(page).to have_link('Hide') - expect(page).to have_link('Mark as reviewed') + expect(page).to have_link('Archive') end end @@ -131,13 +131,13 @@ feature 'Moderate debates' do scenario 'Marking the debate as reviewed' do within("#debate_#{@debate.id}") do - click_link('Mark as reviewed') + click_link('Archive') end expect(current_path).to eq(moderation_debates_path) within("#debate_#{@debate.id}") do - expect(page).to have_content('Reviewed') + expect(page).to have_content('Archived') end expect(@debate.reload).to be_reviewed From 5eeb89584b6563a9de58fd1769d7d9328cd19ba2 Mon Sep 17 00:00:00 2001 From: kikito Date: Wed, 26 Aug 2015 13:14:07 +0200 Subject: [PATCH 5/7] Fixes a couple specs which fail with the new words (ArchiveD vs Archive) --- spec/features/moderation/comments_spec.rb | 2 +- spec/features/moderation/debates_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/features/moderation/comments_spec.rb b/spec/features/moderation/comments_spec.rb index 91ed0b083..ba40598d8 100644 --- a/spec/features/moderation/comments_spec.rb +++ b/spec/features/moderation/comments_spec.rb @@ -149,7 +149,7 @@ feature 'Moderate Comments' do visit moderation_comments_path(filter: 'pending_review', page: 2) - click_link('Archive', match: :first) + click_link('Archive', match: :first, exact: true) uri = URI.parse(current_url) query_params = Rack::Utils.parse_nested_query(uri.query).symbolize_keys diff --git a/spec/features/moderation/debates_spec.rb b/spec/features/moderation/debates_spec.rb index 9a2dfbd24..d27a5b9fc 100644 --- a/spec/features/moderation/debates_spec.rb +++ b/spec/features/moderation/debates_spec.rb @@ -92,7 +92,7 @@ feature 'Moderate debates' do visit moderation_debates_path(filter: 'pending_review', page: 2) - click_link('Archive', match: :first) + click_link('Archive', match: :first, exact: true) uri = URI.parse(current_url) query_params = Rack::Utils.parse_nested_query(uri.query).symbolize_keys From 015fe704e4afcaab689e7f07cdb6d5a2ba3e0ff1 Mon Sep 17 00:00:00 2001 From: kikito Date: Wed, 26 Aug 2015 13:14:42 +0200 Subject: [PATCH 6/7] Fixes flagging specs by making them id-based instead of text-based --- .../_flag_as_inappropiate_actions.html.erb | 12 ++++++------ .../_flag_as_inappropiate_actions.html.erb | 12 ++++++------ spec/features/comments_spec.rb | 16 +++++++++------- spec/features/debates_spec.rb | 14 ++++++++------ 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/app/views/comments/_flag_as_inappropiate_actions.html.erb b/app/views/comments/_flag_as_inappropiate_actions.html.erb index 07440f600..9fba8b5b2 100644 --- a/app/views/comments/_flag_as_inappropiate_actions.html.erb +++ b/app/views/comments/_flag_as_inappropiate_actions.html.erb @@ -1,23 +1,23 @@ <% if can? :flag_as_inappropiate, comment %>  |  - -