Skip to content

Commit

Permalink
Updated functional tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
joegl committed Nov 1, 2024
1 parent 85f29a1 commit 1e6e221
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public function __construct() {
/**
* Mini calendar display.
*
* @group mini-calendar
* @group events
* @group mini_calendar
*/
public function testMiniCalendar(FunctionalTester $I) {
$events = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

/**
* Test the news functionality.
*
* @group content
* @group news
*/
class StanfordNewsCest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/**
* Test the external link module functionality.
*
* @group contrib
* @group ext_links
*/
class ExtLinkCest {
Expand Down Expand Up @@ -60,15 +61,6 @@ public function testExtLink(FunctionalTester $I) {
$I->amOnPage('/admin/config/system/basic-site-settings');
$I->uncheckOption('Hide External Link Icons');

$I->click('Site Contacts');
$I->waitForText('Site Owner Contact Email');
$I->fillField('Site Owner Contact Email (value 1)', $this->faker->email);
$I->fillField('Primary Site Manager Email (value 1)', $this->faker->email);
$I->fillField('Accessibility Contact Email (value 1)', $this->faker->email);
$I->selectOption('.js-form-item-su-site-org-0-target-id select.simpler-select', $org_term->id());
$I->click('Save');
$I->canSee('Site Settings has been', '.messages-list');

$I->amOnPage('/admin/config/system/local-footer');
$I->checkOption('#edit-su-footer-enabled-value');
$I->click('#edit-group-primary-links summary');
Expand All @@ -93,13 +85,10 @@ public function testExtLink(FunctionalTester $I) {

// Validate email links.
$I->amOnPage('/');
$I->waitForElementVisible('a.mailto svg.mailto');
$I->canSeeNumberOfElements('a.mailto svg.mailto', 3);

// External Links in the page-content region.
$I->canSeeNumberOfElements('#page-content a.su-link--external svg.su-link--external', 1);
// External links in the local footer.
$I->canSeeNumberOfElements('.su-local-footer__cell2 a.su-link--external svg.su-link--external', 4);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,6 @@ public function testDropdownMenus(FunctionalTester $I) {
$I->amOnPage('/admin/config/system/basic-site-settings');
$I->uncheckOption('Use Drop Down Menus');

$I->click('Site Contacts');
$I->waitForText('Site Owner Contact Email');
$I->fillField('Site Owner Contact Email (value 1)', $this->faker->email);
$I->fillField('Primary Site Manager Email (value 1)', $this->faker->email);
$I->fillField('Accessibility Contact Email (value 1)', $this->faker->email);
$I->selectOption('.js-form-item-su-site-org-0-target-id select.simpler-select', $org_term->id());
$I->click('Save');
$I->canSee('Site Settings has been', '.messages-list');

$I->amOnPage('/');
$I->cantSeeElement('button', ['class' => 'su-nav-toggle']);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

/**
* Class EntityReferenceCest.
*
* @group paragraphs
*/
class EntityReferenceCest {

Expand Down

0 comments on commit 1e6e221

Please sign in to comment.