From 43718c23158ec039f81a9db0150482278dd091b4 Mon Sep 17 00:00:00 2001 From: Ian Monroe Date: Tue, 12 Sep 2023 11:00:26 -0600 Subject: [PATCH] Added tests --- .../acceptance/Media/MediaPermissionsCest.php | 12 ++++++++++++ tests/codeception/acceptance/Users/RolesCest.php | 1 + 2 files changed, 13 insertions(+) diff --git a/tests/codeception/acceptance/Media/MediaPermissionsCest.php b/tests/codeception/acceptance/Media/MediaPermissionsCest.php index c632ba6a2..79ef6ae4e 100644 --- a/tests/codeception/acceptance/Media/MediaPermissionsCest.php +++ b/tests/codeception/acceptance/Media/MediaPermissionsCest.php @@ -30,6 +30,18 @@ public function testAdminPerms(AcceptanceTester $I) { $I->canSee('Embed Code'); } + /** + * Test site embedder perms + */ + public function testSiteEmbedderPerms(AcceptanceTester $I) { + $user = $I->createUserWithRoles(['su_site_embedder', 'site_manager']); + $I->logInAs($user->getAccountName()); + $I->amOnPage('/media/add/embeddable'); + $I->canSeeResponseCodeIs(200); + $I->canSee('oEmbed URL'); + $I->canSee('Embed Code'); + } + /** * Test site manager perms */ diff --git a/tests/codeception/acceptance/Users/RolesCest.php b/tests/codeception/acceptance/Users/RolesCest.php index 6f4b7c752..d97224dad 100644 --- a/tests/codeception/acceptance/Users/RolesCest.php +++ b/tests/codeception/acceptance/Users/RolesCest.php @@ -19,6 +19,7 @@ public function testRolesExist(AcceptanceTester $I) { $I->canSee('Site Builder'); $I->canSee('Site Developer'); $I->canSee('Administrator'); + $I->canSee('Site Embedder'); } /**