Update system tests for report link changes
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 28 Mar 2018 02:38:11 +0000 (10:38 +0800)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 28 Mar 2018 03:05:46 +0000 (11:05 +0800)
test/system/report_anonymous_note_test.rb
test/system/report_diary_entry_test.rb

index 07621ab..d8f52d1 100644 (file)
@@ -6,7 +6,7 @@ class ReportAnonymousNoteTest < ApplicationSystemTestCase
     visit browse_note_path(note)
     assert page.has_content?(note.comments.first.body)
 
-    assert !page.has_content?("\u2690")
+    assert !page.has_content?(I18n.t("browse.note.report"))
   end
 
   def test_can_report_anonymous_notes
@@ -14,7 +14,7 @@ class ReportAnonymousNoteTest < ApplicationSystemTestCase
     sign_in_as(create(:user))
     visit browse_note_path(note)
 
-    click_on "\u2690"
+    click_on I18n.t("browse.note.report")
     assert page.has_content? "Report"
     assert page.has_content? I18n.t("issues.new.disclaimer.intro")
 
index e926238..41fba96 100644 (file)
@@ -10,7 +10,7 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase
     visit diary_entry_path(@diary_entry.user.display_name, @diary_entry)
     assert page.has_content?(@diary_entry.title)
 
-    assert !page.has_content?("\u2690")
+    assert !page.has_content?(I18n.t("diary_entry.diary_entry.report"))
   end
 
   def test_it_works
@@ -18,7 +18,7 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase
     visit diary_entry_path(@diary_entry.user.display_name, @diary_entry)
     assert page.has_content? @diary_entry.title
 
-    click_on "\u2690"
+    click_on I18n.t("diary_entry.diary_entry.report")
     assert page.has_content? "Report"
     assert page.has_content? I18n.t("issues.new.disclaimer.intro")
 
@@ -37,7 +37,7 @@ class ReportDiaryEntryTest < ApplicationSystemTestCase
     visit diary_entry_path(@diary_entry.user.display_name, @diary_entry)
     assert page.has_content? @diary_entry.title
 
-    click_on "\u2690"
+    click_on I18n.t("diary_entry.diary_entry.report")
     assert page.has_content? "Report"
     assert page.has_content? I18n.t("issues.new.disclaimer.intro")