diff --git a/app/helpers/admin/new_document_helper.rb b/app/helpers/admin/new_document_helper.rb index 29a46e3148b..453cca4a07c 100644 --- a/app/helpers/admin/new_document_helper.rb +++ b/app/helpers/admin/new_document_helper.rb @@ -20,7 +20,7 @@ def new_document_type_list .select { |edition_type| can?(:create, edition_type) } .map do |edition_type| title_value = edition_type.name.underscore - title_label = title_value.humanize + title_label = title_value.gsub("editionable_", "").humanize { value: title_value, text: title_label, diff --git a/app/models/editionable_topical_event.rb b/app/models/editionable_topical_event.rb index 55ca636c0fd..21f905102c4 100644 --- a/app/models/editionable_topical_event.rb +++ b/app/models/editionable_topical_event.rb @@ -2,4 +2,8 @@ class EditionableTopicalEvent < Edition def display_type_key "editionable_topical_event" end + + def self.format_name + "topical event" + end end diff --git a/features/support/document_helper.rb b/features/support/document_helper.rb index 4b0c8f39e0d..277812775e1 100644 --- a/features/support/document_helper.rb +++ b/features/support/document_helper.rb @@ -18,7 +18,7 @@ def begin_drafting_document(options) create(:organisation) if Organisation.count.zero? visit admin_root_path find("li.app-c-sub-navigation__list-item a", text: "New document").click - page.choose(options[:type].humanize) + page.choose(options[:type].gsub("editionable_", "").humanize) click_button("Next") if options[:locale]