Index: trunk/phase3/maintenance/tests/selenium/SimpleSeleniumConfig.php |
— | — | @@ -1,15 +0,0 @@ |
2 | | -<?php |
3 | | -class SimpleSeleniumConfig { |
4 | | - |
5 | | - public static function getSettings(&$includeFiles, &$globalConfigs) { |
6 | | - $includes = array( |
7 | | - //files that needed to be included would go here |
8 | | - ); |
9 | | - $configs = array( |
10 | | - 'wgDefaultSkin' => 'chick' |
11 | | - ); |
12 | | - $includeFiles = array_merge( $includeFiles, $includes ); |
13 | | - $globalConfigs = array_merge( $globalConfigs, $configs); |
14 | | - return true; |
15 | | - } |
16 | | -} |
\ No newline at end of file |
Index: trunk/phase3/maintenance/tests/selenium/SimpleSeleniumTestSuite.php |
— | — | @@ -1,26 +0,0 @@ |
2 | | -<?php |
3 | | -/* |
4 | | - * Sample test suite. |
5 | | - * Two ways to configure MW for these tests |
6 | | - * 1) If you are running multiple test suites, add the following in LocalSettings.php |
7 | | - * require_once("maintenance/tests/selenium/SimpleSeleniumConfig.php"); |
8 | | - * $wgSeleniumTestConfigs['SimpleSeleniumTestSuite'] = 'SimpleSeleniumConfig::getSettings'; |
9 | | - * OR |
10 | | - * 2) Add the following to your Localsettings.php |
11 | | - * $wgDefaultSkin = 'chick'; |
12 | | - */ |
13 | | -class SimpleSeleniumTestSuite extends SeleniumTestSuite |
14 | | -{ |
15 | | - public function setUp() { |
16 | | - $this->setLoginBeforeTests( false ); |
17 | | - parent::setUp(); |
18 | | - } |
19 | | - public function addTests() { |
20 | | - $testFiles = array( |
21 | | - 'maintenance/tests/selenium/SimpleSeleniumTestCase.php' |
22 | | - ); |
23 | | - parent::addTestFiles( $testFiles ); |
24 | | - } |
25 | | - |
26 | | - |
27 | | -} |
Index: trunk/phase3/maintenance/tests/selenium/SimpleSeleniumTestCase.php |
— | — | @@ -1,30 +0,0 @@ |
2 | | -<?php |
3 | | -/* |
4 | | - * This test case is part of the SimpleSeleniumTestSuite. |
5 | | - * Configuration for these tests are dosumented as part of SimpleSeleniumTestSuite.php |
6 | | - */ |
7 | | -class SimpleSeleniumTestCase extends SeleniumTestCase { |
8 | | - public function testBasic() { |
9 | | - $this->open( $this->getUrl() . |
10 | | - '/index.php?title=Selenium&action=edit' ); |
11 | | - $this->type( "wpTextbox1", "This is a basic test" ); |
12 | | - $this->click( "wpPreview" ); |
13 | | - $this->waitForPageToLoad( 10000 ); |
14 | | - |
15 | | - // check result |
16 | | - $source = $this->getText( "//div[@id='wikiPreview']/p" ); |
17 | | - $correct = strstr( $source, "This is a basic test" ); |
18 | | - $this->assertEquals( $correct, true ); |
19 | | - } |
20 | | - |
21 | | - /* |
22 | | - * All this test really does is verify that a global var was set. |
23 | | - * It depends on $wgDefaultSkin = 'chick'; being set |
24 | | - */ |
25 | | - public function testGlobalVariableForDefaultSkin() { |
26 | | - $this->open( $this->getUrl() . '/index.php?&action=purge' ); |
27 | | - $bodyClass = $this->getAttribute( "//body/@class" ); |
28 | | - $this-> assertContains('skin-chick', $bodyClass, 'Chick skin not set'); |
29 | | - } |
30 | | - |
31 | | -} |
Index: trunk/phase3/maintenance/tests/selenium/suites/SimpleSeleniumConfig.php |
— | — | @@ -0,0 +1,15 @@ |
| 2 | +<?php |
| 3 | +class SimpleSeleniumConfig { |
| 4 | + |
| 5 | + public static function getSettings(&$includeFiles, &$globalConfigs) { |
| 6 | + $includes = array( |
| 7 | + //files that needed to be included would go here |
| 8 | + ); |
| 9 | + $configs = array( |
| 10 | + 'wgDefaultSkin' => 'chick' |
| 11 | + ); |
| 12 | + $includeFiles = array_merge( $includeFiles, $includes ); |
| 13 | + $globalConfigs = array_merge( $globalConfigs, $configs); |
| 14 | + return true; |
| 15 | + } |
| 16 | +} |
\ No newline at end of file |
Property changes on: trunk/phase3/maintenance/tests/selenium/suites/SimpleSeleniumConfig.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 17 | + native |
Index: trunk/phase3/maintenance/tests/selenium/suites/SimpleSeleniumTestSuite.php |
— | — | @@ -0,0 +1,26 @@ |
| 2 | +<?php |
| 3 | +/* |
| 4 | + * Sample test suite. |
| 5 | + * Two ways to configure MW for these tests |
| 6 | + * 1) If you are running multiple test suites, add the following in LocalSettings.php |
| 7 | + * require_once("maintenance/tests/selenium/SimpleSeleniumConfig.php"); |
| 8 | + * $wgSeleniumTestConfigs['SimpleSeleniumTestSuite'] = 'SimpleSeleniumConfig::getSettings'; |
| 9 | + * OR |
| 10 | + * 2) Add the following to your Localsettings.php |
| 11 | + * $wgDefaultSkin = 'chick'; |
| 12 | + */ |
| 13 | +class SimpleSeleniumTestSuite extends SeleniumTestSuite |
| 14 | +{ |
| 15 | + public function setUp() { |
| 16 | + $this->setLoginBeforeTests( false ); |
| 17 | + parent::setUp(); |
| 18 | + } |
| 19 | + public function addTests() { |
| 20 | + $testFiles = array( |
| 21 | + 'maintenance/tests/selenium/SimpleSeleniumTestCase.php' |
| 22 | + ); |
| 23 | + parent::addTestFiles( $testFiles ); |
| 24 | + } |
| 25 | + |
| 26 | + |
| 27 | +} |
Property changes on: trunk/phase3/maintenance/tests/selenium/suites/SimpleSeleniumTestSuite.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 28 | + native |
Added: svn:keywords |
2 | 29 | + LastChangedDate LastChangedBy Revision Id |
Index: trunk/phase3/maintenance/tests/selenium/suites/SimpleSeleniumTestCase.php |
— | — | @@ -0,0 +1,30 @@ |
| 2 | +<?php |
| 3 | +/* |
| 4 | + * This test case is part of the SimpleSeleniumTestSuite. |
| 5 | + * Configuration for these tests are dosumented as part of SimpleSeleniumTestSuite.php |
| 6 | + */ |
| 7 | +class SimpleSeleniumTestCase extends SeleniumTestCase { |
| 8 | + public function testBasic() { |
| 9 | + $this->open( $this->getUrl() . |
| 10 | + '/index.php?title=Selenium&action=edit' ); |
| 11 | + $this->type( "wpTextbox1", "This is a basic test" ); |
| 12 | + $this->click( "wpPreview" ); |
| 13 | + $this->waitForPageToLoad( 10000 ); |
| 14 | + |
| 15 | + // check result |
| 16 | + $source = $this->getText( "//div[@id='wikiPreview']/p" ); |
| 17 | + $correct = strstr( $source, "This is a basic test" ); |
| 18 | + $this->assertEquals( $correct, true ); |
| 19 | + } |
| 20 | + |
| 21 | + /* |
| 22 | + * All this test really does is verify that a global var was set. |
| 23 | + * It depends on $wgDefaultSkin = 'chick'; being set |
| 24 | + */ |
| 25 | + public function testGlobalVariableForDefaultSkin() { |
| 26 | + $this->open( $this->getUrl() . '/index.php?&action=purge' ); |
| 27 | + $bodyClass = $this->getAttribute( "//body/@class" ); |
| 28 | + $this-> assertContains('skin-chick', $bodyClass, 'Chick skin not set'); |
| 29 | + } |
| 30 | + |
| 31 | +} |
Property changes on: trunk/phase3/maintenance/tests/selenium/suites/SimpleSeleniumTestCase.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 32 | + native |
Added: svn:keywords |
2 | 33 | + LastChangedDate LastChangedBy Revision Id |