Extract dashboard_action from shared nested documentable spec to system specs
Removed 'documentable_path_arguments' and 'management' parameters because they are not used by dashboard_action. Also moved and renamed the 'documentable_fill_new_valid_dashboard_action' method from the common actions helper to this file, since it is now only used here. Hardcoded 'path', 'submit_button_text', and 'notice_text' for dashboard_action. These remain fixed for now until dynamic values are required in future commits.
This commit is contained in:
@@ -201,8 +201,7 @@ shared_examples "nested documentable" do |login_as_name, documentable_factory_na
|
||||
expect(page).to have_content documentable_success_notice
|
||||
end
|
||||
|
||||
scenario "Should show new document after successful creation with one uploaded file",
|
||||
unless: documentable_factory_name == "dashboard_action" do
|
||||
scenario "Should show new document after successful creation with one uploaded file" do
|
||||
do_login_for user_to_login, management: management
|
||||
visit send(path, arguments)
|
||||
send(fill_resource_method_name) if fill_resource_method_name
|
||||
@@ -223,7 +222,7 @@ shared_examples "nested documentable" do |login_as_name, documentable_factory_na
|
||||
end
|
||||
|
||||
scenario "Should show resource with new document after successful creation with
|
||||
maximum allowed uploaded files", unless: documentable_factory_name == "dashboard_action" do
|
||||
maximum allowed uploaded files" do
|
||||
do_login_for user_to_login, management: management
|
||||
visit send(path, arguments)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user