From 81d6c9a0bc122b56c1864d1a0730c731372ee0a7 Mon Sep 17 00:00:00 2001 From: Judeeeee <43412616+Judeeeee@users.noreply.github.com> Date: Sat, 6 Jul 2024 22:44:27 +0900 Subject: [PATCH] =?UTF-8?q?=E7=84=A1=E6=96=99=E3=81=AE=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E5=89=8A=E9=99=A4=E3=81=AB=E4=BC=B4=E3=81=86=E3=83=86=E3=82=B9?= =?UTF-8?q?=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/system/admin/users_test.rb | 6 ++++++ test/system/current_user_test.rb | 11 ----------- test/system/mentor_mode_test.rb | 8 ++++++++ 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/test/system/admin/users_test.rb b/test/system/admin/users_test.rb index 5957066edb6..2257e5dc197 100644 --- a/test/system/admin/users_test.rb +++ b/test/system/admin/users_test.rb @@ -366,4 +366,10 @@ class Admin::UsersTest < ApplicationSystemTestCase visit_with_auth "/admin/users/#{user.id}/edit", 'komagata' assert has_checked_field?('user_hide_mentor_profile', visible: false) end + + test 'not display free checkbox on user edit page' do + user = users(:muryou) + visit_with_auth "/admin/users/#{user.id}/edit", 'komagata' + assert_no_selector 'label.a-block-check__label.is-ta-left[for="user_free]', text: '無料' + end end diff --git a/test/system/current_user_test.rb b/test/system/current_user_test.rb index 60e0d4317cb..3dd7074203b 100644 --- a/test/system/current_user_test.rb +++ b/test/system/current_user_test.rb @@ -128,17 +128,6 @@ class CurrentUserTest < ApplicationSystemTestCase assert_match user.reload.graduated_on.to_s, '2022-05-01' end - test 'update admin user\'s free' do - user = users(:komagata) - - visit_with_auth '/current_user/edit', 'komagata' - check '無料', allow_label_click: true - - click_on '更新する' - - assert user.reload.free - end - test 'update admin user\'s github_collaborator' do user = users(:komagata) diff --git a/test/system/mentor_mode_test.rb b/test/system/mentor_mode_test.rb index 5bcfdd74a8b..11bcfc60d38 100644 --- a/test/system/mentor_mode_test.rb +++ b/test/system/mentor_mode_test.rb @@ -28,4 +28,12 @@ class MentorModeTest < ApplicationSystemTestCase visit_with_auth user_path(users(:hatsuno)), 'kimura' assert_no_text 'ユーザーメモ' end + + test 'not display user billing status is free' do + user = users(:muryou) + visit_with_auth "/users/#{user.id}/", 'mentormentaro' + within('.user-metas.is-only-mentor') do + assert_no_text '無料' + end + end end