diff --git a/modules/bim/spec/features/ifc_models/direct_ifc_upload_spec.rb b/modules/bim/spec/features/ifc_models/direct_ifc_upload_spec.rb index 5fc1902b554f..52e2187d7c46 100644 --- a/modules/bim/spec/features/ifc_models/direct_ifc_upload_spec.rb +++ b/modules/bim/spec/features/ifc_models/direct_ifc_upload_spec.rb @@ -36,12 +36,13 @@ context "when the file size exceeds the allowed maximum", with_settings: { attachment_max_size: 1 } do it "invalidates the form via JavaScript preventing submission" do - pending "This test is currently flaky due to an unknown reason" - visit new_bcf_project_ifc_model_path(project_id: project.identifier) page.attach_file("file", ifc_fixture.path, visible: :all) + expected_validation_message = I18n.t("activerecord.errors.messages.file_too_large", count: 1024) + expect(page).to have_field(type: "file", validation_message: expected_validation_message) + form_validity = page.evaluate_script <<~JS document .querySelector('#new_bim_ifc_models_ifc_model')