Commit 650e745c authored by samuel.mortenson's avatar samuel.mortenson Committed by Samuel Mortenson

Issue #3030854 by samuel.mortenson, swentel: Add route for main entry in menu...

Issue #3030854 by samuel.mortenson, swentel: Add route for main entry in menu and update admin paths.
parent 7171577a
......@@ -34,14 +34,14 @@ class TomeStaticPreviewTest extends BrowserTestBase {
file_prepare_directory($directory, FILE_CREATE_DIRECTORY);
file_put_contents($directory . '/index.html', '<html><body>Hello world!</body></html>');
$this->drupalGet('/admin/tome/static/preview');
$this->drupalGet('/admin/config/tome/static/preview');
$this->submitForm([], 'Preview');
$assert_session = $this->assertSession();
$assert_session->pageTextContains('Request path not present in the static build.');
$this->drupalGet('/foo');
$assert_session->pageTextContains('Hello world!');
$this->clickLink('Exit preview');
$assert_session->addressEquals('/admin/tome/static/preview');
$assert_session->addressEquals('/admin/config/tome/static/preview');
}
}
tome_static.main:
route_name: system.admin_config
route_name: tome_static.main
parent: system.admin_config
title: 'Tome Static'
......
tome_static.main:
path: '/admin/config/tome/static'
defaults:
_controller: '\Drupal\system\Controller\SystemController::systemAdminMenuBlockPage'
_title: 'Tome Static'
requirements:
_permission: 'use tome static'
tome_static.generate:
path: '/admin/tome/static/generate'
path: '/admin/config/tome/static/generate'
defaults:
_form: 'Drupal\tome_static\Form\StaticGeneratorForm'
_title: 'Generate static site'
......@@ -7,7 +15,7 @@ tome_static.generate:
_permission: 'use tome static'
tome_static.download_page:
path: '/admin/tome/static/download'
path: '/admin/config/tome/static/download'
defaults:
_controller: 'Drupal\tome_static\Controller\StaticDownloadController::build'
_title: 'Download static site'
......@@ -15,7 +23,7 @@ tome_static.download_page:
_permission: 'use tome static'
tome_static.download:
path: '/admin/tome/static/download-archive'
path: '/admin/config/tome/static/download-archive'
defaults:
_controller: 'Drupal\tome_static\Controller\StaticDownloadController::download'
_title: 'Download export'
......@@ -24,7 +32,7 @@ tome_static.download:
_custom_access: 'Drupal\tome_static\Controller\StaticDownloadController::downloadAccess'
tome_static.preview_form:
path: '/admin/tome/static/preview'
path: '/admin/config/tome/static/preview'
defaults:
_form: 'Drupal\tome_static\Form\StaticPreviewForm'
_title: 'Preview static site'
......@@ -32,7 +40,7 @@ tome_static.preview_form:
_permission: 'use tome static'
tome_static.preview_exit:
path: '/admin/tome/static/preview-exit'
path: '/admin/config/tome/static/preview-exit'
defaults:
_controller: 'Drupal\tome_static\Controller\StaticPreviewController::build'
_title: 'Exit static site preview'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment