$bookUrl = $book->getUrl();
$this->actingAs($this->viewer)
->visit($bookUrl)
- ->dontSeeInElement('.action-buttons', 'New Page')
- ->dontSeeInElement('.action-buttons', 'New Chapter');
+ ->dontSeeInElement('.actions', 'New Page')
+ ->dontSeeInElement('.actions', 'New Chapter');
$this->actingAs($this->user)
->visit($bookUrl)
- ->seeInElement('.action-buttons', 'New Page')
- ->seeInElement('.action-buttons', 'New Chapter');
+ ->seeInElement('.actions', 'New Page')
+ ->seeInElement('.actions', 'New Chapter');
$this->setEntityRestrictions($book, ['view', 'delete', 'update']);
->see('You do not have permission')->seePageIs('/');
$this->forceVisit($bookUrl . '/create-page')
->see('You do not have permission')->seePageIs('/');
- $this->visit($bookUrl)->dontSeeInElement('.action-buttons', 'New Page')
- ->dontSeeInElement('.action-buttons', 'New Chapter');
+ $this->visit($bookUrl)->dontSeeInElement('.actions', 'New Page')
+ ->dontSeeInElement('.actions', 'New Chapter');
$this->setEntityRestrictions($book, ['view', 'create']);
->type('test content', 'html')
->press('Save Page')
->seePageIs($bookUrl . '/page/test-page');
- $this->visit($bookUrl)->seeInElement('.action-buttons', 'New Page')
- ->seeInElement('.action-buttons', 'New Chapter');
+ $this->visit($bookUrl)->seeInElement('.actions', 'New Page')
+ ->seeInElement('.actions', 'New Chapter');
}
public function test_book_update_restriction()
$chapterUrl = $chapter->getUrl();
$this->actingAs($this->user)
->visit($chapterUrl)
- ->seeInElement('.action-buttons', 'New Page');
+ ->seeInElement('.actions', 'New Page');
$this->setEntityRestrictions($chapter, ['view', 'delete', 'update']);
$this->forceVisit($chapterUrl . '/create-page')
->see('You do not have permission')->seePageIs('/');
- $this->visit($chapterUrl)->dontSeeInElement('.action-buttons', 'New Page');
+ $this->visit($chapterUrl)->dontSeeInElement('.actions', 'New Page');
$this->setEntityRestrictions($chapter, ['view', 'create']);
->press('Save Page')
->seePageIs($chapter->book->getUrl() . '/page/test-page');
- $this->visit($chapterUrl)->seeInElement('.action-buttons', 'New Page');
+ $this->visit($chapterUrl)->seeInElement('.actions', 'New Page');
}
public function test_chapter_update_restriction()
$bookUrl = $book->getUrl();
$this->actingAs($this->viewer)
->visit($bookUrl)
- ->dontSeeInElement('.action-buttons', 'New Page')
- ->dontSeeInElement('.action-buttons', 'New Chapter');
+ ->dontSeeInElement('.actions', 'New Page')
+ ->dontSeeInElement('.actions', 'New Chapter');
$this->setEntityRestrictions($book, ['view', 'delete', 'update']);
->see('You do not have permission')->seePageIs('/');
$this->forceVisit($bookUrl . '/create-page')
->see('You do not have permission')->seePageIs('/');
- $this->visit($bookUrl)->dontSeeInElement('.action-buttons', 'New Page')
- ->dontSeeInElement('.action-buttons', 'New Chapter');
+ $this->visit($bookUrl)->dontSeeInElement('.actions', 'New Page')
+ ->dontSeeInElement('.actions', 'New Chapter');
$this->setEntityRestrictions($book, ['view', 'create']);
->type('test content', 'html')
->press('Save Page')
->seePageIs($bookUrl . '/page/test-page');
- $this->visit($bookUrl)->seeInElement('.action-buttons', 'New Page')
- ->seeInElement('.action-buttons', 'New Chapter');
+ $this->visit($bookUrl)->seeInElement('.actions', 'New Page')
+ ->seeInElement('.actions', 'New Chapter');
}
public function test_book_update_restriction_override()
{
$firstBook = Book::first();
$secondBook = Book::find(2);
- $thirdBook = Book::find(3);
$this->setEntityRestrictions($firstBook, ['view', 'update']);
$this->setEntityRestrictions($secondBook, ['view']);
- $this->setEntityRestrictions($thirdBook, ['view', 'update']);
// Test sort page visibility
$this->actingAs($this->user)->visit($secondBook->getUrl() . '/sort')
->seePageIs('/');
// Check sort page on first book
- $this->actingAs($this->user)->visit($firstBook->getUrl() . '/sort')
- ->see($thirdBook->name)
- ->dontSee($secondBook->name);
+ $this->actingAs($this->user)->visit($firstBook->getUrl() . '/sort');
}
public function test_book_sort_permission() {