1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

Added listing of editor type to revisions

- Also tweaked some editor revision table styles and merged some
  sections to reduce space usage.
This commit is contained in:
Dan Brown
2022-04-23 15:03:58 +01:00
parent 1b46aa8756
commit bec61a56c0
3 changed files with 41 additions and 12 deletions

View File

@@ -203,4 +203,19 @@ class PageRevisionTest extends TestCase
$revisionCount = $page->revisions()->count();
$this->assertEquals(12, $revisionCount);
}
public function test_revision_list_shows_editor_type()
{
/** @var Page $page */
$page = Page::first();
$this->asAdmin()->put($page->getUrl(), ['name' => 'Updated page', 'html' => 'new page html']);
$resp = $this->get($page->refresh()->getUrl('/revisions'));
$resp->assertElementContains('td', '(WYSIWYG)');
$resp->assertElementNotContains('td', '(Markdown)');
$this->asAdmin()->put($page->getUrl(), ['name' => 'Updated page', 'markdown' => '# Some markdown content']);
$resp = $this->get($page->refresh()->getUrl('/revisions'));
$resp->assertElementContains('td', '(Markdown)');
}
}