Skip to content

Commit

Permalink
Merge pull request #3225 from fjordllc/revert-3207-feature/change_dis…
Browse files Browse the repository at this point in the history
…play_name_of_reports_follow_to_auto_watch

Revert "日報フォロー機能の表記を「自動Watch」に変更した"
  • Loading branch information
komagata authored Sep 5, 2021
2 parents 2194e5a + 54273ab commit 20929c1
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions app/javascript/following.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
},
computed: {
buttonLabel() {
return this.following ? '自動Watchを解除' : '日報を自動Watch'
return this.following ? 'フォローを解除' : '日報をフォロー'
},
url() {
return this.following
Expand All @@ -32,8 +32,8 @@ export default {
},
errorMessage() {
return this.following
? '自動Watch解除に失敗しました'
: '自動Watchに失敗しました'
? 'フォロー解除に失敗しました'
: 'フォローに失敗しました'
}
},
methods: {
Expand Down
2 changes: 1 addition & 1 deletion db/fixtures/notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ notification_following_report:
kind: 13
user: muryou
sender: kensyu
message: kensyuさんが日報【 自動Watchされた日報 】を書きました!
message: kensyuさんが日報【 フォローされた日報 】を書きました!
path: "/reports/<%= ActiveRecord::FixtureSet.identify(:report23) %>"
read: false

Expand Down
4 changes: 2 additions & 2 deletions db/fixtures/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ report22:

report23:
user: kensyu
title: 自動Watchされた日報
title: フォローされた日報
description:
自動Watchされました
フォローされました
reported_on: "2020-11-10"

report24:
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ notification_following_report:
kind: 13
user: muryou
sender: kensyu
message: kensyuさんが日報【 自動Watchされた日報 】を書きました!
message: kensyuさんが日報【 フォローされた日報 】を書きました!
path: "/reports/<%= ActiveRecord::FixtureSet.identify(:report23) %>"
read: false

Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ report22:

report23:
user: kensyu
title: 自動Watchされた日報
title: フォローされた日報
description:
自動Watchされました
フォローされました
reported_on: "2020-11-10"

report24:
Expand Down
2 changes: 1 addition & 1 deletion test/mailers/notification_mailer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class NotificationMailerTest < ActionMailer::TestCase
email = ActionMailer::Base.deliveries.last
assert_equal ['noreply@bootcamp.fjord.jp'], email.from
assert_equal ['muryou@fjord.jp'], email.to
assert_equal '[bootcamp] kensyuさんが日報【 自動Watchされた日報 】を書きました!', email.subject
assert_equal '[bootcamp] kensyuさんが日報【 フォローされた日報 】を書きました!', email.subject
assert_match(/日報/, email.body.to_s)
end

Expand Down
18 changes: 9 additions & 9 deletions test/system/followings_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@
class FollowingsTest < ApplicationSystemTestCase
test 'follow' do
visit_with_auth user_path(users(:hatsuno)), 'kimura'
click_button '日報を自動Watch'
assert_button '自動Watchを解除'
click_button '日報をフォロー'
assert_button 'フォローを解除'
end

test 'unfollow' do
visit_with_auth user_path(users(:hatsuno)), 'kimura'
click_button '日報を自動Watch'
click_button '自動Watchを解除'
assert_button '日報を自動Watch'
click_button '日報をフォロー'
click_button 'フォローを解除'
assert_button '日報をフォロー'
end

test 'show following lists' do
visit_with_auth user_path(users(:hatsuno)), 'kimura'
click_button '日報を自動Watch'
assert_text '自動Watchを解除'
click_button '日報をフォロー'
assert_text 'フォローを解除'
visit '/users?target=followings'
assert_text users(:hatsuno).login_name
end

test 'receive a notification when following user create a report' do
visit_with_auth user_path(users(:hatsuno)), 'kimura'
click_button '日報を自動Watch'
click_button '日報をフォロー'

visit_with_auth '/reports/new', 'hatsuno'
within('#new_report') do
Expand All @@ -49,7 +49,7 @@ class FollowingsTest < ApplicationSystemTestCase

test "receive a notification when following user's report has comment" do
visit_with_auth user_path(users(:hatsuno)), 'kimura'
click_button '日報を自動Watch'
click_button '日報をフォロー'

visit_with_auth '/reports/new', 'hatsuno'
within('#new_report') do
Expand Down
4 changes: 2 additions & 2 deletions test/system/notification/reports_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ def assert_notify_only_at_first_published_of_report(
)
end

test '初めて提出した時だけ、自動Watchされているユーザーに通知する' do
test '初めて提出した時だけ、フォローされているユーザーに通知する' do
following = Following.first
followed_user_login_name = User.find(following.followed_id).login_name
follower_user_login_name = User.find(following.follower_id).login_name
title = '初めて提出した時だけ'
description = '自動Watchされているユーザーに通知を飛ばす'
description = 'フォローされているユーザーに通知を飛ばす'
notification_message = make_write_report_notification_message(
followed_user_login_name, title
)
Expand Down

0 comments on commit 20929c1

Please sign in to comment.