diff --git a/tests/codeception/acceptance/Content/EventsSeriesCest.php b/tests/codeception/acceptance/Content/EventsSeriesCest.php index 7b101c89d..3a3dd90ab 100644 --- a/tests/codeception/acceptance/Content/EventsSeriesCest.php +++ b/tests/codeception/acceptance/Content/EventsSeriesCest.php @@ -63,9 +63,9 @@ public function testContentTypeExists(AcceptanceTester $I) { public function testContributorPerms(AcceptanceTester $I) { $I->logInWithRole('contributor'); - // Can create a node. + // D8CORE-4551: Can NOT create a node. $I->amOnPage('/node/add/stanford_event_series'); - $I->canSeeResponseCodeIs(200); + $I->canSeeResponseCodeIs(403); // Can not delete a node that is not theirs but can edit. $node = $this->createEventSeriesNode($I); diff --git a/tests/codeception/acceptance/Content/PolicyCest.php b/tests/codeception/acceptance/Content/PolicyCest.php index 2ffccf4a8..f16a3c060 100644 --- a/tests/codeception/acceptance/Content/PolicyCest.php +++ b/tests/codeception/acceptance/Content/PolicyCest.php @@ -42,6 +42,14 @@ public function testPolicyAccess(AcceptanceTester $I) { $I->logInWithRole('contributor'); $I->amOnPage('/node/add/stanford_policy'); $I->cantSee('Create a new book'); + // D8CORE-4551 - removed create policy permission for contributors + $I->canSee('Access Denied'); + $book = $I->createEntity([ + 'type' => 'stanford_policy', + 'su_policy_title' => $this->faker->words(2, TRUE) . '-baz-foo', + 'su_policy_auto_prefix' => 1, + ]); + $I->amOnPage($book->toUrl('edit-form')->toString()); // This indicates they can add to an existing book. $I->canSeeOptionIsSelected('Book', '- None -'); $I->cantSee('Policy Prefix'); @@ -63,7 +71,7 @@ public function testPolicyAccess(AcceptanceTester $I) { /** * Test book title changes. */ - public function testPolicyTitle(AcceptanceTester $I){ + public function testPolicyTitle(AcceptanceTester $I) { $title = $this->faker->words(4, TRUE) . ' foo bar'; $I->logInWithRole('administrator'); $I->amOnPage('/node/add/stanford_policy'); @@ -231,7 +239,7 @@ public function testPolicyHeirarcy(AcceptanceTester $I) { $I->canSee($chapter_two->label(), '.breadcrumb'); $I->canSee($article_one->label(), '.breadcrumb'); - $I->canSee( $data_formatter->format($fifteen_days_ago, 'custom', 'F d, Y', self::getTimezone())); + $I->canSee($data_formatter->format($fifteen_days_ago, 'custom', 'F d, Y', self::getTimezone())); $I->canSee($data_formatter->format($time, 'custom', 'F d, Y', self::getTimezone())); $I->canSee($authority);