diff --git a/javascript/CMSMain.Tree.js b/javascript/CMSMain.Tree.js index 4b352cec..d3a3666c 100644 --- a/javascript/CMSMain.Tree.js +++ b/javascript/CMSMain.Tree.js @@ -20,7 +20,7 @@ '_class': 'class-' + val.ssclass, 'action': function(obj) { // TODO Fix hardcoding of link - $('.cms-container').loadPanel('admin/page/add/?ParentID=' + id + '&Type=' + val.ssclass); + $('.cms-container').loadPanel('admin/pages/add/?ParentID=' + id + '&Type=' + val.ssclass); } }; } @@ -31,7 +31,7 @@ 'label': ss.i18n._t('Tree.EditPage'), 'action': function(obj) { // TODO Fix hardcoding of link - $('.cms-container').loadPanel('admin/page/add/show/' + obj.data('id')); + $('.cms-container').loadPanel('admin/pages/add/show/' + obj.data('id')); } } }; @@ -41,7 +41,7 @@ 'label': ss.i18n._t('Tree.AddSubPage'), 'action': function(obj) { // TODO Fix hardcoding of link - $('.cms-container').loadPanel('admin/page/add/?ParentID=' + obj.data('id')); + $('.cms-container').loadPanel('admin/pages/add/?ParentID=' + obj.data('id')); }, 'submenu': allowedChildren }; diff --git a/tests/controller/CMSMainTest.php b/tests/controller/CMSMainTest.php index 9d4b7ee2..7e460940 100644 --- a/tests/controller/CMSMainTest.php +++ b/tests/controller/CMSMainTest.php @@ -62,7 +62,7 @@ class CMSMainTest extends FunctionalTest { //$this->assertRegexp('/Done: Published 4 pages/', $response->getBody()) /* - $response = Director::test("admin/page/publishitems", array( + $response = Director::test("admin/pages/publishitems", array( 'ID' => '' 'Title' => '' 'action_publish' => 'Save and publish', @@ -198,9 +198,9 @@ class CMSMainTest extends FunctionalTest { // with insufficient permissions $cmsUser->logIn(); - $this->get('admin/page/add'); + $this->get('admin/pages/add'); $response = $this->post( - 'admin/page/add/AddForm', + 'admin/pages/add/AddForm', array('ParentID' => '0', 'ClassName' => 'Page', 'Locale' => 'en_US', 'action_doAdd' => 1) ); // should redirect, which is a permission error @@ -208,10 +208,10 @@ class CMSMainTest extends FunctionalTest { // with correct permissions $rootEditUser->logIn(); - $response = $this->get('admin/page/add'); + $response = $this->get('admin/pages/add'); $response = $this->post( - 'admin/page/add/AddForm', + 'admin/pages/add/AddForm', array('ParentID' => '0', 'ClassName' => 'Page', 'Locale' => 'en_US', 'action_doAdd' => 1) ); diff --git a/tests/controller/CMSPageHistoryControllerTest.php b/tests/controller/CMSPageHistoryControllerTest.php index 8f0cc95b..c88013a5 100755 --- a/tests/controller/CMSPageHistoryControllerTest.php +++ b/tests/controller/CMSPageHistoryControllerTest.php @@ -85,7 +85,7 @@ class CMSPageHistoryControllerTest extends FunctionalTest { * @todo check highlighting for comparing pages. */ function testVersionsForm() { - $history = $this->get('admin/page/history/show/'. $this->page->ID); + $history = $this->get('admin/pages/history/show/'. $this->page->ID); $form = $this->cssParser()->getBySelector("#Form_VersionsForm"); $this->assertEquals(1, count($form)); @@ -102,7 +102,7 @@ class CMSPageHistoryControllerTest extends FunctionalTest { } function testVersionsFormTableContainsInformation() { - $history = $this->get('admin/page/history/show/'. $this->page->ID); + $history = $this->get('admin/pages/history/show/'. $this->page->ID); $form = $this->cssParser()->getBySelector("#Form_VersionsForm"); $rows = $form[0]->xpath("fieldset/table/tbody/tr"); @@ -127,7 +127,7 @@ class CMSPageHistoryControllerTest extends FunctionalTest { } function testVersionsFormSelectsUnpublishedCheckbox() { - $history = $this->get('admin/page/history/show/'. $this->page->ID); + $history = $this->get('admin/pages/history/show/'. $this->page->ID); $checkbox = $this->cssParser()->getBySelector("#Form_VersionsForm #ShowUnpublished input"); $this->assertThat($checkbox[0], $this->logicalNot($this->isNull())); @@ -136,7 +136,7 @@ class CMSPageHistoryControllerTest extends FunctionalTest { $this->assertThat($checked, $this->logicalNot($this->stringContains('checked'))); // viewing an unpublished - $history = $this->get('admin/page/history/show/'.$this->page->ID .'/'.$this->versionUnpublishedCheck); + $history = $this->get('admin/pages/history/show/'.$this->page->ID .'/'.$this->versionUnpublishedCheck); $checkbox = $this->cssParser()->getBySelector("#Form_VersionsForm #ShowUnpublished input"); $this->assertThat($checkbox[0], $this->logicalNot($this->isNull())); diff --git a/tests/search/CMSMainSearchFormTest.php b/tests/search/CMSMainSearchFormTest.php index 51fbd204..877edc87 100644 --- a/tests/search/CMSMainSearchFormTest.php +++ b/tests/search/CMSMainSearchFormTest.php @@ -9,7 +9,7 @@ class CMSMainSearchFormTest extends FunctionalTest { $this->session()->inst_set('loggedInAs', $this->idFromFixture('Member', 'admin')); $response = $this->get( - 'admin/page/SearchForm/?' . + 'admin/pages/SearchForm/?' . http_build_query(array( 'Title' => 'Page 10', 'FilterClass' => 'CMSSiteTreeFilter_Search',