Skip to content

Commit

Permalink
Adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Jun 25, 2024
1 parent c1f72e8 commit 9642111
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
9 changes: 3 additions & 6 deletions tests/codeception/acceptance/AuthenticatedPermissionsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,12 @@ public function testPhpUploadInFavicon(AcceptanceTester $I) {
public function testPhpUploadInLogo(AcceptanceTester $I) {
$I->logInWithRole('administrator');
$I->amOnPage('/admin/appearance/settings');
$I->seeCheckboxIsChecked('#edit-default-logo');
$I->uncheckOption('#edit-default-logo');
$I->seeCheckboxIsChecked('Use the logo supplied by the theme');
$I->uncheckOption('Use the logo supplied by the theme');
$I->see('Upload logo image');
$I->attachFile('Upload logo image', 'injection.php');
$I->click('#edit-submit');
$I->click('Save configuration');
$I->see('Only files with the following extensions are allowed');
$I->see('The image file is invalid or the image type is not allowed.');
$I->checkOption('#edit-default-logo');
$I->click('#edit-submit');
}

/**
Expand Down
3 changes: 1 addition & 2 deletions tests/codeception/acceptance/Content/EventsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ public function testListIntro(AcceptanceTester $I) {
$I->click('Save');
$I->canSee('Events Importer has been', '.messages-list');

$I->amOnPage($event->toUrl('delete-form')->toString());
$I->click('Delete');
$event->delete();

$I->amOnPage($term->toUrl()->toString());
$I->canSee($term->label(), 'h1');
Expand Down
3 changes: 2 additions & 1 deletion tests/codeception/acceptance/Media/MediaFormsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ public function testFormAlters(AcceptanceTester $I) {
$I->click('Delete');
$I->seeInCurrentUrl('delete');
$I->click('Delete');
$I->dontSeeLink($name);
$I->click('Delete', 'form');
$I->seeInCurrentUrl('/admin/content/media');
$I->dontSeeLink($name);
}

}
2 changes: 2 additions & 0 deletions tests/codeception/acceptance/Users/RolesCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ public function testSiteEmbedderStacking(AcceptanceTester $I){
$I->fillField('Embed Code', '<div>This is an embed</div>');
$I->click('Save');
$I->canSee('error has been found');
$I->amOnPage('/user/logout');
$I->click('Log out', '#user-logout-confirm');

// Stack the site_embedder role.
$user = $I->createUserWithRoles(['site_manager', 'site_embedder']);
Expand Down

0 comments on commit 9642111

Please sign in to comment.