From 34036dbaebfe19d43101462458749be9a1c01975 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 7 May 2010 15:00:56 +0000 Subject: - Patch #601308 by sfyn, pcarman: test clicking on node title from teaser list. --- modules/node/node.test | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'modules/node/node.test') diff --git a/modules/node/node.test b/modules/node/node.test index 31e021ec9..db004f6b8 100644 --- a/modules/node/node.test +++ b/modules/node/node.test @@ -1291,9 +1291,11 @@ class NodeTitleTestCase extends DrupalWebTestCase { * Create one node and test if the node title has the correct value. */ function testNodeTitle() { - // Create "Basic page" content with title + // Create "Basic page" content with title. + // Add the node to the frontpage so we can test if teaser links are clickable. $settings = array( 'title' => $this->randomName(8), + 'promote' => 1, ); $node = $this->drupalCreateNode($settings); @@ -1309,11 +1311,15 @@ class NodeTitleTestCase extends DrupalWebTestCase { // Test node title in comment preview. $this->assertEqual(current($this->xpath('//div[@id=:id]/h2/a', array(':id' => 'node-' . $node->nid))), $node->title, 'Node preview title is equal to node title.', 'Node'); + + // Test node title is clickable on teaser list (/node). + $this->drupalGet('node'); + $this->clickLink($node->title); } } /** - * Test the node_feed() functionality + * Test the node_feed() functionality. */ class NodeFeedTestCase extends DrupalWebTestCase { public static function getInfo() { @@ -1693,7 +1699,7 @@ class NodeTokenReplaceTestCase extends DrupalWebTestCase { ); $node = $this->drupalCreateNode($settings); - // Load node so that the body and summary fields are structured properly. + // Load node so that the body and summary fields are structured properly. $node = node_load($node->nid); $instance = field_info_instance('node', 'body', $node->type); -- cgit v1.2.3