Skip to content

Commit

Permalink
update acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Sep 8, 2023
1 parent d313f37 commit 210db36
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
4 changes: 3 additions & 1 deletion tests/codeception/acceptance/Content/EventsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,14 @@ public function testXMLSiteMap(AcceptanceTester $I) {

/**
* Test Page Title Conditions.
*
* @group foobar
*/
public function testPageTitleIgnoreCondition(AcceptanceTester $I) {
$I->logInWithRole('administrator');
// Todo: make theme name dynamic.
$I->amOnPage('/admin/structure/block/manage/stanford_basic_pagetitle');
$values = $I->grabTextFrom('#edit-visibility-request-path-pages');
$values = $I->grabValueFrom('#edit-visibility-request-path-pages');
if (is_string($values)) {
$values = explode("\n", $values);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/codeception/acceptance/Content/EventsSeriesCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function testPageTitleIgnoreCondition(AcceptanceTester $I) {
$I->logInWithRole('administrator');
// Todo: make theme name dynamic.
$I->amOnPage('/admin/structure/block/manage/stanford_basic_pagetitle');
$values = $I->grabTextFrom('#edit-visibility-request-path-pages');
$values = $I->grabValueFrom('#edit-visibility-request-path-pages');
if (is_string($values)) {
$values = explode("\n", $values);
}
Expand Down
14 changes: 7 additions & 7 deletions tests/codeception/acceptance/Content/PublicationsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function testBookCitation(AcceptanceTester $I) {
$I->fillField('Title', $this->values['node_title']);
$I->fillField('Publication Types', $term->id());
$I->selectOption('su_publication_citation[actions][bundle]', 'Book');
$I->click('Add Citation');
$I->click('Add new Citation');
$I->fillField('First Name', $this->faker->firstName);
$I->fillField('Last Name/Company', $this->faker->lastName);
$I->fillField('Subtitle', $this->faker->text);
Expand Down Expand Up @@ -106,7 +106,7 @@ public function testOtherPublication(AcceptanceTester $I) {
$I->amOnPage('/node/add/stanford_publication');
$I->fillField('Title', $this->values['node_title']);
$I->selectOption('su_publication_citation[actions][bundle]', 'Other');
$I->click('Add Citation');
$I->click('Add new Citation');
$I->fillField('First Name', $this->faker->firstName);
$I->fillField('Last Name/Company', $this->faker->lastName);
$I->fillField('Subtitle', $this->faker->text);
Expand All @@ -132,7 +132,7 @@ public function testListSort(AcceptanceTester $I) {
$I->amOnPage('/node/add/stanford_publication');
$I->fillField('Title', $this->values['a_node_title']);
$I->selectOption('su_publication_citation[actions][bundle]', 'Other');
$I->click('Add Citation');
$I->click('Add new Citation');
$I->fillField('Year', 2020);
$I->fillField('Month', 6);
$I->fillField('Day', 1);
Expand All @@ -143,7 +143,7 @@ public function testListSort(AcceptanceTester $I) {
$I->amOnPage('/node/add/stanford_publication');
$I->fillField('Title', $this->values['b_node_title']);
$I->selectOption('su_publication_citation[actions][bundle]', 'Other');
$I->click('Add Citation');
$I->click('Add new Citation');
$I->fillField('Year', 2020);
$I->fillField('Month', 6);
$I->fillField('Day', 15);
Expand All @@ -153,7 +153,7 @@ public function testListSort(AcceptanceTester $I) {
$I->amOnPage('/node/add/stanford_publication');
$I->fillField('Title', $this->values['c_node_title']);
$I->selectOption('su_publication_citation[actions][bundle]', 'Other');
$I->click('Add Citation');
$I->click('Add new Citation');
$I->fillField('Year', 2020);
$I->fillField('Month', 1);
$I->fillField('Day', 15);
Expand Down Expand Up @@ -204,7 +204,7 @@ public function testPubAuthorPage(AcceptanceTester $I) {
$I->logInWithRole('contributor');
$I->amOnPage($publication->toUrl('edit-form')->toString());
$I->selectOption('su_publication_citation[actions][bundle]', 'Book');
$I->click('Add Citation');
$I->click('Add new Citation');
$I->fillField('First Name', $first_name);
$I->fillField('Last Name/Company', $last_name);
$I->fillField('Subtitle', $this->faker->words(2, TRUE));
Expand Down Expand Up @@ -232,7 +232,7 @@ public function testJournalPublisher(AcceptanceTester $I) {
$I->fillField('Title', $this->values['node_title']);
$I->fillField('Publication Types', $term->id());
$I->selectOption('su_publication_citation[actions][bundle]', 'Journal Article');
$I->click('Add Citation');
$I->click('Add new Citation');
$I->fillField('First Name', $this->faker->firstName);
$I->fillField('Last Name/Company', $this->faker->lastName);
$I->fillField('Volume', "1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testLayoutBuilderParagraph(AcceptanceTester $I) {
$I->click('Layout');
$I->click('Add block');

$I->click('Create custom block');
$I->click('Create content block');
$I->fillField('Title', 'Custom Block');
$I->fillField('Body', 'Lorem Ipsum Custom Block Text');
$I->click('Add block');
Expand Down
1 change: 1 addition & 0 deletions tests/codeception/acceptance/Paragraphs/ListsCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Class ListsCest.
*
* @group paragraphs
* @group lists
*/
class ListsCest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function testPublicationTeasers(FunctionalTester $I) {
$I->amOnPage($publication->toUrl('edit-form')->toString());

$I->selectOption('su_publication_citation[actions][bundle]', 'Journal Article');
$I->click('Add Citation');
$I->click('Add new Citation');
$I->waitForText('First Name');
$I->click('Save');
$I->canSee($publication->label(), 'h1');
Expand Down

0 comments on commit 210db36

Please sign in to comment.