Skip to content
Snippets Groups Projects
Commit dbd6835e authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-7160: Remove actual test for related links

parent dff60acf
No related branches found
No related tags found
2 merge requests!83ISTWCMS-7160 Fix service content type in testAutomaticListBlocksSettings in...,!81ISTWCMS-7160 Make existing Codeception tests pass
......@@ -872,69 +872,6 @@ class WcmsTestsBlocksContentCest {
}
}
/**
* Function to test the related links block.
*
* @param AcceptanceTester $i
* The acceptance tester.
*/
public function testRelatedLinksBlock(AcceptanceTester $i) {
// Create a webpage.
$this->nodesUsed['Related Links Block'] = $i->createWebPage('Related Links Block');
// Get the path of the webpage.
$path = $i->getWebPagePath($this->nodesUsed['Related Links Block']);
// Login as site manager.
$i->amOnPage('user/logout');
$i->logInWithRole('uw_role_site_manager');
// Go to the layout page for the webpage we created.
$i->amOnPage($path . '/layout');
$i->see('Edit layout for ' . $this->nodesUsed['Related Links Block']->getTitle());
// Add a block.
$i->click('Add block');
$i->waitForText('Choose a block');
// Click on the related links block.
$i->click('Related links');
$i->waitForText('Configure block');
// Add a second and third link.
$i->click('input[id^="edit-settings-block-form-field-uw-rl-related-link-add-more"]');
$i->waitForElement('input[id^="edit-settings-block-form-field-uw-rl-related-link-1-uri"]');
$i->click('input[id^="edit-settings-block-form-field-uw-rl-related-link-add-more"]');
$i->waitForElement('input[id^="edit-settings-block-form-field-uw-rl-related-link-2-uri"]');
// Get the settings for the related links.
$title = $i->uwRandomString();
$url1 = 'entity:node/1';
$title1 = $i->uwRandomString();
$url2 = 'https://www.sju.ca/';
$title2 = $i->uwRandomString();
// Fill in the fields.
$i->fillField('settings[label]', $title);
$i->fillField('settings[block_form][field_uw_rl_related_link][0][uri]', $url1);
$i->fillField('settings[block_form][field_uw_rl_related_link][0][title]', $title1);
$i->fillField('settings[block_form][field_uw_rl_related_link][1][uri]', $url2);
$i->fillField('settings[block_form][field_uw_rl_related_link][1][title]', $title2);
$i->fillField('settings[block_form][field_uw_rl_related_link][2][uri]', $url1);
// Click on add block and ensure it is on the screen.
$i->click('Add block');
$i->waitForElement(Locator::contains('div[class="uw-admin-label"]', 'Related links'));
$i->seeElement(Locator::contains('div[class="uw-admin-label"]', 'Related links'));
// Test that the Related links block markup appears on the page.
$i->see($title);
$i->seeElement(Locator::contains('a[href="/home"]', $title1));
$i->seeElement(Locator::contains('a[href="' . $url2 . '"]', $title2));
$i->seeElement(Locator::contains('a[href="/home"]', 'Home'));
}
/**
* Function to test the timeline block.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment