-
-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/redesign-admin
* develop: Add recognition to BrowserStack in the README (#11546) Remove unused view hook for `:upcoming_meeting_for_card` (#11543) Remove unused dependency: `wicked` (#11150) Clean-up initiatives signature URLs and methods (#11545) Refactor initiative signing wizard (#10731) Fix Permissions screen on budgets throw errors (#11532) Redesign: read more literal (#11516) Fix 'download your data' when there are comments on budgets (#11531)
- Loading branch information
Showing
29 changed files
with
234 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
decidim-budgets/spec/system/admin_manages_project_permissions_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# frozen_string_literal: true | ||
|
||
require "spec_helper" | ||
|
||
describe "Admin manages project permissions", type: :system do | ||
let(:manifest_name) { "budgets" } | ||
let(:budget) { create(:budget, component: current_component) } | ||
let!(:project) { create(:project, budget:) } | ||
|
||
include_context "when managing a component as an admin" | ||
|
||
before do | ||
switch_to_host(organization.host) | ||
login_as user, scope: :user | ||
visit_component_admin | ||
within find("tr", text: translated(budget.title)) do | ||
page.find(".action-icon--edit-projects").click | ||
end | ||
within find("tr", text: translated(project.title)) do | ||
page.find(".action-icon--permissions").click | ||
end | ||
end | ||
|
||
it "Saves the permissions" do | ||
expect(page).to have_content("Edit permissions") | ||
|
||
within find("fieldset", text: "Vote") do | ||
page.check("Example authorization (Direct)") | ||
end | ||
click_button "Submit" | ||
expect(page).to have_content("Permissions updated successfully") | ||
within find("tr", text: translated(budget.title)) do | ||
page.find(".action-icon--edit-projects").click | ||
end | ||
within find("tr", text: translated(project.title)) do | ||
expect(page).to have_css(".action-icon--highlighted") | ||
page.find(".action-icon--permissions").click | ||
end | ||
within find("fieldset", text: "Vote") do | ||
expect(page).to have_checked_field("Example authorization (Direct)") | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.