Skip to content

Commit

Permalink
ユーザー一覧の絞り込みタブのシステムテストを効率化
Browse files Browse the repository at this point in the history
  • Loading branch information
unikounio committed Apr 24, 2024
1 parent 6617b06 commit debd573
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/system/users_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,7 @@ class UsersTest < ApplicationSystemTestCase
visit_with_auth '/users', 'komagata'
click_link '現役 + 研修生'

assert_selector('a.tab-nav__item-link.is-active', text: '現役 + 研修生')
assert_text '現役 + 研修生'
assert_selector('h1.page-main-header__title', text: '現役 + 研修生')
filtered_users = all('.users-item__icon .a-user-role')
assert(filtered_users.all? do |user|
classes = user[:class].split(' ')
Expand All @@ -668,8 +667,7 @@ class UsersTest < ApplicationSystemTestCase
visit_with_auth '/users', 'komagata'
click_link '現役生'

assert_selector('a.tab-nav__item-link.is-active', text: '現役生')
assert_text '現役生'
assert_selector('h1.page-main-header__title', text: '現役生')
filtered_users = all('.users-item__icon .a-user-role')
assert(filtered_users.all? { |user| user[:class].split(' ').include?('is-student') })
end
Expand Down

0 comments on commit debd573

Please sign in to comment.