Skip to content

Commit

Permalink
Maintenance: Ported admin_permissions_granular_vs_full_test.rb to Cap…
Browse files Browse the repository at this point in the history
…ybara.
  • Loading branch information
mgruner committed Oct 8, 2021
1 parent 22cd8f3 commit 1de9c8d
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 78 deletions.
4 changes: 0 additions & 4 deletions .rubocop/todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -887,10 +887,6 @@ Metrics/PerceivedComplexity:
- 'test/browser_test_helper.rb'
- 'test/integration/slack_test.rb'

Rails/AssertNot:
Exclude:
- 'test/browser/admin_permissions_granular_vs_full_test.rb'

Rails/CreateTableWithTimestamps:
Exclude:
- 'db/migrate/20120101000001_create_base.rb'
Expand Down
6 changes: 0 additions & 6 deletions script/build/test_slice_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ if [ "$LEVEL" == '1' ]; then
rm test/browser/abb_one_group_test.rb
rm test/browser/admin_drag_drop_to_new_group_test.rb
rm test/browser/admin_overview_test.rb
rm test/browser/admin_permissions_granular_vs_full_test.rb
rm test/browser/admin_role_test.rb
# test/browser/agent_navigation_and_title_test.rb
# test/browser/agent_organization_profile_test.rb
Expand Down Expand Up @@ -68,7 +67,6 @@ elif [ "$LEVEL" == '2' ]; then
# test/browser/abb_one_group_test.rb
rm test/browser/admin_drag_drop_to_new_group_test.rb
rm test/browser/admin_overview_test.rb
rm test/browser/admin_permissions_granular_vs_full_test.rb
#rm test/browser/admin_role_test.rb
rm test/browser/agent_navigation_and_title_test.rb
rm test/browser/agent_organization_profile_test.rb
Expand Down Expand Up @@ -123,7 +121,6 @@ elif [ "$LEVEL" == '3' ]; then
# test/browser/abb_one_group_test.rb
rm test/browser/admin_drag_drop_to_new_group_test.rb
rm test/browser/admin_overview_test.rb
rm test/browser/admin_permissions_granular_vs_full_test.rb
rm test/browser/admin_role_test.rb
rm test/browser/agent_navigation_and_title_test.rb
rm test/browser/agent_organization_profile_test.rb
Expand Down Expand Up @@ -178,7 +175,6 @@ elif [ "$LEVEL" == '4' ]; then
# test/browser/abb_one_group_test.rb
rm test/browser/admin_drag_drop_to_new_group_test.rb
rm test/browser/admin_overview_test.rb
rm test/browser/admin_permissions_granular_vs_full_test.rb
rm test/browser/admin_role_test.rb
rm test/browser/agent_navigation_and_title_test.rb
rm test/browser/agent_organization_profile_test.rb
Expand Down Expand Up @@ -232,7 +228,6 @@ elif [ "$LEVEL" == '5' ]; then
# test/browser/abb_one_group_test.rb
# rm test/browser/admin_drag_drop_to_new_group_test.rb
# test/browser/admin_overview_test.rb
# rm test/browser/admin_permissions_granular_vs_full_test.rb
rm test/browser/admin_role_test.rb
rm test/browser/agent_navigation_and_title_test.rb
rm test/browser/agent_organization_profile_test.rb
Expand Down Expand Up @@ -289,7 +284,6 @@ elif [ "$LEVEL" == '6' ]; then
rm test/browser/abb_one_group_test.rb
rm test/browser/admin_drag_drop_to_new_group_test.rb
rm test/browser/admin_overview_test.rb
rm test/browser/admin_permissions_granular_vs_full_test.rb
rm test/browser/admin_role_test.rb
rm test/browser/agent_navigation_and_title_test.rb
rm test/browser/agent_organization_profile_test.rb
Expand Down
27 changes: 27 additions & 0 deletions spec/system/manage/users_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,33 @@ def switch_to(user)
end
end

context 'updating a user' do
before do
create(:admin)
end

it 'handles permission checkboxes correctly' do
visit '#manage/users'

within(:active_content) do
click 'table.user-list tbody tr:first-child'
end
in_modal disappears: false do
scroll_into_view 'table.settings-list'
within 'table.settings-list tbody tr:first-child' do
click 'input[value="full"]', visible: :all
expect(find('input[value="full"]', visible: :all).checked?).to be true
click 'input[value="read"]', visible: :all
expect(find('input[value="full"]', visible: :all).checked?).to be false
expect(find('input[value="read"]', visible: :all).checked?).to be true
click 'input[value="full"]', visible: :all
expect(find('input[value="full"]', visible: :all).checked?).to be true
expect(find('input[value="read"]', visible: :all).checked?).to be false
end
end
end
end

describe 'check user edit permissions', authenticated_as: -> { user } do

shared_examples 'user permission' do |allow|
Expand Down
68 changes: 0 additions & 68 deletions test/browser/admin_permissions_granular_vs_full_test.rb

This file was deleted.

0 comments on commit 1de9c8d

Please sign in to comment.