Extract proposal new from shared nested imageable specs to system specs

Make `path`, `fill_resource_method_name`, `submit_button`, and
`imageable_success_notice` dynamic based on the factory.

Also adjusted the user. The proposals no longer require the user to be an
administrator but do require them to be a level 2 user.

Note that we are adding the Style/CaseLikeIf rubocop rule.
This commit is contained in:
taitus
2024-11-15 14:01:12 +01:00
parent fb98cb61ac
commit add50d68f6
4 changed files with 45 additions and 26 deletions

View File

@@ -1291,14 +1291,6 @@ describe "Proposals" do
it_behaves_like "imageable", "proposal", "proposal_path", { id: "id" }
it_behaves_like "nested imageable",
"proposal",
"new_proposal_path",
{},
"imageable_fill_new_valid_proposal",
"Create proposal",
"Proposal created successfully"
it_behaves_like "nested imageable",
"proposal",
"edit_proposal_path",