From afdf65dec9d49004571d00a9a8baa3ec0e6550f8 Mon Sep 17 00:00:00 2001 From: taitus Date: Fri, 16 May 2025 13:02:10 +0200 Subject: [PATCH] Remove unnecessary tests and expectations related with loading-bar These expectations are already covered by attach_new_file, so they are no longer needed: > expect(page).to have_css ".loading-bar.complete" We can remove the tests: > "Should update loading bar style after invalid file upload" because the expectation: > expect(page).to have_css ".loading-bar.errors" It is already tested in "Should not update document cached_attachment field after invalid file upload" --- spec/system/nested_documentable_spec.rb | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/spec/system/nested_documentable_spec.rb b/spec/system/nested_documentable_spec.rb index 975ce3d61..7d236042d 100644 --- a/spec/system/nested_documentable_spec.rb +++ b/spec/system/nested_documentable_spec.rb @@ -111,24 +111,6 @@ describe "Nested documentable" do expect(page).to have_field("Title", with: "My Title") end - scenario "Should update loading bar style after valid file upload" do - do_login_for(user, management: management_section?(path)) - visit path - - documentable_attach_new_file(file_fixture("empty.pdf")) - - expect(page).to have_css ".loading-bar.complete" - end - - scenario "Should update loading bar style after invalid file upload" do - do_login_for(user, management: management_section?(path)) - visit path - - documentable_attach_new_file(file_fixture("logo_header.gif"), success: false) - - expect(page).to have_css ".loading-bar.errors" - end - scenario "Should update document cached_attachment field after valid file upload" do do_login_for(user, management: management_section?(path)) visit path