Skip to content

Commit

Permalink
API Update code to reflect changes to LeftAndMain
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Dec 8, 2024
1 parent b3edae4 commit 7a33353
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/Controllers/CMSPageHistoryViewerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\HiddenField;
use SilverStripe\VersionedAdmin\Forms\HistoryViewerField;

Expand All @@ -29,9 +30,9 @@ class CMSPageHistoryViewerController extends CMSMain

private static $ignore_menuitem = true;

public function getEditForm($id = null, $fields = null)
public function getEditForm($id = null, $fields = null): Form
{
$record = $this->getRecord($id ?: $this->currentPageID());
$record = $this->getRecord($id ?: $this->currentRecordID());

$form = parent::getEditForm($id);
$form->addExtraClass('history-viewer__form');
Expand Down
1 change: 0 additions & 1 deletion tests/Behat/features/compare-mode.feature
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Feature: Compare mode
Given I click on "Content" in the header tabs
Then I fill in the "Content" HTML field with "<p>Hello universe</p>"
And I press the "Save" button
And I wait 3 seconds
And I click on the ".toast__close" element
And I click on "History" in the header tabs
And I wait for 3 seconds
Expand Down
6 changes: 3 additions & 3 deletions tests/Behat/features/list-view.feature
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Feature: View a list of versions
When I fill in the "Content" HTML field with "<p>Publish scenario</p>"
And I press the "Publish" button
And I wait 3 seconds
Then I should see a "Published 'Home' successfully." success toast
Then I should see a "Published Page "Home"" success toast
When I click on the ".toast__close" element
And I click on "History" in the header tabs
And I wait for 3 seconds
Expand All @@ -40,7 +40,7 @@ Feature: View a list of versions
When I fill in the "Content" HTML field with "<p>Save scenario</p>"
And I press the "Save" button
And I wait 3 seconds
Then I should see a "Saved 'Home' successfully." success toast
Then I should see a "Saved Page "Home"" success toast
When I click on the ".toast__close" element
And I click on "History" in the header tabs
And I wait for 3 seconds
Expand All @@ -55,7 +55,7 @@ Feature: View a list of versions
When I fill in the "Content" HTML field with "<p>Order scenario</p>"
And I press the "Publish" button
And I wait 3 seconds
Then I should see a "Published 'Home' successfully." success toast
Then I should see a "Published Page "Home"" success toast
When I click on the ".toast__close" element
And I click on "History" in the header tabs
And I wait for 3 seconds
Expand Down
2 changes: 1 addition & 1 deletion tests/Behat/features/restore-to-draft.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Feature: Restore to draft
Then I press the "Restore to draft" button
Then I should see "Successfully restored the page" in the "#Form_EditForm" element
When I go to "/admin/pages"
And I should see "MyPage" in the ".cms-tree [data-pagetype='Page']:nth-of-type(2).status-addedtodraft" element
And I should see "MyPage" in the ".cms-tree [data-recordtype='Page']:nth-of-type(2).status-addedtodraft" element

0 comments on commit 7a33353

Please sign in to comment.