diff --git a/config/install/node.type.landing_page.yml b/config/install/node.type.landing_page.yml index a792f84..60a5cf4 100644 --- a/config/install/node.type.landing_page.yml +++ b/config/install/node.type.landing_page.yml @@ -11,9 +11,9 @@ third_party_settings: parent: 'main:' wysiwyg_template: default_template: '' -name: 'Landing Page' +name: 'Standard Page' type: landing_page -description: 'Use Landing Page content type for custom landing pages.' +description: 'Used for all standard pages and content.' help: '' new_revision: true preview_mode: 1 diff --git a/tests/behat/features/fields.feature b/tests/behat/features/fields.feature index 367acce..2346084 100644 --- a/tests/behat/features/fields.feature +++ b/tests/behat/features/fields.feature @@ -305,3 +305,13 @@ Feature: Fields for Landing Page content type # This field can be "seen" but not visible. And I see field "field_landing_page_component[0][subform][field_customise][value]" And save screenshot + + @api @nosuggest + Scenario: Ensure that Landing Page is relabelled to Standard Page and Appropriate description has been added. + Given I am logged in as a user with the "editor" role + When I visit "node/add" + Then I see the text 'Standard Page' + And I see the text 'Used for all standard pages and content.' + When I visit "admin/content" + Then I select "Standard Page" from "edit-type" + And I press "Filter" diff --git a/tide_landing_page.install b/tide_landing_page.install index 8a4fb98..6cbf55e 100644 --- a/tide_landing_page.install +++ b/tide_landing_page.install @@ -2350,3 +2350,18 @@ function tide_landing_page_update_8040() { } } } + +/** + * Relabel Landing Page to Standard Page. + */ +function tide_landing_page_update_8041() { + $configEntity = \Drupal::entityTypeManager() + ->getStorage('node_type') + ->load('landing_page'); + if (!$configEntity) { + return NULL; + } + $configEntity->set('name', 'Standard Page'); + $configEntity->set('description', 'Used for all standard pages and content.'); + $configEntity->save(); +}