}
public function test_draft_content_shows_if_available()
{
$addedContent = '<p>test message content</p>';
}
public function test_draft_content_shows_if_available()
{
$addedContent = '<p>test message content</p>';
->dontSeeInField('html', $addedContent);
$newContent = $this->page->html . $addedContent;
->dontSeeInField('html', $addedContent);
$newContent = $this->page->html . $addedContent;
- $this->entityRepo->updatePageDraft($this->page, ['html' => $newContent]);
- $this->asAdmin()->visit($this->page->getUrl() . '/edit')
+ $this->pageRepo->updatePageDraft($this->page, ['html' => $newContent]);
+ $this->asAdmin()->visit($this->page->getUrl('/edit'))
->seeInField('html', $newContent);
}
public function test_draft_not_visible_by_others()
{
$addedContent = '<p>test message content</p>';
->seeInField('html', $newContent);
}
public function test_draft_not_visible_by_others()
{
$addedContent = '<p>test message content</p>';
->dontSeeInField('html', $addedContent);
$newContent = $this->page->html . $addedContent;
$newUser = $this->getEditor();
->dontSeeInField('html', $addedContent);
$newContent = $this->page->html . $addedContent;
$newUser = $this->getEditor();
- $this->entityRepo->updatePageDraft($this->page, ['html' => $newContent]);
- $this->actingAs($newUser)->visit($this->page->getUrl() . '/edit')
+ $this->pageRepo->updatePageDraft($this->page, ['html' => $newContent]);
+
+ $this->actingAs($newUser)->visit($this->page->getUrl('/edit'))
->dontSeeInField('html', $newContent);
}
public function test_alert_message_shows_if_editing_draft()
{
$this->asAdmin();
->dontSeeInField('html', $newContent);
}
public function test_alert_message_shows_if_editing_draft()
{
$this->asAdmin();
- $this->entityRepo->updatePageDraft($this->page, ['html' => 'test content']);
- $this->asAdmin()->visit($this->page->getUrl() . '/edit')
+ $this->pageRepo->updatePageDraft($this->page, ['html' => 'test content']);
+ $this->asAdmin()->visit($this->page->getUrl('/edit'))
->see('You are currently editing a draft');
}
public function test_alert_message_shows_if_someone_else_editing()
{
->see('You are currently editing a draft');
}
public function test_alert_message_shows_if_someone_else_editing()
{
->dontSeeInField('html', $addedContent);
$newContent = $this->page->html . $addedContent;
$newUser = $this->getEditor();
->dontSeeInField('html', $addedContent);
$newContent = $this->page->html . $addedContent;
$newUser = $this->getEditor();
$this->visit($nonEditedPage->getUrl() . '/edit')
->dontSeeInElement('.notification', 'Admin has started editing this page');
}
public function test_draft_pages_show_on_homepage()
{
$this->visit($nonEditedPage->getUrl() . '/edit')
->dontSeeInElement('.notification', 'Admin has started editing this page');
}
public function test_draft_pages_show_on_homepage()
{
$this->asAdmin()->visit('/')
->dontSeeInElement('#recent-drafts', 'New Page')
$this->asAdmin()->visit('/')
->dontSeeInElement('#recent-drafts', 'New Page')
->visit('/')
->seeInElement('#recent-drafts', 'New Page');
}
public function test_draft_pages_not_visible_by_others()
{
->visit('/')
->seeInElement('#recent-drafts', 'New Page');
}
public function test_draft_pages_not_visible_by_others()
{
$chapter = $book->chapters->first();
$newUser = $this->getEditor();
$this->actingAs($newUser)->visit('/')
$chapter = $book->chapters->first();
$newUser = $this->getEditor();
$this->actingAs($newUser)->visit('/')