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