4 * MediaWikiRightFrameworkLinksTestCase
8 * Copyright (C) 2010 Nadeesha Weerasinghe <nadeesha@calcey.com>
9 * http://www.calcey.com/
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 * http://www.gnu.org/copyleft/gpl.html
26 * @addtogroup Maintenance
30 require_once ( __DIR__
. '/MediaWikiInstallationCommonFunction.php' );
33 * Test Case ID : 14, 15, 16, 17 (http://www.mediawiki.org/wiki/New_installer/Test_plan)
34 * Test Case Name : User selects 'Read me' link.
35 * User selects 'Release notes' link.
36 * User selects 'Copying' link.
37 * User selects 'Upgrading' link.
38 * Version : MediaWiki 1.18alpha
41 class MediaWikiRightFrameworkLinksTestCase
extends MediaWikiInstallationCommonFunction
{
46 public function testLinksAvailability() {
47 $this->open( "http://" . HOST_NAME
. ":" . PORT
. "/" . DIRECTORY_NAME
. "/config/index.php" );
49 // Verify 'Read me' link availability
50 $this->assertTrue( $this->isElementPresent( "link=Read me" ) );
52 // Verify 'Release notes' link availability
53 $this->assertTrue( $this->isElementPresent( "link=Release notes" ) );
55 // Verify 'Copying' link availability
56 $this->assertTrue( $this->isElementPresent( "link=Copying" ) );
59 public function testPageNavigation() {
60 $this->open( "http://" . HOST_NAME
. ":" . PORT
. "/" . DIRECTORY_NAME
. "/config/index.php" );
62 // Navigate to the 'Read me' page
63 $this->click( "link=Read me" );
64 $this->waitForPageToLoad( PAGE_LOAD_TIME
);
65 $this->assertEquals( "Read me", $this->getText( LINK_DIV
. "h2[1]" ) );
66 $this->assertTrue( $this->isElementPresent( "submit-back" ) );
67 parent
::clickBackButton();
69 // Navigate to the 'Release notes' page
70 $this->click( "link=Release notes" );
71 $this->waitForPageToLoad( PAGE_LOAD_TIME
);
72 $this->assertEquals( "Release notes", $this->getText( LINK_DIV
. "h2[1]" ) );
73 $this->assertTrue( $this->isElementPresent( "submit-back" ) );
74 parent
::clickBackButton();
76 // Navigate to the 'Copying' page
77 $this->click( "link=Copying" );
78 $this->waitForPageToLoad( PAGE_LOAD_TIME
);
79 $this->assertEquals( "Copying", $this->getText( LINK_DIV
. "h2[1]" ) );
80 $this->assertTrue( $this->isElementPresent( "submit-back" ) );
81 parent
::clickBackButton();
83 // Navigate to the 'Upgrading' page
84 $this->click( "link=Upgrading" );
85 $this->waitForPageToLoad( PAGE_LOAD_TIME
);
86 $this->assertEquals( "Upgrading", $this->getText( LINK_DIV
. "h2[1]" ) );