Use lazy lookups for translations in issues
This commit is contained in:
parent
5effa0a6d6
commit
2aca6920dc
13 changed files with 89 additions and 89 deletions
|
@ -10,7 +10,7 @@ class IssueCommentsController < ApplicationController
|
||||||
comment = @issue.comments.build(issue_comment_params)
|
comment = @issue.comments.build(issue_comment_params)
|
||||||
comment.user = current_user
|
comment.user = current_user
|
||||||
comment.save!
|
comment.save!
|
||||||
notice = t("issues.comment.comment_created")
|
notice = t(".comment_created")
|
||||||
reassign_issue(@issue) if params[:reassign]
|
reassign_issue(@issue) if params[:reassign]
|
||||||
redirect_to @issue, :notice => notice
|
redirect_to @issue, :notice => notice
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,7 +23,7 @@ class IssuesController < ApplicationController
|
||||||
@issues = @issues.where(:reported_user_id => @find_user.id)
|
@issues = @issues.where(:reported_user_id => @find_user.id)
|
||||||
else
|
else
|
||||||
@issues = @issues.none
|
@issues = @issues.none
|
||||||
flash.now[:warning] = t("issues.index.user_not_found")
|
flash.now[:warning] = t(".user_not_found")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ class IssuesController < ApplicationController
|
||||||
def resolve
|
def resolve
|
||||||
if @issue.resolve
|
if @issue.resolve
|
||||||
@issue.save!
|
@issue.save!
|
||||||
redirect_to @issue, :notice => t("issues.resolved")
|
redirect_to @issue, :notice => t(".resolved")
|
||||||
else
|
else
|
||||||
render :show
|
render :show
|
||||||
end
|
end
|
||||||
|
@ -59,7 +59,7 @@ class IssuesController < ApplicationController
|
||||||
if @issue.ignore
|
if @issue.ignore
|
||||||
@issue.updated_by = current_user.id
|
@issue.updated_by = current_user.id
|
||||||
@issue.save!
|
@issue.save!
|
||||||
redirect_to @issue, :notice => t("issues.ignored")
|
redirect_to @issue, :notice => t(".ignored")
|
||||||
else
|
else
|
||||||
render :show
|
render :show
|
||||||
end
|
end
|
||||||
|
@ -69,7 +69,7 @@ class IssuesController < ApplicationController
|
||||||
if @issue.reopen
|
if @issue.reopen
|
||||||
@issue.updated_by = current_user.id
|
@issue.updated_by = current_user.id
|
||||||
@issue.save!
|
@issue.save!
|
||||||
redirect_to @issue, :notice => t("issues.reopened")
|
redirect_to @issue, :notice => t(".reopened")
|
||||||
else
|
else
|
||||||
render :show
|
render :show
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,7 +9,7 @@ class ReportsController < ApplicationController
|
||||||
@report = Report.new
|
@report = Report.new
|
||||||
@report.issue = Issue.find_or_initialize_by(create_new_report_params)
|
@report.issue = Issue.find_or_initialize_by(create_new_report_params)
|
||||||
else
|
else
|
||||||
redirect_to root_path, :notice => t("reports.new.missing_params")
|
redirect_to root_path, :notice => t(".missing_params")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -20,9 +20,9 @@ class ReportsController < ApplicationController
|
||||||
if @report.save
|
if @report.save
|
||||||
@report.issue.save
|
@report.issue.save
|
||||||
@report.issue.reopen! unless @report.issue.open?
|
@report.issue.reopen! unless @report.issue.open?
|
||||||
redirect_to helpers.reportable_url(@report.issue.reportable), :notice => t("issues.create.successful_report")
|
redirect_to helpers.reportable_url(@report.issue.reportable), :notice => t(".successful_report")
|
||||||
else
|
else
|
||||||
redirect_to new_report_path(:reportable_type => @report.issue.reportable_type, :reportable_id => @report.issue.reportable_id), :notice => t("issues.create.provide_details")
|
redirect_to new_report_path(:reportable_type => @report.issue.reportable_type, :reportable_id => @report.issue.reportable_id), :notice => t(".provide_details")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<div class="comment">
|
<div class="comment">
|
||||||
<%= form_for @new_comment, url: issue_comments_path(@issue) do |f| %>
|
<%= form_for @new_comment, url: issue_comments_path(@issue) do |f| %>
|
||||||
<%= richtext_area :issue_comment, :body, :cols => 10, :rows => 8, :required => true %>
|
<%= richtext_area :issue_comment, :body, :cols => 10, :rows => 8, :required => true %>
|
||||||
<%= label_tag :reassign, t('issues.show.comments.reassign_param') %> <%= check_box_tag :reassign, true %>
|
<%= label_tag :reassign, t('.reassign_param') %> <%= check_box_tag :reassign, true %>
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<%= submit_tag 'Submit' %>
|
<%= submit_tag 'Submit' %>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
<%= form_tag(issues_path, :method => :get) do %>
|
<%= form_tag(issues_path, :method => :get) do %>
|
||||||
<p><%= t ".search_guidance" %></p>
|
<p><%= t ".search_guidance" %></p>
|
||||||
<%= select_tag :status, options_for_select(Issue.aasm.states.map(&:name).map{|state| [t("issues.states.#{state}"), state]}, params[:status]), :include_blank => t(".select_status"), :data => { :behavior => 'category_dropdown' } %>
|
<%= select_tag :status, options_for_select(Issue.aasm.states.map(&:name).map{|state| [t(".states.#{state}"), state]}, params[:status]), :include_blank => t(".select_status"), :data => { :behavior => 'category_dropdown' } %>
|
||||||
<%= select_tag :issue_type, options_for_select(@issue_types, params[:issue_type]), :include_blank => t(".select_type"), :data => { :behavior => 'category_dropdown' } %>
|
<%= select_tag :issue_type, options_for_select(@issue_types, params[:issue_type]), :include_blank => t(".select_type"), :data => { :behavior => 'category_dropdown' } %>
|
||||||
<%= text_field_tag :search_by_user, params[:search_by_user], placeholder: t(".reported_user") %>
|
<%= text_field_tag :search_by_user, params[:search_by_user], placeholder: t(".reported_user") %>
|
||||||
<%= select_tag :last_updated_by, options_for_select(@users.all.collect{|f| [f.display_name, f.id]} << [ t(".not_updated"), "nil"], params[:last_updated_by]), :include_blank => t(".select_last_updated_by"), :data => { :behavior => 'category_dropdown' } %>
|
<%= select_tag :last_updated_by, options_for_select(@users.all.collect{|f| [f.display_name, f.id]} << [ t(".not_updated"), "nil"], params[:last_updated_by]), :include_blank => t(".select_last_updated_by"), :data => { :behavior => 'category_dropdown' } %>
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @issues.each do |issue| %>
|
<% @issues.each do |issue| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= t "issues.states.#{issue.status}" %></td>
|
<td><%= t ".states.#{issue.status}" %></td>
|
||||||
<td><%= link_to t(".reports_count", :count => issue.reports_count), issue %></td>
|
<td><%= link_to t(".reports_count", :count => issue.reports_count), issue %></td>
|
||||||
<td><%= link_to reportable_title(issue.reportable), reportable_url(issue.reportable) %></td>
|
<td><%= link_to reportable_title(issue.reportable), reportable_url(issue.reportable) %></td>
|
||||||
<td><%= link_to issue.reported_user.display_name, user_path(issue.reported_user.display_name) if issue.reported_user %></td>
|
<td><%= link_to issue.reported_user.display_name, user_path(issue.reported_user.display_name) if issue.reported_user %></td>
|
||||||
|
|
|
@ -11,12 +11,12 @@
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<%= link_to t('issues.resolve'), resolve_issue_url(@issue), :method => :post if @issue.may_resolve? %>
|
<%= link_to t('.resolve'), resolve_issue_url(@issue), :method => :post if @issue.may_resolve? %>
|
||||||
<% if @issue.may_ignore? %>
|
<% if @issue.may_ignore? %>
|
||||||
| <%= link_to t('issues.ignore'), ignore_issue_url(@issue), :method => :post %>
|
| <%= link_to t('.ignore'), ignore_issue_url(@issue), :method => :post %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</p>
|
</p>
|
||||||
<p><%= link_to t('issues.reopen'), reopen_issue_url(@issue), :method => :post if @issue.may_reopen? %></p>
|
<p><%= link_to t('.reopen'), reopen_issue_url(@issue), :method => :post if @issue.may_reopen? %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="report-related-block">
|
<div class="report-related-block">
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="report-disclaimer">
|
<div class="report-disclaimer">
|
||||||
<%= t('issues.new.disclaimer.intro') %>
|
<%= t('.disclaimer.intro') %>
|
||||||
<ul>
|
<ul>
|
||||||
<li> <%= t('issues.new.disclaimer.not_just_mistake') %> </li>
|
<li> <%= t('.disclaimer.not_just_mistake') %> </li>
|
||||||
<li> <%= t('issues.new.disclaimer.unable_to_fix') %> </li>
|
<li> <%= t('.disclaimer.unable_to_fix') %> </li>
|
||||||
<li> <%= t('issues.new.disclaimer.resolve_with_user') %> </li>
|
<li> <%= t('.disclaimer.resolve_with_user') %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -20,19 +20,19 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class='form-row'>
|
<div class='form-row'>
|
||||||
<p><%= t('issues.new.select') %></p>
|
<p><%= t('.select') %></p>
|
||||||
<ul>
|
<ul>
|
||||||
<% Report.categories_for(@report.issue.reportable).each do |c| %>
|
<% Report.categories_for(@report.issue.reportable).each do |c| %>
|
||||||
<li>
|
<li>
|
||||||
<%= radio_button :report, :category, c %>
|
<%= radio_button :report, :category, c %>
|
||||||
<%= label_tag "report_category_#{c}", t("reports.categories.#{@report.issue.reportable.class.name.underscore}.#{c}") %> <br/>
|
<%= label_tag "report_category_#{c}", t(".categories.#{@report.issue.reportable.class.name.underscore}.#{c}") %> <br/>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='form-row'>
|
<div class='form-row'>
|
||||||
<%= text_area :report, :details, :cols => 20, :rows => 5, placeholder: t('issues.new.details'), required: true %>
|
<%= text_area :report, :details, :cols => 20, :rows => 5, placeholder: t('.details'), required: true %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='buttons'>
|
<div class='buttons'>
|
||||||
|
|
|
@ -963,10 +963,6 @@ en:
|
||||||
no_results: "No results found"
|
no_results: "No results found"
|
||||||
more_results: "More results"
|
more_results: "More results"
|
||||||
issues:
|
issues:
|
||||||
report: Report
|
|
||||||
resolve: Resolve
|
|
||||||
ignore: Ignore
|
|
||||||
reopen: Reopen
|
|
||||||
index:
|
index:
|
||||||
title: Issues
|
title: Issues
|
||||||
select_status: Select Status
|
select_status: Select Status
|
||||||
|
@ -989,21 +985,14 @@ en:
|
||||||
one: "1 Report"
|
one: "1 Report"
|
||||||
other: "%{count} Reports"
|
other: "%{count} Reports"
|
||||||
reported_item: Reported Item
|
reported_item: Reported Item
|
||||||
create:
|
states:
|
||||||
successful_report: Your report has been registered sucessfully
|
ignored: Ignored
|
||||||
provide_details: Please provide the required details
|
open: Open
|
||||||
|
resolved: Resolved
|
||||||
update:
|
update:
|
||||||
new_report: Your report has been registered sucessfully
|
new_report: Your report has been registered sucessfully
|
||||||
successful_update: Your report has been updated successfully
|
successful_update: Your report has been updated successfully
|
||||||
provide_details: Please provide the required details
|
provide_details: Please provide the required details
|
||||||
new:
|
|
||||||
details: Please provide some more details about the problem (required).
|
|
||||||
select: "Select a reason for your report:"
|
|
||||||
disclaimer:
|
|
||||||
intro: "Before sending your report to the site moderators, please ensure that:"
|
|
||||||
not_just_mistake: You are certain that the problem is not just a mistake
|
|
||||||
unable_to_fix: You are unable to fix the problem yourself or with the help of your fellow community members
|
|
||||||
resolve_with_user: You have already tried to resolve the problem with the user concerned
|
|
||||||
show:
|
show:
|
||||||
title: "%{status} Issue #%{issue_id}"
|
title: "%{status} Issue #%{issue_id}"
|
||||||
reports:
|
reports:
|
||||||
|
@ -1013,55 +1002,66 @@ en:
|
||||||
report_created_at: "First reported at %{datetime}"
|
report_created_at: "First reported at %{datetime}"
|
||||||
last_resolved_at: "Last resolved at %{datetime}"
|
last_resolved_at: "Last resolved at %{datetime}"
|
||||||
last_updated_at: "Last updated at %{datetime} by %{displayname}"
|
last_updated_at: "Last updated at %{datetime} by %{displayname}"
|
||||||
|
resolve: Resolve
|
||||||
|
ignore: Ignore
|
||||||
|
reopen: Reopen
|
||||||
reports_of_this_issue: Reports of this Issue
|
reports_of_this_issue: Reports of this Issue
|
||||||
read_reports: Read Reports
|
read_reports: Read Reports
|
||||||
new_reports: New Reports
|
new_reports: New Reports
|
||||||
other_issues_against_this_user: Other issues against this user
|
other_issues_against_this_user: Other issues against this user
|
||||||
no_other_issues: No other issues against this user.
|
no_other_issues: No other issues against this user.
|
||||||
comments_on_this_issue: Comments on this issue
|
comments_on_this_issue: Comments on this issue
|
||||||
comments:
|
resolve:
|
||||||
reassign_param: Reassign Issue?
|
resolved: Issue status has been set to 'Resolved'
|
||||||
comment:
|
ignore:
|
||||||
provide_details: Please provide the required details
|
ignored: Issue status has been set to 'Ignored'
|
||||||
comment_created: Your comment was successfully created
|
reopen:
|
||||||
|
reopened: Issue status has been set to 'Open'
|
||||||
comments:
|
comments:
|
||||||
created_at: "On %{datetime}"
|
created_at: "On %{datetime}"
|
||||||
|
reassign_param: Reassign Issue?
|
||||||
reports:
|
reports:
|
||||||
updated_at: "On %{datetime}"
|
updated_at: "On %{datetime}"
|
||||||
reported_by_html: "Reported as %{category} by %{user}"
|
reported_by_html: "Reported as %{category} by %{user}"
|
||||||
resolved: Issue status has been set to 'Resolved'
|
issue_comments:
|
||||||
ignored: Issue status has been set to 'Ignored'
|
create:
|
||||||
reopened: Issue status has been set to 'Open'
|
comment_created: Your comment was successfully created
|
||||||
states:
|
|
||||||
ignored: Ignored
|
|
||||||
open: Open
|
|
||||||
resolved: Resolved
|
|
||||||
reports:
|
reports:
|
||||||
new:
|
new:
|
||||||
title_html: "Report %{link}"
|
title_html: "Report %{link}"
|
||||||
missing_params: "Cannot create a new report"
|
missing_params: "Cannot create a new report"
|
||||||
categories:
|
details: Please provide some more details about the problem (required).
|
||||||
diary_entry:
|
select: "Select a reason for your report:"
|
||||||
spam: This diary entry is/contains spam
|
disclaimer:
|
||||||
offensive: This diary entry is obscene/offensive
|
intro: "Before sending your report to the site moderators, please ensure that:"
|
||||||
threat: This diary entry contains a threat
|
not_just_mistake: You are certain that the problem is not just a mistake
|
||||||
other: Other
|
unable_to_fix: You are unable to fix the problem yourself or with the help of your fellow community members
|
||||||
diary_comment:
|
resolve_with_user: You have already tried to resolve the problem with the user concerned
|
||||||
spam: This diary comment is/contains spam
|
categories:
|
||||||
offensive: This diary comment is obscene/offensive
|
diary_entry:
|
||||||
threat: This diary comment contains a threat
|
spam: This diary entry is/contains spam
|
||||||
other: Other
|
offensive: This diary entry is obscene/offensive
|
||||||
user:
|
threat: This diary entry contains a threat
|
||||||
spam: This user profile is/contains spam
|
other: Other
|
||||||
offensive: This user profile is obscene/offensive
|
diary_comment:
|
||||||
threat: This user profile contains a threat
|
spam: This diary comment is/contains spam
|
||||||
vandal: This user is a vandal
|
offensive: This diary comment is obscene/offensive
|
||||||
other: Other
|
threat: This diary comment contains a threat
|
||||||
note:
|
other: Other
|
||||||
spam: This note is spam
|
user:
|
||||||
personal: This note contains personal data
|
spam: This user profile is/contains spam
|
||||||
abusive: This note is abusive
|
offensive: This user profile is obscene/offensive
|
||||||
other: Other
|
threat: This user profile contains a threat
|
||||||
|
vandal: This user is a vandal
|
||||||
|
other: Other
|
||||||
|
note:
|
||||||
|
spam: This note is spam
|
||||||
|
personal: This note contains personal data
|
||||||
|
abusive: This note is abusive
|
||||||
|
other: Other
|
||||||
|
create:
|
||||||
|
successful_report: Your report has been registered sucessfully
|
||||||
|
provide_details: Please provide the required details
|
||||||
layouts:
|
layouts:
|
||||||
project_name:
|
project_name:
|
||||||
# in <title>
|
# in <title>
|
||||||
|
|
|
@ -19,7 +19,7 @@ class IssuesTest < ApplicationSystemTestCase
|
||||||
sign_in_as(create(:moderator_user))
|
sign_in_as(create(:moderator_user))
|
||||||
|
|
||||||
visit issues_path
|
visit issues_path
|
||||||
assert page.has_content?(I18n.t(".issues.index.issues_not_found"))
|
assert page.has_content?(I18n.t("issues.index.issues_not_found"))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_view_issues
|
def test_view_issues
|
||||||
|
@ -53,19 +53,19 @@ class IssuesTest < ApplicationSystemTestCase
|
||||||
visit issues_path
|
visit issues_path
|
||||||
fill_in "search_by_user", :with => good_user.display_name
|
fill_in "search_by_user", :with => good_user.display_name
|
||||||
click_on "Search"
|
click_on "Search"
|
||||||
assert page.has_content?(I18n.t(".issues.index.issues_not_found"))
|
assert page.has_content?(I18n.t("issues.index.issues_not_found"))
|
||||||
|
|
||||||
# User doesn't exist
|
# User doesn't exist
|
||||||
visit issues_path
|
visit issues_path
|
||||||
fill_in "search_by_user", :with => "Nonexistant User"
|
fill_in "search_by_user", :with => "Nonexistant User"
|
||||||
click_on "Search"
|
click_on "Search"
|
||||||
assert page.has_content?(I18n.t(".issues.index.user_not_found"))
|
assert page.has_content?(I18n.t("issues.index.user_not_found"))
|
||||||
|
|
||||||
# Find Issue against bad_user
|
# Find Issue against bad_user
|
||||||
visit issues_path
|
visit issues_path
|
||||||
fill_in "search_by_user", :with => bad_user.display_name
|
fill_in "search_by_user", :with => bad_user.display_name
|
||||||
click_on "Search"
|
click_on "Search"
|
||||||
assert !page.has_content?(I18n.t(".issues.index.issues_not_found"))
|
assert !page.has_content?(I18n.t("issues.index.issues_not_found"))
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_commenting
|
def test_commenting
|
||||||
|
@ -76,7 +76,7 @@ class IssuesTest < ApplicationSystemTestCase
|
||||||
|
|
||||||
fill_in :issue_comment_body, :with => "test comment"
|
fill_in :issue_comment_body, :with => "test comment"
|
||||||
click_on "Submit"
|
click_on "Submit"
|
||||||
assert page.has_content?(I18n.t(".issues.comment.comment_created"))
|
assert page.has_content?(I18n.t("issue_comments.create.comment_created"))
|
||||||
assert page.has_content?("test comment")
|
assert page.has_content?("test comment")
|
||||||
|
|
||||||
issue.reload
|
issue.reload
|
||||||
|
@ -110,7 +110,7 @@ class IssuesTest < ApplicationSystemTestCase
|
||||||
|
|
||||||
visit issues_path
|
visit issues_path
|
||||||
|
|
||||||
assert page.has_link?(I18n.t(".issues.index.reports_count", :count => issue1.reports_count), :href => issue_path(issue1))
|
assert page.has_link?(I18n.t("issues.index.reports_count", :count => issue1.reports_count), :href => issue_path(issue1))
|
||||||
assert page.has_link?(I18n.t(".issues.index.reports_count", :count => issue2.reports_count), :href => issue_path(issue2))
|
assert page.has_link?(I18n.t("issues.index.reports_count", :count => issue2.reports_count), :href => issue_path(issue2))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -21,9 +21,9 @@ class ReportDiaryCommentTest < ApplicationSystemTestCase
|
||||||
|
|
||||||
click_on I18n.t("diary_entry.diary_comment.report")
|
click_on I18n.t("diary_entry.diary_comment.report")
|
||||||
assert page.has_content? "Report"
|
assert page.has_content? "Report"
|
||||||
assert page.has_content? I18n.t("issues.new.disclaimer.intro")
|
assert page.has_content? I18n.t("reports.new.disclaimer.intro")
|
||||||
|
|
||||||
choose I18n.t("reports.categories.diary_comment.spam")
|
choose I18n.t("reports.new.categories.diary_comment.spam")
|
||||||
fill_in "report_details", :with => "This comment is spam"
|
fill_in "report_details", :with => "This comment is spam"
|
||||||
click_on "Create Report"
|
click_on "Create Report"
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,9 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase
|
||||||
|
|
||||||
click_on I18n.t("diary_entry.diary_entry.report")
|
click_on I18n.t("diary_entry.diary_entry.report")
|
||||||
assert page.has_content? "Report"
|
assert page.has_content? "Report"
|
||||||
assert page.has_content? I18n.t("issues.new.disclaimer.intro")
|
assert page.has_content? I18n.t("reports.new.disclaimer.intro")
|
||||||
|
|
||||||
choose I18n.t("reports.categories.diary_entry.spam")
|
choose I18n.t("reports.new.categories.diary_entry.spam")
|
||||||
fill_in "report_details", :with => "This is advertising"
|
fill_in "report_details", :with => "This is advertising"
|
||||||
click_on "Create Report"
|
click_on "Create Report"
|
||||||
|
|
||||||
|
@ -39,9 +39,9 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase
|
||||||
|
|
||||||
click_on I18n.t("diary_entry.diary_entry.report")
|
click_on I18n.t("diary_entry.diary_entry.report")
|
||||||
assert page.has_content? "Report"
|
assert page.has_content? "Report"
|
||||||
assert page.has_content? I18n.t("issues.new.disclaimer.intro")
|
assert page.has_content? I18n.t("reports.new.disclaimer.intro")
|
||||||
|
|
||||||
choose I18n.t("reports.categories.diary_entry.spam")
|
choose I18n.t("reports.new.categories.diary_entry.spam")
|
||||||
fill_in "report_details", :with => "This is advertising"
|
fill_in "report_details", :with => "This is advertising"
|
||||||
click_on "Create Report"
|
click_on "Create Report"
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@ class ReportNoteTest < ApplicationSystemTestCase
|
||||||
|
|
||||||
click_on I18n.t("browse.note.report")
|
click_on I18n.t("browse.note.report")
|
||||||
assert page.has_content? "Report"
|
assert page.has_content? "Report"
|
||||||
assert page.has_content? I18n.t("issues.new.disclaimer.intro")
|
assert page.has_content? I18n.t("reports.new.disclaimer.intro")
|
||||||
|
|
||||||
choose I18n.t("reports.categories.note.spam")
|
choose I18n.t("reports.new.categories.note.spam")
|
||||||
fill_in "report_details", :with => "This is spam"
|
fill_in "report_details", :with => "This is spam"
|
||||||
click_on "Create Report"
|
click_on "Create Report"
|
||||||
|
|
||||||
|
@ -35,9 +35,9 @@ class ReportNoteTest < ApplicationSystemTestCase
|
||||||
|
|
||||||
click_on I18n.t("browse.note.report")
|
click_on I18n.t("browse.note.report")
|
||||||
assert page.has_content? "Report"
|
assert page.has_content? "Report"
|
||||||
assert page.has_content? I18n.t("issues.new.disclaimer.intro")
|
assert page.has_content? I18n.t("reports.new.disclaimer.intro")
|
||||||
|
|
||||||
choose I18n.t("reports.categories.note.spam")
|
choose I18n.t("reports.new.categories.note.spam")
|
||||||
fill_in "report_details", :with => "This is spam"
|
fill_in "report_details", :with => "This is spam"
|
||||||
click_on "Create Report"
|
click_on "Create Report"
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@ class ReportUserTest < ApplicationSystemTestCase
|
||||||
|
|
||||||
click_on I18n.t("user.view.report")
|
click_on I18n.t("user.view.report")
|
||||||
assert page.has_content? "Report"
|
assert page.has_content? "Report"
|
||||||
assert page.has_content? I18n.t("issues.new.disclaimer.intro")
|
assert page.has_content? I18n.t("reports.new.disclaimer.intro")
|
||||||
|
|
||||||
choose I18n.t("reports.categories.user.vandal")
|
choose I18n.t("reports.new.categories.user.vandal")
|
||||||
fill_in "report_details", :with => "This user is a vandal"
|
fill_in "report_details", :with => "This user is a vandal"
|
||||||
click_on "Create Report"
|
click_on "Create Report"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue