From aae3cd69d7b3820aeff1c5fb40cd73b1cc84f4fd Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Mon, 24 Jan 2022 18:23:16 +0000 Subject: [PATCH] Added test to cover PR #3177 --- tests/Entity/PageTest.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/Entity/PageTest.php b/tests/Entity/PageTest.php index 32459a84a..1d7806047 100644 --- a/tests/Entity/PageTest.php +++ b/tests/Entity/PageTest.php @@ -261,6 +261,21 @@ class PageTest extends TestCase ->assertElementContains('.entity-list .page:nth-child(1)', $content['page']->name); } + public function test_recently_updated_pages_view_shows_updated_by_details() + { + $user = $this->getEditor(); + /** @var Page $page */ + $page = Page::query()->first(); + + $this->actingAs($user)->put($page->getUrl(), [ + 'name' => 'Updated title', + 'html' => '

Updated content

', + ]); + + $resp = $this->asAdmin()->get('/pages/recently-updated'); + $resp->assertElementContains('.entity-list .page:nth-child(1)', 'Updated 1 second ago by ' . $user->name); + } + public function test_recently_updated_pages_on_home() { /** @var Page $page */