Skip to content

Commit

Permalink
Move integration tests for 9+ permissions apps
Browse files Browse the repository at this point in the history
These are the tests for granting permissions for apps with nine or more
permissions. Instead of making the account and users updating
permissions specs really long and duplicative, I opted for having a
single spec with a grantee who could either be the current user or
another user. The tests here are even more alike between namespaces than
tests for apps with eight or fewer permissions, which had some variation
based on permissions/context
  • Loading branch information
yndajas committed Sep 9, 2024
1 parent 57febe8 commit e85de94
Show file tree
Hide file tree
Showing 5 changed files with 227 additions and 675 deletions.
287 changes: 0 additions & 287 deletions test/integration/account/access_and_permissions_test.rb

This file was deleted.

52 changes: 2 additions & 50 deletions test/integration/account/updating_permissions_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
require "test_helper"

class Account::UpdatingPermissionsTest < ActionDispatch::IntegrationTest
# See also: UpdatingPermissionsForAppsWithManyPermissionsTest

context "for all apps" do
setup do
@application = create(:application)
Expand Down Expand Up @@ -93,54 +95,4 @@ class Account::UpdatingPermissionsTest < ActionDispatch::IntegrationTest
end
end
end

context "with apps that have greater than eight permissions" do
should "be able to grant permissions" do
skip
end

context "when the grantee already has some but not all permissions" do
should "display the new and current permissions forms" do
skip
end
end

context "when the grantee has all permissions" do
should "only display the current permissions form" do
skip
end
end

context "when the grantee has no permissions" do
should "only display the new permissions form" do
skip
end
end

context "with JavaScript enabled" do
should "be able to grant permissions" do
skip
end

should "grant permissions then redirect back to the form when clicking 'Add'" do
skip
end

should "reset the value of the select element when it no longer matches what's shown in the autocomplete input" do
skip
end

should "clear the value of the select and autocomplete elements when clicking the clear button" do
skip
end

should "clear the value of the select and autocomplete elements when hitting space on the clear button" do
skip
end

should "clear the value of the select and autocomplete elements when hitting enter on the clear button" do # include 9+ perm tests in this spec but just cover admin context
skip
end
end
end
end
Loading

0 comments on commit e85de94

Please sign in to comment.