Skip to content

Commit

Permalink
add selector
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Oct 20, 2023
1 parent c5ce118 commit f7808db
Show file tree
Hide file tree
Showing 10 changed files with 86 additions and 14 deletions.
2 changes: 1 addition & 1 deletion tests/codeception/acceptance/Content/EventsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function testListIntro(AcceptanceTester $I) {
$I->amOnPage('/admin/config/importers/events-importer');
$I->fillField('No Results Message', $message);
$I->click('Save');
$I->canSee('Events Importer has been');
$I->canSee('Events Importer hs been', '.messages-list');

$I->amOnPage($event->toUrl('delete-form')->toString());
$I->click('Delete');
Expand Down
4 changes: 2 additions & 2 deletions tests/codeception/acceptance/Content/SearchBlockCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ public function testHideSearchBlock(AcceptanceTester $I) {
$I->selectOption('Organization', $org_term->id());
$I->click('Save');
// The settings might have been created or updated.
$I->see('Site Settings has been');
$I->see('Site Settings hs been', '.messages-list');
$I->amOnPage('/');
$I->dontSeeElement('.su-site-search__input');

$I->amOnPage('/admin/config/system/basic-site-settings');
$I->uncheckOption('Hide Site Search');
$I->click('Save');
$I->canSee('Site Settings has been');
$I->canSee('Site Settings hs been', '.messages-list');
$I->amOnPage('/');
$I->seeElement('.su-site-search__input');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public function testFormSettings(AcceptanceTester $I) {
$I->fillField('URL', '<front>');
$I->fillField('Link text', 'Action link');
$I->click('Save');
$I->see('Global Message hs been', '.messages-list');

$I->amOnPage("/");
$I->seeElement(".su-alert--success");
$I->canSee("MESSAGE LABEL");
Expand All @@ -58,6 +60,8 @@ public function testFormSettings(AcceptanceTester $I) {
$I->amOnPage('/admin/config/system/global-message');
$I->selectOption("#edit-su-global-msg-type", "error");
$I->click('Save');
$I->see('Global Message hs been', '.messages-list');

$I->amOnPage("/");
$I->seeElement(".su-alert--error");
}
Expand Down
12 changes: 10 additions & 2 deletions tests/codeception/acceptance/LocalFooter/LocalFooterCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public function testCustomLocalFooter(AcceptanceTester $I) {
$I->checkOption('Enabled');
$I->selectOption('Country', 'United States');
$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->selectOption('State', 'New York');
$fields = [
'Company' => 'Drupal',
Expand All @@ -67,6 +69,7 @@ public function testCustomLocalFooter(AcceptanceTester $I) {
}

$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSee('123 Drupal Dr');
Expand All @@ -83,6 +86,7 @@ public function testCustomLocalFooter(AcceptanceTester $I) {
$I->amOnPage('/admin/config/system/local-footer');
$I->uncheckOption('Enabled');
$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->cantSee('123 Drupal Dr');
Expand All @@ -99,6 +103,8 @@ public function testCustomContentLocalFooter(AcceptanceTester $I) {
$I->fillField("#edit-su-local-foot-se-co-0-value", "<p>Block two</p>");
$I->fillField("#edit-su-local-foot-tr-co-0-value", "<p>Block three</p>");
$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSee('Block one');
$I->canSee('Block two');
Expand All @@ -119,7 +125,8 @@ public function testNodeRoutesAndNoLink(AcceptanceTester $I) {
$I->fillField('su_local_foot_primary[0][uri]', $node->label() . " ({$node->id()})");
$I->fillField('su_local_foot_primary[0][title]', $node->label());
$I->click('Save');
$I->canSee('Local Footer has been');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSeeLink($node->label(), $node->toUrl()->toString());

Expand All @@ -129,7 +136,8 @@ public function testNodeRoutesAndNoLink(AcceptanceTester $I) {
$I->fillField('su_local_foot_primary[0][uri]', '<nolink>');
$I->fillField('su_local_foot_primary[0][title]', 'NO LINK');
$I->click('Save');
$I->canSee('Local Footer has been');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSee('NO LINK', 'li span');
}
Expand Down
28 changes: 28 additions & 0 deletions tests/codeception/acceptance/LocalFooter/LocalFooterLockupCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public function testLockupSettingsA(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Last line full width option");
Expand All @@ -73,6 +75,8 @@ public function testLockupSettingsB(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Secondary title line");
Expand All @@ -94,6 +98,8 @@ public function testLockupSettingsD(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Tertiary title line");
Expand All @@ -115,6 +121,8 @@ public function testLockupSettingsE(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Secondary title line");
Expand All @@ -137,6 +145,8 @@ public function testLockupSettingsH(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Organization name");
Expand All @@ -159,6 +169,8 @@ public function testLockupSettingsI(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Organization name");
Expand All @@ -181,6 +193,8 @@ public function testLockupSettingsM(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Secondary title line");
Expand All @@ -202,6 +216,8 @@ public function testLockupSettingsO(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Organization name");
}
Expand All @@ -222,6 +238,8 @@ public function testLockupSettingsP(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Organization name");
Expand All @@ -243,6 +261,8 @@ public function testLockupSettingsR(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Last line full width option");
}
Expand All @@ -263,6 +283,8 @@ public function testLockupSettingsS(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Secondary title line");
Expand All @@ -285,6 +307,8 @@ public function testLockupSettingsT(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Secondary title line");
Expand Down Expand Up @@ -319,6 +343,8 @@ public function testLogoWithLockup(AcceptanceTester $I) {
$I->click('Upload');

$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->seeElement(".su-lockup__custom-logo");
$I->assertNotEmpty($I->grabAttributeFrom('.su-lockup__custom-logo', 'alt'));
Expand Down Expand Up @@ -353,6 +379,8 @@ public function testLogoWithOutLockup(AcceptanceTester $I) {
$I->click('Upload');

$I->click('Save');
$I->see('Local Footer has been', '.messages-list');

$I->amOnPage('/');
$I->seeElement(".su-lockup__custom-logo");
$I->cantSee("Site title line");
Expand Down
28 changes: 28 additions & 0 deletions tests/codeception/acceptance/LockupSettings/LockupSettingsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public function testLockupSettingsA(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Lockup Settings has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Last line full width option");
Expand All @@ -82,6 +84,8 @@ public function testLockupSettingsB(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Lockup Settings has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Secondary title line");
Expand All @@ -103,6 +107,8 @@ public function testLockupSettingsD(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Lockup Settings has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Tertiary title line");
Expand All @@ -124,6 +130,8 @@ public function testLockupSettingsE(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Lockup Settings has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Secondary title line");
Expand All @@ -146,6 +154,8 @@ public function testLockupSettingsH(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Lockup Settings has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Organization name");
Expand All @@ -168,6 +178,8 @@ public function testLockupSettingsI(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Lockup Settings has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Organization name");
Expand All @@ -190,6 +202,8 @@ public function testLockupSettingsM(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Lockup Settings has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Secondary title line");
Expand All @@ -211,6 +225,8 @@ public function testLockupSettingsO(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Lockup Settings has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Organization name");
}
Expand All @@ -231,6 +247,8 @@ public function testLockupSettingsP(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Lockup Settings has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Organization name");
Expand All @@ -252,6 +270,8 @@ public function testLockupSettingsR(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Lockup Settings has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Last line full width option");
}
Expand All @@ -272,6 +292,8 @@ public function testLockupSettingsS(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Lockup Settings has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Secondary title line");
Expand All @@ -294,6 +316,8 @@ public function testLockupSettingsT(AcceptanceTester $I) {
$I->fillField('Line 4', 'Organization name');
$I->fillField('Line 5', 'Last line full width option');
$I->click('Save');
$I->see('Lockup Settings has been', '.messages-list');

$I->amOnPage('/');
$I->canSee("Site title line");
$I->canSee("Secondary title line");
Expand Down Expand Up @@ -328,6 +352,8 @@ public function testLogoWithLockup(AcceptanceTester $I) {
$I->click('Upload');

$I->click('Save');
$I->see('Lockup Settings has been', '.messages-list');

$I->amOnPage('/');
$I->seeElement(".su-lockup__custom-logo");
$I->assertNotEmpty($I->grabAttributeFrom('.su-lockup__custom-logo', 'alt'));
Expand Down Expand Up @@ -362,6 +388,8 @@ public function testLogoWithOutLockup(AcceptanceTester $I) {
$I->click('Upload');

$I->click('Save');
$I->see('Lockup Settings has been', '.messages-list');

$I->amOnPage('/');
$I->seeElement(".su-lockup__custom-logo");
$I->assertNotEmpty($I->grabAttributeFrom('.su-lockup__custom-logo', 'alt'));
Expand Down
2 changes: 2 additions & 0 deletions tests/codeception/acceptance/SuperFooter/SuperFooterCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public function testFormSettings(AcceptanceTester $I) {
$I->fillField('#edit-su-super-foot-intranet-0-uri', 'https://stanford.edu/');
$I->fillField('#edit-su-super-foot-intranet-0-title', 'Intranet Link');
$I->click('Save');
$I->see('Super Footer has been', '.messages-list');

$I->amOnPage("/");
$I->seeElement(".block-config-pages-super-footer");
$I->canSee("Super Footer Title");
Expand Down
Loading

0 comments on commit f7808db

Please sign in to comment.