r65685 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65684‎ | r65685 | r65686 >
Date:11:46, 30 April 2010
Author:bhagya
Status:deferred
Tags:
Comment:
Code format and config file reference
Modified paths:
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikSearch_TC.php (modified) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiCommonFunction_TC.php (modified) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiDialogs_ExsistingPage.php (modified) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiDialogs_NewPage.php (modified) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiDialogs_TC.php (modified) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiNTOC_+ExistingPage.php (modified) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiNTOC_NewPage.php (modified) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiNTOC_TC.php (modified) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiTextFormat_ExistingPage.php (modified) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiTextFormat_NewPage.php (modified) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiTextFormat_TC.php (modified) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiToolBarOther_ExistingPage.php (modified) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiToolBarOther_NewPage.php (modified) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiToolBarOther_TC.php (modified) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiWatchUnWatch_TC.php (modified) (history)

Diff [purge]

Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiDialogs_ExsistingPage.php
@@ -1,6 +1,5 @@
22 <?php
33 require_once 'WikiDialogs_TC.php';
4 -
54 /**
65 * Description of WikiExsistingPageDialogs
76 *
@@ -12,145 +11,100 @@
1312 parent::setUp();
1413 }
1514
16 - // Add a internal link and verify
17 - function testInternalLink(){
 15+ //Open a random page
 16+ function openRandomPage(){
1817 parent::doOpenLink();
1918 parent::doLogin();
20 - $this->open("/deployment-en/Main_Page");
21 - $this->waitForPageToLoad("30000");
2219 parent::doAccessRandomPage();
 20+ parent::doEditPage();
 21+ }
 22+ // Add a internal link and verify
 23+ function testInternalLink(){
 24+ $this->openRandomPage();
2325 parent::verifyInternalLink();
2426 parent::doLogout();
2527 }
2628
2729 // Add a internal link with different display text and verify
2830 function testInternalLinkWithDisplayText(){
29 - parent::doOpenLink();
30 - parent::doLogin();
31 - $this->open("/deployment-en/Main_Page");
32 - $this->waitForPageToLoad("30000");
33 - parent::doAccessRandomPage();
 31+ $this->openRandomPage();
3432 parent::verifyInternalLinkWithDisplayText();
3533 parent::doLogout();
3634 }
3735
3836 // Add a internal link with blank display text and verify
3937 function testInternalLinkWithBlankDisplayText(){
40 - parent::doOpenLink();
41 - parent::doLogin();
42 - $this->open("/deployment-en/Main_Page");
43 - $this->waitForPageToLoad("30000");
44 - parent::doAccessRandomPage();
 38+ $this->openRandomPage();
4539 parent::verifyInternalLinkWithBlankDisplayText();
4640 parent::doLogout();
4741 }
4842
4943 // Add external link and verify
5044 function testExternalLink(){
51 - parent::doOpenLink();
52 - parent::doLogin();
53 - $this->open("/deployment-en/Main_Page");
54 - $this->waitForPageToLoad("30000");
55 - parent::doAccessRandomPage();
 45+ $this->openRandomPage();
5646 parent::verifyExternalLink();
5747 parent::doLogout();
5848 }
5949
6050 // Add external link with different display text and verify
6151 function testExternalLinkWithDisplayText(){
62 - parent::doOpenLink();
63 - parent::doLogin();
64 - $this->open("/deployment-en/Main_Page");
65 - $this->waitForPageToLoad("30000");
66 - parent::doAccessRandomPage();
 52+ $this->openRandomPage();
6753 parent::verifyExternalLinkWithDisplayText();
6854 parent::doLogout();
6955 }
7056
7157 // Add external link with Blank display text and verify
7258 function testExternalLinkWithBlankDisplayText(){
73 - parent::doOpenLink();
74 - parent::doLogin();
75 - $this->open("/deployment-en/Main_Page");
76 - $this->waitForPageToLoad("30000");
77 - parent::doAccessRandomPage();
 59+ $this->openRandomPage();
7860 parent::verifyExternalLinkWithBlankDisplayText();
7961 parent::doLogout();
8062 }
8163
8264 // Add a table and verify
8365 function testCreateTable(){
84 - parent::doOpenLink();
85 - parent::doLogin();
86 - $this->open("/deployment-en/Main_Page");
87 - $this->waitForPageToLoad("30000");
88 - parent::doAccessRandomPage();
 66+ $this->openRandomPage();
8967 parent::verifyCreateTable();
9068 parent::doLogout();
9169 }
9270
9371 // Add a table and verify only with head row
9472 function testCreateTableWithHeadRow(){
95 - parent::doOpenLink();
96 - parent::doLogin();
97 - $this->open("/deployment-en/Main_Page");
98 - $this->waitForPageToLoad("30000");
99 - parent::doAccessRandomPage();
 73+ $this->openRandomPage();
10074 parent::verifyCreateTableWithHeadRow();
10175 parent::doLogout();
10276 }
10377
10478 // Add a table and verify only with borders
10579 function testCreateTableWithBorders(){
106 - parent::doOpenLink();
107 - parent::doLogin();
108 - $this->open("/deployment-en/Main_Page");
109 - $this->waitForPageToLoad("30000");
110 - parent::doAccessRandomPage();
 80+ $this->openRandomPage();
11181 parent::verifyCreateTableWithBorders();
11282 parent::doLogout();
11383 }
11484
11585 // Add a table and verify only with sort row
11686 function testCreateTableWithSortRow(){
117 - parent::doOpenLink();
118 - parent::doLogin();
119 - $this->open("/deployment-en/Main_Page");
120 - $this->waitForPageToLoad("30000");
121 - parent::doAccessRandomPage();
 87+ $this->openRandomPage();
12288 parent::verifyCreateTableWithSortRow();
12389 parent::doLogout();
12490 }
12591
12692 // Add a table without headers,borders and sort rows
12793 function testCreateTableWithNoSpecialEffects(){
128 - parent::doOpenLink();
129 - parent::doLogin();
130 - $this->open("/deployment-en/Main_Page");
131 - $this->waitForPageToLoad("30000");
132 - parent::doAccessRandomPage();
 94+ $this->openRandomPage();
13395 parent::verifyCreateTableWithNoSpecialEffects();
13496 parent::doLogout();
13597 }
13698
13799 // Verify the replace all function on Search and Replace
138100 function testTextSearchReplaceAll(){
139 - parent::doOpenLink();
140 - parent::doLogin();
141 - $this->open("/deployment-en/Main_Page");
142 - $this->waitForPageToLoad("30000");
143 - parent::doAccessRandomPage();
 101+ $this->openRandomPage();
144102 parent::verifyTextSearchReplaceAll();
145103 parent::doLogout();
146104 }
147105
148106 // Verify the replace next function on Search and Replace
149107 function testTextSearchReplaceNext(){
150 - parent::doOpenLink();
151 - parent::doLogin();
152 - $this->open("/deployment-en/Main_Page");
153 - $this->waitForPageToLoad("30000");
154 - parent::doAccessRandomPage();
 108+ $this->openRandomPage();
155109 parent::verifyTextSearchReplaceNext();
156110 parent::doLogout();
157111 }
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikSearch_TC.php
@@ -1,11 +1,15 @@
22 <?php
 3+session_start();
34 require_once 'WikiCommonFunction_TC.php';
 5+require_once 'Config.php';
 6+
47 /**
58 * This test case will be handling the search function.
69 * Date : Apr - 2010
710 * @author : BhagyaG - Calcey
811 */
912 class WikiSearch_TC extends WikiCommonFunction_TC {
 13+
1014 // Set up the testing environment
1115 function setup(){
1216 parent::setUp();
@@ -16,16 +20,16 @@
1721 parent::doOpenLink();
1822 parent::doLogin();
1923 $this->click("link=Main page");
20 - $this->type("//*[@id='searchInput']", "Hair (musical)");
 24+ $this->type("//*[@id='searchInput']", $_SESSION["WIKI_SEARCH_PAGE"]);
2125 $this->click("//*[@id='searchButton']");
22 - $this->waitForPageToLoad("30000");
 26+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
2327 try {
24 - $this->assertEquals("Hair (musical)", $this->getText("//*[@id='firstHeading']"));
 28+ $this->assertEquals($_SESSION["WIKI_SEARCH_PAGE"], $this->getText("//*[@id='firstHeading']"));
2529 } catch (PHPUnit_Framework_AssertionFailedError $e) {
2630 array_push($this->verificationErrors, $e->toString());
2731 }
2832 $this->click("link=Main page");
29 - $this->waitForPageToLoad("30000");
 33+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
3034 parent::doLogout();
3135 }
3236
@@ -34,22 +38,21 @@
3539 parent::doOpenLink();
3640 parent::doLogin();
3741 $this->click("link=Main page");
38 - $this->waitForPageToLoad("30000");
39 - $this->type("//*[@id='searchInput']", "TV");
 42+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
 43+ $this->type("//*[@id='searchInput']",$_SESSION["WIKI_SEARCH_TEXT"]);
4044 $this->click("searchButton");
41 - $this->waitForPageToLoad("30000");
 45+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
4246 try {
4347 $this->assertEquals("Search results", $this->getText("firstHeading"));
4448 } catch (PHPUnit_Framework_AssertionFailedError $e) {
4549 array_push($this->verificationErrors, $e->toString());
4650 }
4751 try {
48 - $this->assertEquals("TV - Search results - Wikipedia, the free encyclopedia", $this->getTitle());
 52+ $this->assertEquals($_SESSION["WIKI_SEARCH_TEXT"] . " - Search results - Wikipedia, the free encyclopedia", $this->getTitle());
4953 } catch (PHPUnit_Framework_AssertionFailedError $e) {
5054 array_push($this->verificationErrors, $e->toString());
5155 }
5256 parent::doLogout();
5357 }
54 -
5558 }
5659 ?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiTextFormat_TC.php
@@ -1,5 +1,7 @@
22 <?php
 3+session_start();
34 require_once 'WikiCommonFunction_TC.php';
 5+require_once 'Config.php';
46 /**
57 * This test case will be handling the text formatting related functions via tool bar
68 * Date : Apr - 2010
@@ -13,7 +15,7 @@
1416 $this->click("link=Bold");
1517 $this->type("wpTextbox1", "'''Bold''' text");
1618 $this->click("wpPreview");
17 - $this->waitForPageToLoad("30000");
 19+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
1820 try {
1921 $this->assertEquals("Bold", $this->getText("//div[@id='wikiPreview']/p/b"));
2022 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -27,7 +29,7 @@
2830 $this->click("link=Italic");
2931 $this->type("wpTextbox1", "''Italian'' text");
3032 $this->click("wpPreview");
31 - $this->waitForPageToLoad("30000");
 33+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
3234 $this->assertEquals("Italian", $this->getText("//div[@id='wikiPreview']/p/i"));
3335 }
3436
@@ -38,7 +40,7 @@
3941 $this->click("link=Bold");
4042 $this->type("wpTextbox1", "Text '''''Italic & Bold'''''");
4143 $this->click("wpPreview");
42 - $this->waitForPageToLoad("30000");
 44+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
4345 $this->assertEquals("Italic & Bold", $this->getText("//div[@id='wikiPreview']/p/i/b"));
4446 }
4547
@@ -52,7 +54,7 @@
5355 $this->click("link=Bulleted list");
5456 $this->type("wpTextbox1", "* Bulleted list item\n* Bulleted list item\n* Bulleted list item");
5557 $this->click("wpPreview");
56 - $this->waitForPageToLoad("30000");
 58+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
5759 try {
5860 $this->assertEquals("Bulleted list item", $this->getText("//div[@id='wikiPreview']/ul/li[1]"));
5961 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -79,7 +81,7 @@
8082 $this->click("link=Numbered list");
8183 $this->type("wpTextbox1", "# Numbered list item\n# Numbered list item\n# Numbered list item");
8284 $this->click("wpPreview");
83 - $this->waitForPageToLoad("30000");
 85+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
8486 try {
8587 $this->assertEquals("Numbered list item", $this->getText("//div[@id='wikiPreview']/ol/li[1]"));
8688 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -103,7 +105,7 @@
104106 $this->type("wpTextbox1", "");
105107 $this->type("wpTextbox1", "<nowiki>==Heading text==</nowiki>");
106108 $this->click("wpPreview");
107 - $this->waitForPageToLoad("30000");
 109+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
108110 try {
109111 $this->assertEquals("==Heading text==", $this->getText("//div[@id='wikiPreview']/p"));
110112 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -117,7 +119,7 @@
118120 $this->type("wpTextbox1", "");
119121 $this->type("wpTextbox1", "this is a test text to check the line\n break.");
120122 $this->click("wpPreview");
121 - $this->waitForPageToLoad("30000");
 123+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
122124 try {
123125 $this->assertEquals("this is a test text to check the line\n break.", $this->getText("//div[@id='wikiPreview']/p"));
124126 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -132,7 +134,7 @@
133135 $this->click("link=Big");
134136 $this->type("wpTextbox1", "<big>This</big> text");
135137 $this->click("wpPreview");
136 - $this->waitForPageToLoad("30000");
 138+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
137139 try {
138140 $this->assertEquals("This", $this->getText("//div[@id='wikiPreview']/p/big"));
139141 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -147,7 +149,7 @@
148150 $this->click("link=Small");
149151 $this->type("wpTextbox1", "<small>This</small> text\n");
150152 $this->click("wpPreview");
151 - $this->waitForPageToLoad("30000");
 153+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
152154 try {
153155 $this->assertEquals("This", $this->getText("//div[@id='wikiPreview']/p/small"));
154156 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -162,7 +164,7 @@
163165 $this->click("link=Superscript");
164166 $this->type("wpTextbox1", "<sup>This</sup> text\n");
165167 $this->click("wpPreview");
166 - $this->waitForPageToLoad("30000");
 168+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
167169 try {
168170 $this->assertEquals("This", $this->getText("//div[@id='wikiPreview']/p/sup"));
169171 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -177,7 +179,7 @@
178180 $this->click("link=Subscript");
179181 $this->type("wpTextbox1", "<sub>This</sub> text\n");
180182 $this->click("wpPreview");
181 - $this->waitForPageToLoad("30000");
 183+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
182184 try {
183185 $this->assertEquals("This", $this->getText("//div[@id='wikiPreview']/p/sub"));
184186 } catch (PHPUnit_Framework_AssertionFailedError $e) {
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiCommonFunction_TC.php
@@ -1,11 +1,13 @@
22 <?php
 3+session_start();
34 require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
 5+require_once 'Config.php';
46 /**
57 * This test case will be handling the common functions on test.
68 * Date : Apr - 2010
79 * @author : BhagyaG - Calcey
810 */
9 -class WikiCommonFunction_TC extends PHPUnit_Extensions_SeleniumTestCase {
 11+class WikiCommonFunction_TC extends PHPUnit_Extensions_SeleniumTestCase{
1012 /** Wiki server environment details.This array should be commented if the test
1113 * run on local browsers.
1214
@@ -24,43 +26,48 @@
2527 // Setting the local browser. this should be disabled if the test run in Wiki environment.
2628 $this->setBrowser("*firefox");
2729 // Main link to be connected
28 - $this->setBrowserUrl("http://prototype.wikimedia.org");
 30+ $this->setBrowserUrl($_SESSION["WIKI_WEB_URL"]);
 31+
2932 }
3033
3134 // Open the page.
3235 function doOpenLink(){
33 - $this->open("/deployment-en/Main_Page");
34 - $this->waitForPageToLoad("30000");
 36+ $this->open($_SESSION["WIKI_OPEN_PAGE"]);
 37+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
3538 }
3639
3740 // Login to the application
3841 function doLogin() {
3942 if (!$this->isTextPresent("Log out")) {
4043 $this->click("link=Log in / create account");
41 - $this->waitForPageToLoad("30000");
42 - $this->type("wpName1", "bhagya_qa");
43 - $this->type("wpPassword1", "test");
 44+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
 45+ $this->type("wpName1", $_SESSION["WIKI_USER_NAME"]);
 46+ $this->type("wpPassword1", $_SESSION["WIKI_USER_PASSWORD"]);
4447 $this->click("wpLoginAttempt");
45 - $this->waitForPageToLoad("30000");
 48+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
4649 try {
47 - $this->assertEquals("Bhagya qa", $this->getText("link=Bhagya qa"));
 50+ $this->assertEquals($_SESSION["WIKI_USER_DISPLAY_NAME"], $this->getText("link=" . $_SESSION["WIKI_USER_DISPLAY_NAME"]));
4851 } catch (PHPUnit_Framework_AssertionFailedError $e) {
4952 array_push($this->verificationErrors, $e->toString());
5053 }
 54+ $this->open($_SESSION["WIKI_OPEN_PAGE"]);
 55+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
5156 }
5257 }
5358
5459 // Log out from the application
5560 function doLogout() {
56 - $this->open("/deployment-en/Main_Page");
 61+ $this->open($_SESSION["WIKI_OPEN_PAGE"]);
5762 if ($this->isTextPresent("Log out")) {
5863 $this->click("link=Log out");
59 - $this->waitForPageToLoad("30000");
 64+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
6065 try {
6166 $this->assertEquals("Log in / create account", $this->getText("link=Log in / create account"));
6267 } catch (PHPUnit_Framework_AssertionFailedError $e) {
6368 array_push($this->verificationErrors, $e->toString());
6469 }
 70+ $this->open($_SESSION["WIKI_OPEN_PAGE"]);
 71+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
6572 }
6673 }
6774
@@ -75,17 +82,21 @@
7683 function doCreateNewPageTemporary() {
7784 $this->type("//*[@id='searchInput']", "TestWikiPaget");
7885 $this->click("//*[@id='searchButton']");
79 - $this->waitForPageToLoad("30000");
 86+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
8087 $this->click("link=TestWikiPaget");
81 - $this->waitForPageToLoad("30000");
 88+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
8289 }
8390
8491 //Access a random page
8592 function doAccessRandomPage() {
8693 $this->click("link=Random article");
87 - $this->waitForPageToLoad("30000");
 94+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
 95+ }
 96+
 97+ //Access a random page
 98+ function doEditPage() {
8899 $this->click("//li[@id='ca-edit']/a/span");
89 - $this->waitForPageToLoad("30000");
 100+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
90101 }
91102 }
92103 ?>
\ No newline at end of file
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiWatchUnWatch_TC.php
@@ -1,5 +1,7 @@
22 <?php
 3+session_start();
34 require_once 'WikiCommonFunction_TC.php';
 5+require_once 'Config.php';
46 /**
57 * This test case will be handling the page watch functions.
68 * Date : Apr - 2010
@@ -13,7 +15,6 @@
1416
1517 // Mark a page as watch and verify the My Watch list
1618 function testWatch(){
17 -
1819 parent::doOpenLink();
1920 parent::doLogin();
2021 $this->click("link=Random article");
@@ -60,9 +61,35 @@
6162
6263 }
6364
64 - /** function testEditWatch(){
 65+ // Mark a page as watch on page edit and verify the My Watch list
 66+ function testPageWatchonEdit(){
 67+ parent::doOpenLink();
 68+ parent::doLogin();
 69+ parent::doAccessRandomPage();
 70+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
 71+ $randompage = $this->getText("firstHeading");
 72+ parent::doEditPage();
 73+ try {
 74+ $this->assertEquals("Watch", $this->getText("link=Watch"));
 75+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 76+ array_push($this->verificationErrors, $e->toString());
 77+ }
 78+ $this->click("wpWatchthis");
 79+ $this->click("wpSave");
 80+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
 81+ try {
 82+ $this->assertEquals("Unwatch", $this->getText("link=Unwatch"));
 83+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 84+ array_push($this->verificationErrors, $e->toString());
 85+ }
 86+ $this->click("link=My watchlist");
 87+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
 88+ $this->click("link=View and edit watchlist");
 89+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
 90+ $this->assertTrue($this->isTextPresent($randompage));
6591
66 - }**/
 92+ parent::doLogout();
 93+ }
6794
6895 }
6996 ?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiDialogs_NewPage.php
@@ -11,156 +11,107 @@
1212 parent::setUp();
1313 }
1414
15 - // Add a internal link and verify
16 - function testInternalLink(){
 15+ //Create a new page temporary
 16+ function createNewPage(){
1717 parent::doOpenLink();
1818 parent::doLogin();
19 - $this->open("/deployment-en/Main_Page");
20 - $this->waitForPageToLoad("30000");
2119 parent::doCreateNewPageTemporary();
 20+ }
 21+
 22+ // Add a internal link and verify
 23+ function testInternalLink(){
 24+ $this->createNewPage();
2225 parent::verifyInternalLink();
2326 parent::doLogout();
2427 }
2528
2629 // Add a internal link with different display text and verify
2730 function testInternalLinkWithDisplayText(){
28 - parent::doOpenLink();
29 - parent::doLogin();
30 - $this->open("/deployment-en/Main_Page");
31 - $this->waitForPageToLoad("30000");
32 - parent::doCreateNewPageTemporary();
 31+ $this->createNewPage();
3332 parent::verifyInternalLinkWithDisplayText();
3433 parent::doLogout();
3534 }
3635
3736 // Add a internal link with blank display text and verify
3837 function testInternalLinkWithBlankDisplayText(){
39 - parent::doOpenLink();
40 - parent::doLogin();
41 - $this->open("/deployment-en/Main_Page");
42 - $this->waitForPageToLoad("30000");
43 - parent::doCreateNewPageTemporary();
 38+ $this->createNewPage();
4439 parent::verifyInternalLinkWithBlankDisplayText();
4540 parent::doLogout();
4641 }
4742
4843 // Add external link and verify
4944 function testExternalLink(){
50 - parent::doOpenLink();
51 - parent::doLogin();
52 - $this->open("/deployment-en/Main_Page");
53 - $this->waitForPageToLoad("30000");
54 - parent::doCreateNewPageTemporary();
 45+ $this->createNewPage();
5546 parent::verifyExternalLink();
5647 parent::doLogout();
5748 }
5849
5950 // Add external link with different display text and verify
6051 function testExternalLinkWithDisplayText(){
61 - parent::doOpenLink();
62 - parent::doLogin();
63 - $this->open("/deployment-en/Main_Page");
64 - $this->waitForPageToLoad("30000");
65 - parent::doCreateNewPageTemporary();
 52+ $this->createNewPage();
6653 parent::verifyExternalLinkWithDisplayText();
6754 parent::doLogout();
6855 }
6956
7057 // Add external link with Blank display text and verify
7158 function testExternalLinkWithBlankDisplayText(){
72 - parent::doOpenLink();
73 - parent::doLogin();
74 - $this->open("/deployment-en/Main_Page");
75 - $this->waitForPageToLoad("30000");
76 - parent::doCreateNewPageTemporary();
 59+ $this->createNewPage();
7760 parent::verifyExternalLinkWithBlankDisplayText();
7861 parent::doLogout();
7962 }
8063
8164 // Add a table and verify
8265 function testCreateTable(){
83 - parent::doOpenLink();
84 - parent::doLogin();
85 - $this->open("/deployment-en/Main_Page");
86 - $this->waitForPageToLoad("30000");
87 - parent::doCreateNewPageTemporary();
 66+ $this->createNewPage();
8867 parent::verifyCreateTable();
8968 parent::doLogout();
9069 }
9170
9271 // Add a table and verify only with head row
9372 function testCreateTableWithHeadRow(){
94 - parent::doOpenLink();
95 - parent::doLogin();
96 - $this->open("/deployment-en/Main_Page");
97 - $this->waitForPageToLoad("30000");
98 - parent::doCreateNewPageTemporary();
 73+ $this->createNewPage();;
9974 parent::verifyCreateTableWithHeadRow();
10075 parent::doLogout();
10176 }
10277
10378 // Add a table and verify only with borders
10479 function testCreateTableWithBorders(){
105 - parent::doOpenLink();
106 - parent::doLogin();
107 - $this->open("/deployment-en/Main_Page");
108 - $this->waitForPageToLoad("30000");
109 - parent::doCreateNewPageTemporary();
 80+ $this->createNewPage();
11081 parent::verifyCreateTableWithBorders();
11182 parent::doLogout();
11283 }
11384
11485 // Add a table and verify only with sort row
11586 function testCreateTableWithSortRow(){
116 - parent::doOpenLink();
117 - parent::doLogin();
118 - $this->open("/deployment-en/Main_Page");
119 - $this->waitForPageToLoad("30000");
120 - parent::doCreateNewPageTemporary();
 87+ $this->createNewPage();
12188 parent::verifyCreateTableWithSortRow();
12289 parent::doLogout();
12390 }
12491
12592 // Add a table without headers,borders and sort rows
12693 function testCreateTableWithNoSpecialEffects(){
127 - parent::doOpenLink();
128 - parent::doLogin();
129 - $this->open("/deployment-en/Main_Page");
130 - $this->waitForPageToLoad("30000");
131 - parent::doCreateNewPageTemporary();
 94+ $this->createNewPage();
13295 parent::verifyCreateTableWithNoSpecialEffects();
13396 parent::doLogout();
13497 }
13598
13699 // Verify the replace all function on Search and Replace
137100 function testTextSearchReplaceAll(){
138 - parent::doOpenLink();
139 - parent::doLogin();
140 - $this->open("/deployment-en/Main_Page");
141 - $this->waitForPageToLoad("30000");
142 - parent::doCreateNewPageTemporary();
 101+ $this->createNewPage();
143102 parent::verifyTextSearchReplaceAll();
144103 parent::doLogout();
145104 }
146105
147106 // Verify the replace next function on Search and Replace
148107 function testTextSearchReplaceNext(){
149 - parent::doOpenLink();
150 - parent::doLogin();
151 - $this->open("/deployment-en/Main_Page");
152 - $this->waitForPageToLoad("30000");
153 - parent::doCreateNewPageTemporary();
 108+ $this->createNewPage();
154109 parent::verifyTextSearchReplaceNext();
155110 parent::doLogout();
156111 }
157112
158113 // When user click on find, text highlight on back which is not captured in Selenium directly. */
159114 function testTextSearchFindNext(){
160 - parent::doOpenLink();
161 - parent::doLogin();
162 - $this->open("/deployment-en/Main_Page");
163 - $this->waitForPageToLoad("30000");
164 - parent::doCreateNewPageTemporary();
 115+ $this->createNewPage();
165116 parent::verifyTextSearchFindNext();
166117 parent::doLogout();
167118 }
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiNTOC_TC.php
@@ -1,5 +1,7 @@
22 <?php
 3+session_start();
34 require_once 'WikiCommonFunction_TC.php';
 5+require_once 'Config.php';
46 /*
57 * This test case will be handling the NTOC related functions.
68 * Adding different header levels via tool bar and verify the output
@@ -17,7 +19,7 @@
1820 $this->click("link=Level 2");
1921 $this->type("wpTextbox1", "==Heading text==");
2022 $this->click("wpPreview");
21 - $this->waitForPageToLoad("30000");
 23+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
2224 try {
2325 $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h2"));
2426 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -34,7 +36,7 @@
3537 $this->click("link=Level 3");
3638 $this->type("wpTextbox1", "===Heading text===");
3739 $this->click("wpPreview");
38 - $this->waitForPageToLoad("30000");
 40+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
3941 try {
4042 $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h3"));
4143 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -50,7 +52,7 @@
5153 $this->click("link=Level 4");
5254 $this->type("wpTextbox1", "====Heading text====");
5355 $this->click("wpPreview");
54 - $this->waitForPageToLoad("30000");
 56+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
5557 try {
5658 $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h4"));
5759 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -66,7 +68,7 @@
6769 $this->click("link=Level 5");
6870 $this->type("wpTextbox1", "=====Heading text=====");
6971 $this->click("wpPreview");
70 - $this->waitForPageToLoad("30000");
 72+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
7173 try {
7274 $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h5"));
7375 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -83,7 +85,7 @@
8486 $this->click("link=Level 3");
8587 $this->type("wpTextbox1", "==Heading text==\n===Heading text===");
8688 $this->click("wpPreview");
87 - $this->waitForPageToLoad("30000");
 89+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
8890 try {
8991 $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h2"));
9092 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -107,7 +109,7 @@
108110 $this->click("link=Level 4");
109111 $this->type("wpTextbox1", "==Heading text==\n===Heading text===\n====Heading text====");
110112 $this->click("wpPreview");
111 - $this->waitForPageToLoad("30000");
 113+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
112114 try {
113115 $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h2"));
114116 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -138,7 +140,7 @@
139141 $this->click("link=Level 5");
140142 $this->type("wpTextbox1", "==Heading text==\n===Heading text===\n====Heading text====\n=====Heading text=====");
141143 $this->click("wpPreview");
142 - $this->waitForPageToLoad("30000");
 144+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
143145 try {
144146 $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h2"));
145147 } catch (PHPUnit_Framework_AssertionFailedError $e) {
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiToolBarOther_TC.php
@@ -1,5 +1,7 @@
22 <?php
 3+session_start();
34 require_once 'WikiCommonFunction_TC.php';
 5+require_once 'Config.php';
46 /**
57 * This test case will be handling the general tool bar functions
68 * Date : Apr - 2010
@@ -12,7 +14,7 @@
1315 $this->type("wpTextbox1", "\" \"");
1416 $this->type("wpTextbox1", "[[File:Example.jpg]]");
1517 $this->click("wpPreview");
16 - $this->waitForPageToLoad("30000");
 18+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
1719 try {
1820 $this->assertEquals("", $this->getText("//img[@alt='Example.jpg']"));
1921 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -48,7 +50,7 @@
4951 $this->type("wpTextbox1", "");
5052 $this->click("link=Picture gallery");
5153 $this->click("wpPreview");
52 - $this->waitForPageToLoad("30000");
 54+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
5355 try {
5456 $this->assertEquals("", $this->getText("//div[@id='wikiPreview']/table/tbody/tr/td[1]/div/div[1]/div"));
5557 } catch (PHPUnit_Framework_AssertionFailedError $e) {
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiTextFormat_NewPage.php
@@ -12,123 +12,86 @@
1313 parent::setUp();
1414 }
1515
16 - // Mark text Bold and verify output
17 - function testTextBold(){
 16+ //Create a new page temporary
 17+ function createNewPage(){
1818 parent::doOpenLink();
1919 parent::doLogin();
20 - $this->open("/deployment-en/Main_Page");
21 - $this->waitForPageToLoad("30000");
2220 parent::doCreateNewPageTemporary();
 21+ }
 22+
 23+ // Mark text Bold and verify output
 24+ function testTextBold(){
 25+ $this->createNewPage();
2326 parent::verifyTextBold();
2427 parent::doLogout();
2528 }
2629
2730 // Mark text Italic and verify output
2831 function testTextItalic(){
29 - parent::doOpenLink();
30 - parent::doLogin();
31 - $this->open("/deployment-en/Main_Page");
32 - $this->waitForPageToLoad("30000");
33 - parent::doCreateNewPageTemporary();
 32+ $this->createNewPage();
3433 parent::verifyTextItalic();
3534 parent::doLogout();
3635 }
3736
3837 // Mark text Italic & Bold and verify output
3938 function testTextItalicandBold(){
40 - parent::doOpenLink();
41 - parent::doLogin();
42 - $this->open("/deployment-en/Main_Page");
43 - $this->waitForPageToLoad("30000");
44 - parent::doCreateNewPageTemporary();
 39+ $this->createNewPage();
4540 parent::verifyTextItalicandBold();
4641 parent::doLogout();
4742 }
4843
4944 // Use Bullet Item function and verify output
5045 function testBulletItem(){
51 - parent::doOpenLink();
52 - parent::doLogin();
53 - $this->open("/deployment-en/Main_Page");
54 - $this->waitForPageToLoad("30000");
55 - parent::doCreateNewPageTemporary();
 46+ $this->createNewPage();
5647 parent::verifyBulletItem();
5748 parent::doLogout();
5849 }
5950
6051 // Use Numbered Item function and verify output
6152 function testNumberedItem(){
62 - parent::doOpenLink();
63 - parent::doLogin();
64 - $this->open("/deployment-en/Main_Page");
65 - $this->waitForPageToLoad("30000");
66 - parent::doCreateNewPageTemporary();
 53+ $this->createNewPage();
6754 parent::verifyNumberedItem();
6855 parent::doLogout();
6956 }
7057
7158 // Mark text as Nowiki and verify output
7259 function testNoWiki(){
73 - parent::doOpenLink();
74 - parent::doLogin();
75 - $this->open("/deployment-en/Main_Page");
76 - $this->waitForPageToLoad("30000");
77 - parent::doCreateNewPageTemporary();
 60+ $this->createNewPage();
7861 parent::verifyNoWiki();
7962 parent::doLogout();
8063 }
8164
8265 // Create a line break and verify output
8366 function testLineBreak(){
84 - parent::doOpenLink();
85 - parent::doLogin();
86 - $this->open("/deployment-en/Main_Page");
87 - $this->waitForPageToLoad("30000");
88 - parent::doCreateNewPageTemporary();
 67+ $this->createNewPage();
8968 parent::verifyLineBreak();
9069 parent::doLogout();
9170 }
9271
9372 // Mark text as Big and verify output
9473 function testTextBig(){
95 - parent::doOpenLink();
96 - parent::doLogin();
97 - $this->open("/deployment-en/Main_Page");
98 - $this->waitForPageToLoad("30000");
99 - parent::doCreateNewPageTemporary();
 74+ $this->createNewPage();
10075 parent::verifyTextBig();
10176 parent::doLogout();
10277 }
10378
10479 // Mark text as Small and verify output
10580 function testTextSmall(){
106 - parent::doOpenLink();
107 - parent::doLogin();
108 - $this->open("/deployment-en/Main_Page");
109 - $this->waitForPageToLoad("30000");
110 - parent::doCreateNewPageTemporary();
 81+ $this->createNewPage();
11182 parent::verifyTextSmall();
11283 parent::doLogout();
11384 }
11485
11586 // Mark text as Super Script and verify output
11687 function testTextSuperscript(){
117 - parent::doOpenLink();
118 - parent::doLogin();
119 - $this->open("/deployment-en/Main_Page");
120 - $this->waitForPageToLoad("30000");
121 - parent::doCreateNewPageTemporary();
 88+ $this->createNewPage();
12289 parent::verifyTextSuperscript();
12390 parent::doLogout();
12491 }
12592
12693 // Mark text as Sub Script and verify output
12794 function testTextSubscript(){
128 - parent::doOpenLink();
129 - parent::doLogin();
130 - $this->open("/deployment-en/Main_Page");
131 - $this->waitForPageToLoad("30000");
132 - parent::doCreateNewPageTemporary();
 95+ $this->createNewPage();
13396 parent::verifyTextSubscript();
13497 parent::doLogout();
13598 }
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiTextFormat_ExistingPage.php
@@ -13,35 +13,31 @@
1414 parent::setUp();
1515 }
1616
17 - // Mark text Bold and verify output
18 - function testTextBold(){
 17+ //Open a random page
 18+ function openRandomPage(){
1919 parent::doOpenLink();
2020 parent::doLogin();
21 - $this->open("/deployment-en/Main_Page");
22 - $this->waitForPageToLoad("30000");
2321 parent::doAccessRandomPage();
 22+ parent::doEditPage();
 23+ }
 24+
 25+ // Mark text Bold and verify output
 26+ function testTextBold(){
 27+ $this->openRandomPage();
2428 parent::verifyTextBold();
2529 parent::doLogout();
2630 }
2731
2832 // Mark text Italic and verify output
2933 function testTextItalic(){
30 - parent::doOpenLink();
31 - parent::doLogin();
32 - $this->open("/deployment-en/Main_Page");
33 - $this->waitForPageToLoad("30000");
34 - parent::doAccessRandomPage();
 34+ $this->openRandomPage();
3535 parent::verifyTextItalic();
3636 parent::doLogout();
3737 }
3838
3939 // Mark text Italic & Bold and verify output
4040 function testTextItalicandBold(){
41 - parent::doOpenLink();
42 - parent::doLogin();
43 - $this->open("/deployment-en/Main_Page");
44 - $this->waitForPageToLoad("30000");
45 - parent::doAccessRandomPage();
 41+ $this->openRandomPage();
4642 parent::verifyTextItalicandBold();
4743 parent::doLogout();
4844 }
@@ -49,88 +45,56 @@
5046
5147 // Use Bullet Item function and verify output
5248 function testBulletItem(){
53 - parent::doOpenLink();
54 - parent::doLogin();
55 - $this->open("/deployment-en/Main_Page");
56 - $this->waitForPageToLoad("30000");
57 - parent::doAccessRandomPage();
 49+ $this->openRandomPage();
5850 parent::verifyBulletItem();
5951 parent::doLogout();
6052 }
6153
6254 // Use Numbered Item function and verify output
6355 function testNumberedItem(){
64 - parent::doOpenLink();
65 - parent::doLogin();
66 - $this->open("/deployment-en/Main_Page");
67 - $this->waitForPageToLoad("30000");
68 - parent::doAccessRandomPage();
 56+ $this->openRandomPage();
6957 parent::verifyNumberedItem();
7058 parent::doLogout();
7159 }
7260
7361 // Mark text as Nowiki and verify output
7462 function testNoWiki(){
75 - parent::doOpenLink();
76 - parent::doLogin();
77 - $this->open("/deployment-en/Main_Page");
78 - $this->waitForPageToLoad("30000");
79 - parent::doAccessRandomPage();
 63+ $this->openRandomPage();
8064 parent::verifyNoWiki();
8165 parent::doLogout();
8266 }
8367
8468 // Create a line break and verify output
8569 function testLineBreak(){
86 - parent::doOpenLink();
87 - parent::doLogin();
88 - $this->open("/deployment-en/Main_Page");
89 - $this->waitForPageToLoad("30000");
90 - parent::doAccessRandomPage();
 70+ $this->openRandomPage();
9171 parent::verifyLineBreak();
9272 parent::doLogout();
9373 }
9474
9575 // Mark text as Big and verify output
9676 function testTextBig(){
97 - parent::doOpenLink();
98 - parent::doLogin();
99 - $this->open("/deployment-en/Main_Page");
100 - $this->waitForPageToLoad("30000");
101 - parent::doAccessRandomPage();
 77+ $this->openRandomPage();
10278 parent::verifyTextBig();
10379 parent::doLogout();
10480 }
10581
10682 // Mark text as Small and verify output
10783 function testTextSmall(){
108 - parent::doOpenLink();
109 - parent::doLogin();
110 - $this->open("/deployment-en/Main_Page");
111 - $this->waitForPageToLoad("30000");
112 - parent::doAccessRandomPage();
 84+ $this->openRandomPage();
11385 parent::verifyTextSmall();
11486 parent::doLogout();
11587 }
11688
11789 // Mark text as Super Script and verify output
11890 function testTextSuperscript(){
119 - parent::doOpenLink();
120 - parent::doLogin();
121 - $this->open("/deployment-en/Main_Page");
122 - $this->waitForPageToLoad("30000");
123 - parent::doAccessRandomPage();
 91+ $this->openRandomPage();
12492 parent::verifyTextSuperscript();
12593 parent::doLogout();
12694 }
12795
12896 // Mark text as Sub Script and verify output
12997 function testTextSubscript(){
130 - parent::doOpenLink();
131 - parent::doLogin();
132 - $this->open("/deployment-en/Main_Page");
133 - $this->waitForPageToLoad("30000");
134 - parent::doAccessRandomPage();
 98+ $this->openRandomPage();
13599 parent::verifyTextSubscript();
136100 parent::doLogout();
137101 }
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiDialogs_TC.php
@@ -1,5 +1,7 @@
22 <?php
 3+session_start();
34 require_once 'WikiCommonFunction_TC.php';
 5+require_once 'Config.php';
46 /**
57 * This test case will be handling the Wiki Tool bar Dialog functions
68 * Date : Apr - 2010
@@ -11,21 +13,21 @@
1214 function verifyInternalLink(){
1315 $this->type("wpTextbox1", "");
1416 $this->click("link=Link");
15 - $this->type("wikieditor-toolbar-link-int-target", "Daimler-Chrysler");
 17+ $this->type("wikieditor-toolbar-link-int-target", $_SESSION["WIKI_INTERNAL_LINK"]);
1618 $this->assertTrue($this->isElementPresent("wikieditor-toolbar-link-int-target-status-exists"));
1719 $this->assertEquals("on", $this->getValue("wikieditor-toolbar-link-type-int"));
1820 $this->click("//div[13]/div[11]/button[1]");
1921 $this->click("wpPreview");
20 - $this->waitForPageToLoad("30000");
 22+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
2123 try {
22 - $this->assertEquals("Daimler-Chrysler", $this->getText("link=Daimler-Chrysler"));
 24+ $this->assertEquals($_SESSION["WIKI_INTERNAL_LINK"], $this->getText("link=" . $_SESSION["WIKI_INTERNAL_LINK"]));
2325 } catch (PHPUnit_Framework_AssertionFailedError $e) {
2426 array_push($this->verificationErrors, $e->toString());
2527 }
2628 $this->click("link=Daimler-Chrysler");
27 - $this->waitForPageToLoad("30000");
 29+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
2830 try {
29 - $this->assertTrue($this->isTextPresent("Daimler-Chrysler"), $this->getText("firstHeading"));
 31+ $this->assertTrue($this->isTextPresent($_SESSION["WIKI_INTERNAL_LINK"]), $this->getText("firstHeading"));
3032 } catch (PHPUnit_Framework_AssertionFailedError $e) {
3133 array_push($this->verificationErrors, $e->toString());
3234 }
@@ -36,22 +38,22 @@
3739 $this->type("wpTextbox1", "");
3840 $this->click("link=Link");
3941 $this->type("wpTextbox1", "");
40 - $this->type("wikieditor-toolbar-link-int-target", "Fashion Island");
41 - $this->type("wikieditor-toolbar-link-int-text", "Fashion Island Test");
 42+ $this->type("wikieditor-toolbar-link-int-target", $_SESSION["WIKI_INTERNAL_LINK"]);
 43+ $this->type("wikieditor-toolbar-link-int-text", $_SESSION["WIKI_INTERNAL_LINK"] . " Test");
4244 $this->assertTrue($this->isElementPresent("wikieditor-toolbar-link-int-target-status-exists"));
4345 $this->assertEquals("on", $this->getValue("wikieditor-toolbar-link-type-int"));
4446 $this->click("//div[13]/div[11]/button[1]");
4547 $this->click("wpPreview");
46 - $this->waitForPageToLoad("30000");
 48+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
4749 try {
48 - $this->assertEquals("Fashion Island Test", $this->getText("link=Fashion Island Test"));
 50+ $this->assertEquals($_SESSION["WIKI_INTERNAL_LINK"]." Test", $this->getText("link=" .$_SESSION["WIKI_INTERNAL_LINK"] ." Test"));
4951 } catch (PHPUnit_Framework_AssertionFailedError $e) {
5052 array_push($this->verificationErrors, $e->toString());
5153 }
52 - $this->click("link=Fashion Island Test");
53 - $this->waitForPageToLoad("30000");
 54+ $this->click("link=" .$_SESSION["WIKI_INTERNAL_LINK"]." Test");
 55+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
5456 try {
55 - $this->assertTrue($this->isTextPresent("Fashion Island"), $this->getText("firstHeading"));
 57+ $this->assertTrue($this->isTextPresent($_SESSION["WIKI_INTERNAL_LINK"]), $this->getText("firstHeading"));
5658 } catch (PHPUnit_Framework_AssertionFailedError $e) {
5759 array_push($this->verificationErrors, $e->toString());
5860 }
@@ -60,22 +62,22 @@
6163 // Add a internal link with blank display text and verify
6264 function verifyInternalLinkWithBlankDisplayText(){
6365 $this->click("link=Link");
64 - $this->type("wikieditor-toolbar-link-int-target", "Magical Mystery Tour (film)");
 66+ $this->type("wikieditor-toolbar-link-int-target", $_SESSION["WIKI_INTERNAL_LINK"]);
6567 $this->type("wikieditor-toolbar-link-int-text", "");
6668 $this->assertTrue($this->isElementPresent("wikieditor-toolbar-link-int-target-status-exists"));
6769 $this->assertEquals("on", $this->getValue("wikieditor-toolbar-link-type-int"));
6870 $this->click("//div[13]/div[11]/button[1]");
6971 $this->click("wpPreview");
70 - $this->waitForPageToLoad("30000");
 72+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
7173 try {
72 - $this->assertEquals("Magical Mystery Tour (film)", $this->getText("link=Magical Mystery Tour (film)"));
 74+ $this->assertEquals($_SESSION["WIKI_INTERNAL_LINK"], $this->getText("link=".$_SESSION["WIKI_INTERNAL_LINK"]));
7375 } catch (PHPUnit_Framework_AssertionFailedError $e) {
7476 array_push($this->verificationErrors, $e->toString());
7577 }
76 - $this->click("link=Magical Mystery Tour (film)");
77 - $this->waitForPageToLoad("30000");
 78+ $this->click("link=".$_SESSION["WIKI_INTERNAL_LINK"]);
 79+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
7880 try {
79 - $this->assertEquals("Magical Mystery Tour (film)", $this->getText("firstHeading"));
 81+ $this->assertEquals($_SESSION["WIKI_INTERNAL_LINK"], $this->getText("firstHeading"));
8082 } catch (PHPUnit_Framework_AssertionFailedError $e) {
8183 array_push($this->verificationErrors, $e->toString());
8284 }
@@ -94,16 +96,16 @@
9597 $this->assertEquals("on", $this->getValue("wikieditor-toolbar-link-type-ext"));
9698 $this->click("//div[13]/div[11]/button[1]");
9799 $this->click("wpPreview");
98 - $this->waitForPageToLoad("30000");
 100+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
99101 try {
100 - $this->assertEquals("www.google.com", $this->getText("link=www.google.com"));
 102+ $this->assertEquals($_SESSION["WIKI_EXTERNAL_LINK"], $this->getText("link=".$_SESSION["WIKI_EXTERNAL_LINK"]));
101103 } catch (PHPUnit_Framework_AssertionFailedError $e) {
102104 array_push($this->verificationErrors, $e->toString());
103105 }
104 - $this->click("link=www.google.com");
105 - $this->waitForPageToLoad("30000");
 106+ $this->click("link=".$_SESSION["WIKI_EXTERNAL_LINK"]);
 107+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
106108 try {
107 - $this->assertEquals("Google", $this->getTitle());
 109+ $this->assertEquals($_SESSION["WIKI_EXTERNAL_LINK_TITLE"], $this->getTitle());
108110 } catch (PHPUnit_Framework_AssertionFailedError $e) {
109111 array_push($this->verificationErrors, $e->toString());
110112 }
@@ -113,8 +115,8 @@
114116 function verifyExternalLinkWithDisplayText(){
115117 $this->type("wpTextbox1", "");
116118 $this->click("link=Link");
117 - $this->type("wikieditor-toolbar-link-int-target", "www.google.com");
118 - $this->type("wikieditor-toolbar-link-int-text", "Google");
 119+ $this->type("wikieditor-toolbar-link-int-target", $_SESSION["WIKI_EXTERNAL_LINK"]);
 120+ $this->type("wikieditor-toolbar-link-int-text", $_SESSION["WIKI_EXTERNAL_LINK_TITLE"]);
119121 try {
120122 $this->assertEquals("External link", $this->getText("wikieditor-toolbar-link-int-target-status-external"));
121123 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -123,16 +125,16 @@
124126 $this->assertEquals("on", $this->getValue("wikieditor-toolbar-link-type-ext"));
125127 $this->click("//div[13]/div[11]/button[1]");
126128 $this->click("wpPreview");
127 - $this->waitForPageToLoad("30000");
 129+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
128130 try {
129 - $this->assertEquals("Google", $this->getText("link=Google"));
 131+ $this->assertEquals($_SESSION["WIKI_EXTERNAL_LINK_TITLE"], $this->getText("link=".$_SESSION["WIKI_EXTERNAL_LINK_TITLE"]));
130132 } catch (PHPUnit_Framework_AssertionFailedError $e) {
131133 array_push($this->verificationErrors, $e->toString());
132134 }
133 - $this->click("link=Google");
134 - $this->waitForPageToLoad("30000");
 135+ $this->click("link=".$_SESSION["WIKI_EXTERNAL_LINK_TITLE"]);
 136+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
135137 try {
136 - $this->assertEquals("Google", $this->getTitle());
 138+ $this->assertEquals($_SESSION["WIKI_EXTERNAL_LINK_TITLE"], $this->getTitle());
137139 } catch (PHPUnit_Framework_AssertionFailedError $e) {
138140 array_push($this->verificationErrors, $e->toString());
139141 }
@@ -143,7 +145,7 @@
144146 function verifyExternalLinkWithBlankDisplayText(){
145147 $this->type("wpTextbox1", "");
146148 $this->click("link=Link");
147 - $this->type("wikieditor-toolbar-link-int-target", "www.google.com");
 149+ $this->type("wikieditor-toolbar-link-int-target", $_SESSION["WIKI_EXTERNAL_LINK"]);
148150 $this->type("wikieditor-toolbar-link-int-text", "");
149151 try {
150152 $this->assertEquals("External link", $this->getText("wikieditor-toolbar-link-int-target-status-external"));
@@ -153,16 +155,16 @@
154156 $this->assertEquals("on", $this->getValue("wikieditor-toolbar-link-type-ext"));
155157 $this->click("//div[13]/div[11]/button[1]");
156158 $this->click("wpPreview");
157 - $this->waitForPageToLoad("30000");
 159+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
158160 try {
159161 $this->assertEquals("[1]", $this->getText("link=[1]"));
160162 } catch (PHPUnit_Framework_AssertionFailedError $e) {
161163 array_push($this->verificationErrors, $e->toString());
162164 }
163165 $this->click("link=[1]");
164 - $this->waitForPageToLoad("30000");
 166+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
165167 try {
166 - $this->assertEquals("Google", $this->getTitle());
 168+ $this->assertEquals($_SESSION["WIKI_EXTERNAL_LINK_TITLE"], $this->getTitle());
167169 } catch (PHPUnit_Framework_AssertionFailedError $e) {
168170 array_push($this->verificationErrors, $e->toString());
169171 }
@@ -178,7 +180,7 @@
179181 $this->click("//div[3]/button[1]");
180182 $this->click("wikieditor-toolbar-table-sortable");
181183 $this->click("wpPreview");
182 - $this->waitForPageToLoad("30000");
 184+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
183185 try {
184186 $this->assertEquals("Header text", $this->getText("//table[@id='sortable_table_id_0']/tbody/tr[1]/th[3]"));
185187 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -197,7 +199,7 @@
198200 $this->click("//div[3]/button[1]");
199201 $this->click("wikieditor-toolbar-table-wikitable");
200202 $this->click("wpPreview");
201 - $this->waitForPageToLoad("30000");
 203+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
202204 try {
203205 $this->assertEquals("Header text", $this->getTable("//div[@id='wikiPreview']/table.0.0"));
204206 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -214,7 +216,7 @@
215217 $this->click("//div[3]/button[1]");
216218 $this->click("wikieditor-toolbar-table-dimensions-header");
217219 $this->click("wpPreview");
218 - $this->waitForPageToLoad("30000");
 220+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
219221 try {
220222 $this->assertEquals("Example", $this->getTable("//div[@id='wikiPreview']/table.1.3"));
221223 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -236,7 +238,7 @@
237239 $this->click("wikieditor-toolbar-table-wikitable");
238240 $this->click("wikieditor-toolbar-table-sortable");
239241 $this->click("wpPreview");
240 - $this->waitForPageToLoad("30000");
 242+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
241243 try {
242244 $this->assertEquals("Example", $this->getTable("sortable_table_id_0.0.0"));
243245 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -257,7 +259,7 @@
258260 $this->click("wikieditor-toolbar-table-dimensions-header");
259261 $this->click("wikieditor-toolbar-table-wikitable");
260262 $this->click("wpPreview");
261 - $this->waitForPageToLoad("30000");
 263+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
262264 try {
263265 $this->assertEquals("Example", $this->getTable("//div[@id='wikiPreview']/table.0.0"));
264266 } catch (PHPUnit_Framework_AssertionFailedError $e) {
@@ -270,26 +272,25 @@
271273 parent::doExpandAdvanceSection();
272274 $this->type("wpTextbox1", "");
273275 $this->click("link=Search and replace");
274 - $this->type("wpTextbox1", "calcey qa\n\ncalcey qa\n\ncalcey qa");
275 - $this->type("wikieditor-toolbar-replace-search", "calcey");
276 - $this->type("wikieditor-toolbar-replace-search", "calcey qa");
277 - $this->type("wikieditor-toolbar-replace-replace", "test team");
 276+ $this->type("wpTextbox1", $_SESSION["WIKI_SAMPLE_TEXT"]);
 277+ $this->type("wikieditor-toolbar-replace-search", $_SESSION["WIKI_SEARCH_TEXT"]);
 278+ $this->type("wikieditor-toolbar-replace-replace", $_SESSION["WIKI_REPLACE_TEXT"]);
278279 $this->click("//button[3]");
279280 $this->click("//button[4]");
280281 $this->click("wpPreview");
281 - $this->waitForPageToLoad("30000");
 282+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
282283 try {
283 - $this->assertEquals("test team", $this->getText("//div[@id='wikiPreview']/p[1]"));
 284+ $this->assertEquals($_SESSION["WIKI_REPLACE_TEXT"], $this->getText("//div[@id='wikiPreview']/p[1]"));
284285 } catch (PHPUnit_Framework_AssertionFailedError $e) {
285286 array_push($this->verificationErrors, $e->toString());
286287 }
287288 try {
288 - $this->assertEquals("test team", $this->getText("//div[@id='wikiPreview']/p[2]"));
 289+ $this->assertEquals($_SESSION["WIKI_REPLACE_TEXT"], $this->getText("//div[@id='wikiPreview']/p[2]"));
289290 } catch (PHPUnit_Framework_AssertionFailedError $e) {
290291 array_push($this->verificationErrors, $e->toString());
291292 }
292293 try {
293 - $this->assertEquals("test team", $this->getText("//div[@id='wikiPreview']/p[3]"));
 294+ $this->assertEquals($_SESSION["WIKI_REPLACE_TEXT"], $this->getText("//div[@id='wikiPreview']/p[3]"));
294295 } catch (PHPUnit_Framework_AssertionFailedError $e) {
295296 array_push($this->verificationErrors, $e->toString());
296297 }
@@ -300,28 +301,28 @@
301302 parent::doExpandAdvanceSection();
302303 $this->type("wpTextbox1", "");
303304 $this->click("link=Search and replace");
304 - $this->type("wpTextbox1", "calcey qa\n\ncalcey qa\n\ncalcey qa");
 305+ $this->type("wpTextbox1", $_SESSION["WIKI_SAMPLE_TEXT"]);
305306 $this->click("link=Search and replace");
306 - $this->type("wpTextbox1", "calcey qa\n\ncalcey qa\n\ncalcey qa");
307 - $this->type("wikieditor-toolbar-replace-search", "calcey qa");
308 - $this->type("wikieditor-toolbar-replace-replace", "test team");
 307+ $this->type("wpTextbox1", $_SESSION["WIKI_SAMPLE_TEXT"]);
 308+ $this->type("wikieditor-toolbar-replace-search", $_SESSION["WIKI_SEARCH_TEXT"]);
 309+ $this->type("wikieditor-toolbar-replace-replace", $_SESSION["WIKI_REPLACE_TEXT"]);
309310 $this->click("//div[13]/div[11]/button[2]");
310311 $this->click("//div[13]/div[11]/button[2]");
311312 $this->click("//button[4]");
312313 $this->click("wpPreview");
313 - $this->waitForPageToLoad("30000");
 314+ $this->waitForPageToLoad($_SESSION["WIKI_TEST_WAIT_TIME"]);
314315 try {
315 - $this->assertEquals("test team", $this->getText("//div[@id='wikiPreview']/p[1]"));
 316+ $this->assertEquals($_SESSION["WIKI_REPLACE_TEXT"], $this->getText("//div[@id='wikiPreview']/p[1]"));
316317 } catch (PHPUnit_Framework_AssertionFailedError $e) {
317318 array_push($this->verificationErrors, $e->toString());
318319 }
319320 try {
320 - $this->assertEquals("test team", $this->getText("//div[@id='wikiPreview']/p[2]"));
 321+ $this->assertEquals($_SESSION["WIKI_REPLACE_TEXT"], $this->getText("//div[@id='wikiPreview']/p[2]"));
321322 } catch (PHPUnit_Framework_AssertionFailedError $e) {
322323 array_push($this->verificationErrors, $e->toString());
323324 }
324325 try {
325 - $this->assertEquals("calcey qa", $this->getText("//div[@id='wikiPreview']/p[3]"));
 326+ $this->assertEquals($_SESSION["WIKI_SEARCH_TEXT"], $this->getText("//div[@id='wikiPreview']/p[3]"));
326327 } catch (PHPUnit_Framework_AssertionFailedError $e) {
327328 array_push($this->verificationErrors, $e->toString());
328329 }
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiNTOC_NewPage.php
@@ -12,80 +12,59 @@
1313 function setup(){
1414 parent::setUp();
1515 }
16 -
17 - // Add header level 2 and verify Header output
18 - function testHeaderLevel2(){
 16+
 17+ //Create a new page temporary
 18+ function createNewPage(){
1919 parent::doOpenLink();
2020 parent::doLogin();
21 - $this->open("/deployment-en/Main_Page");
22 - $this->waitForPageToLoad("30000");
2321 parent::doCreateNewPageTemporary();
 22+ }
 23+
 24+ // Add header level 2 and verify Header output
 25+ function testHeaderLevel2(){
 26+ $this->createNewPage();
2427 parent::verifyHeaderLevel2();
2528 parent::doLogout();
2629 }
2730
2831 // Add header level 3 and verify Header output
2932 function testHeaderLevel3(){
30 - parent::doOpenLink();
31 - parent::doLogin();
32 - $this->open("/deployment-en/Main_Page");
33 - $this->waitForPageToLoad("30000");
34 - parent::doCreateNewPageTemporary();
 33+ $this->createNewPage();
3534 parent::verifyHeaderLevel3();
3635 parent::doLogout();
3736 }
3837
3938 // Add header level 4 and verify Header output
4039 function testHeaderLevel4(){
41 - parent::doOpenLink();
42 - parent::doLogin();
43 - $this->open("/deployment-en/Main_Page");
44 - $this->waitForPageToLoad("30000");
45 - parent::doCreateNewPageTemporary();
 40+ $this->createNewPage();
4641 parent::verifyHeaderLevel4();
4742 parent::doLogout();
4843 }
4944
5045 // Add header level 5 and verify Header output
5146 function testHeaderLevel5(){
52 - parent::doOpenLink();
53 - parent::doLogin();
54 - $this->open("/deployment-en/Main_Page");
55 - $this->waitForPageToLoad("30000");
56 - parent::doCreateNewPageTemporary();
 47+ $this->createNewPage();
5748 parent::verifyHeaderLevel5();
5849 parent::doLogout();
5950 }
6051
6152 // Add header level 2 & 3 and verify Header output
6253 function testHeaderLevel2and3(){
63 - parent::doOpenLink();
64 - parent::doLogin();
65 - $this->open("/deployment-en/Main_Page");
66 - $this->waitForPageToLoad("30000");
67 - parent::doCreateNewPageTemporary();
 54+ $this->createNewPage();
6855 parent::verifyHeaderLevel2and3();
6956 parent::doLogout();
7057 }
7158
7259 // Add header level 2 , 3 & 4 and verify Header output
7360 function testHeaderLevel23and4(){
74 - parent::doOpenLink();
75 - parent::doLogin();
76 - $this->open("/deployment-en/Main_Page");
77 - $this->waitForPageToLoad("30000");
78 - parent::doCreateNewPageTemporary();
 61+ $this->createNewPage();
7962 parent::verifyHeaderLevel23and4();
8063 parent::doLogout();
8164 }
8265
8366 // Add header level 2 , 3 , 4 & 5 and verify Header output
8467 function testHeaderLevel234and5(){
85 - parent::doOpenLink();
86 - parent::doLogin();
87 - $this->open("/deployment-en/Main_Page");
88 - $this->waitForPageToLoad("30000");
89 - parent::doCreateNewPageTemporary();
 68+ $this->createNewPage();
9069 parent::verifyHeaderLevel234and5();
9170 parent::doLogout();
9271 }
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiNTOC_ ExistingPage.php
@@ -13,79 +13,59 @@
1414 parent::setUp();
1515 }
1616
17 - // Add header level 2 and verify Header output
18 - function testHeaderLevel2(){
 17+ //Open a random page
 18+ function openRandomPage(){
1919 parent::doOpenLink();
2020 parent::doLogin();
21 - $this->open("/deployment-en/Main_Page");
22 - $this->waitForPageToLoad("30000");
2321 parent::doAccessRandomPage();
 22+ parent::doEditPage();
 23+ }
 24+
 25+ // Add header level 2 and verify Header output
 26+ function testHeaderLevel2(){
 27+ $this->openRandomPage();
2428 parent::verifyHeaderLevel2();
2529 parent::doLogout();
2630 }
2731
2832 // Add header level 3 and verify Header output
2933 function testHeaderLevel3(){
30 - parent::doOpenLink();
31 - parent::doLogin();
32 - $this->open("/deployment-en/Main_Page");
33 - $this->waitForPageToLoad("30000");
34 - parent::doAccessRandomPage();
 34+ $this->openRandomPage();;
3535 parent::verifyHeaderLevel3();
3636 parent::doLogout();
3737 }
3838
3939 // Add header level 4 and verify Header output
4040 function testHeaderLevel4(){
41 - parent::doOpenLink();
42 - parent::doLogin();
43 - $this->open("/deployment-en/Main_Page");
44 - $this->waitForPageToLoad("30000");
45 - parent::doAccessRandomPage();
 41+ $this->openRandomPage();
4642 parent::verifyHeaderLevel4();
4743 parent::doLogout();
4844 }
4945
5046 // Add header level 5 and verify Header output
5147 function testHeaderLevel5(){
52 - parent::doOpenLink();
53 - parent::doLogin();
54 - $this->open("/deployment-en/Main_Page");
55 - $this->waitForPageToLoad("30000");
56 - parent::doAccessRandomPage();
 48+ $this->openRandomPage();
5749 parent::verifyHeaderLevel5();
5850 parent::doLogout();
5951 }
6052
6153 // Add header level 2 & 3 and verify Header output
6254 function testHeaderLevel2and3(){
63 - parent::doOpenLink();
64 - parent::doLogin();
65 - $this->open("/deployment-en/Main_Page");
66 - $this->waitForPageToLoad("30000");
67 - parent::doAccessRandomPage();
 55+ $this->openRandomPage();
6856 parent::verifyHeaderLevel2and3();
6957 parent::doLogout();
7058 }
7159
7260 // Add header level 2 , 3 & 4 and verify Header output
7361 function testHeaderLevel23and4(){
74 - parent::doOpenLink();
75 - parent::doLogin();
76 - $this->open("/deployment-en/Main_Page");
77 - $this->waitForPageToLoad("30000");
78 - parent::doAccessRandomPage();
 62+ $this->openRandomPage();;
7963 parent::verifyHeaderLevel23and4();
8064 parent::doLogout();
8165 }
8266
8367 // Add header level 2 , 3 , 4 & 5 and verify Header output
8468 function testHeaderLevel234and5(){
85 - parent::doOpenLink();
86 - parent::doLogin();
87 - $this->open("/deployment-en/Main_Page");
88 - $this->waitForPageToLoad("30000");
89 - parent::doAccessRandomPage();
 69+ $this->openRandomPage();
9070 parent::verifyHeaderLevel234and5();
9171 parent::doLogout();
9272 }
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiToolBarOther_NewPage.php
@@ -1,6 +1,5 @@
22 <?php
33 require_once 'WikiToolBarOther_TC.php';
4 -
54 /**
65 * Description of WikiNewPageOther
76 *
@@ -13,24 +12,24 @@
1413 parent::setUp();
1514 }
1615
17 - // Click on Embedded file function and verify the output
18 - function testEmbeddedFile(){
 16+
 17+ //Create a new page temporary
 18+ function createNewPage(){
1919 parent::doOpenLink();
2020 parent::doLogin();
21 - $this->open("/deployment-en/Main_Page");
22 - $this->waitForPageToLoad("30000");
2321 parent::doCreateNewPageTemporary();
 22+ }
 23+
 24+ // Click on Embedded file function and verify the output
 25+ function testEmbeddedFile(){
 26+ $this->createNewPage();
2427 parent::verifyEmbeddedFile();
2528 parent::doLogout();
2629 }
2730
2831 // Click on Picture Gallery function and verify the output
2932 function testPictureGallery(){
30 - parent::doOpenLink();
31 - parent::doLogin();
32 - $this->open("/deployment-en/Main_Page");
33 - $this->waitForPageToLoad("30000");
34 - parent::doCreateNewPageTemporary();
 33+ $this->createNewPage();
3534 parent::verifyPictureGallery();
3635 parent::doLogout();
3736 }
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiToolBarOther_ExistingPage.php
@@ -1,5 +1,6 @@
22 <?php
33 require_once 'WikiToolBarOther_TC.php';
 4+
45 /**
56 * Description of WikiExistingPageOther
67 *
@@ -12,24 +13,24 @@
1314 parent::setUp();
1415 }
1516
16 - // Click on Embedded file function and verify the output
17 - function testEmbeddedFile(){
 17+ //Open a random page
 18+ function openRandomPage(){
1819 parent::doOpenLink();
1920 parent::doLogin();
20 - $this->open("/deployment-en/Main_Page");
21 - $this->waitForPageToLoad("30000");
2221 parent::doAccessRandomPage();
 22+ parent::doEditPage();
 23+ }
 24+
 25+ // Click on Embedded file function and verify the output
 26+ function testEmbeddedFile(){
 27+ $this->openRandomPage();
2328 parent::verifyEmbeddedFile();
2429 parent::doLogout();
2530 }
2631
2732 // Click on Picture Gallery function and verify the output
2833 function testPictureGallery(){
29 - parent::doOpenLink();
30 - parent::doLogin();
31 - $this->open("/deployment-en/Main_Page");
32 - $this->waitForPageToLoad("30000");
33 - parent::doAccessRandomPage();
 34+ $this->openRandomPage();
3435 parent::verifyPictureGallery();
3536 parent::doLogout();
3637 }

Status & tagging log