r65423 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65422‎ | r65423 | r65424 >
Date:11:22, 22 April 2010
Author:bhagya
Status:deferred
Tags:
Comment:
Last update as of 22nd Apr 2010
Modified paths:
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikSearch_TC.php (added) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiCommonFunction_TC.php (added) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiDialogs_ExsistingPage.php (added) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiDialogs_NewPage.php (added) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiDialogs_TC.php (added) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiNTOC_+ExistingPage.php (added) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiNTOC_NewPage.php (added) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiNTOC_TC.php (added) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiPreferences_TC.php (added) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiTestSuite.php (modified) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiTextFormat_ExistingPage.php (added) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiTextFormat_NewPage.php (added) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiTextFormat_TC.php (added) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiToolBarOther_ExistingPage.php (added) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiToolBarOther_NewPage.php (added) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiToolBarOther_TC.php (added) (history)
  • /trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiWatchUnWatch_TC.php (added) (history)

Diff [purge]

Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiDialogs_TC.php
@@ -0,0 +1,342 @@
 2+<?php
 3+require_once 'WikiCommonFunction_TC.php';
 4+/**
 5+ * This test case will be handling the Wiki Tool bar Dialog functions
 6+ * Date : Apr - 2010
 7+ * @author : BhagyaG - Calcey
 8+ */
 9+class WikiDialogs_TC extends WikiCommonFunction_TC {
 10+
 11+ // Add a internal link and verify
 12+ function verifyInternalLink(){
 13+ $this->type("wpTextbox1", "");
 14+ $this->click("link=Link");
 15+ $this->type("wikieditor-toolbar-link-int-target", "Daimler-Chrysler");
 16+ $this->assertTrue($this->isElementPresent("wikieditor-toolbar-link-int-target-status-exists"));
 17+ $this->assertEquals("on", $this->getValue("wikieditor-toolbar-link-type-int"));
 18+ $this->click("//div[13]/div[11]/button[1]");
 19+ $this->click("wpPreview");
 20+ $this->waitForPageToLoad("30000");
 21+ try {
 22+ $this->assertEquals("Daimler-Chrysler", $this->getText("link=Daimler-Chrysler"));
 23+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 24+ array_push($this->verificationErrors, $e->toString());
 25+ }
 26+ $this->click("link=Daimler-Chrysler");
 27+ $this->waitForPageToLoad("30000");
 28+ try {
 29+ $this->assertTrue($this->isTextPresent("Daimler-Chrysler"), $this->getText("firstHeading"));
 30+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 31+ array_push($this->verificationErrors, $e->toString());
 32+ }
 33+ }
 34+
 35+ // Add a internal link with different display text and verify
 36+ function verifyInternalLinkWithDisplayText(){
 37+ $this->type("wpTextbox1", "");
 38+ $this->click("link=Link");
 39+ $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->assertTrue($this->isElementPresent("wikieditor-toolbar-link-int-target-status-exists"));
 43+ $this->assertEquals("on", $this->getValue("wikieditor-toolbar-link-type-int"));
 44+ $this->click("//div[13]/div[11]/button[1]");
 45+ $this->click("wpPreview");
 46+ $this->waitForPageToLoad("30000");
 47+ try {
 48+ $this->assertEquals("Fashion Island Test", $this->getText("link=Fashion Island Test"));
 49+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 50+ array_push($this->verificationErrors, $e->toString());
 51+ }
 52+ $this->click("link=Fashion Island Test");
 53+ $this->waitForPageToLoad("30000");
 54+ try {
 55+ $this->assertTrue($this->isTextPresent("Fashion Island"), $this->getText("firstHeading"));
 56+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 57+ array_push($this->verificationErrors, $e->toString());
 58+ }
 59+ }
 60+
 61+ // Add a internal link with blank display text and verify
 62+ function verifyInternalLinkWithBlankDisplayText(){
 63+ $this->click("link=Link");
 64+ $this->type("wikieditor-toolbar-link-int-target", "Magical Mystery Tour (film)");
 65+ $this->type("wikieditor-toolbar-link-int-text", "");
 66+ $this->assertTrue($this->isElementPresent("wikieditor-toolbar-link-int-target-status-exists"));
 67+ $this->assertEquals("on", $this->getValue("wikieditor-toolbar-link-type-int"));
 68+ $this->click("//div[13]/div[11]/button[1]");
 69+ $this->click("wpPreview");
 70+ $this->waitForPageToLoad("30000");
 71+ try {
 72+ $this->assertEquals("Magical Mystery Tour (film)", $this->getText("link=Magical Mystery Tour (film)"));
 73+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 74+ array_push($this->verificationErrors, $e->toString());
 75+ }
 76+ $this->click("link=Magical Mystery Tour (film)");
 77+ $this->waitForPageToLoad("30000");
 78+ try {
 79+ $this->assertEquals("Magical Mystery Tour (film)", $this->getText("firstHeading"));
 80+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 81+ array_push($this->verificationErrors, $e->toString());
 82+ }
 83+ }
 84+
 85+ // Add external link and verify
 86+ function verifyExternalLink(){
 87+ $this->type("wpTextbox1", "");
 88+ $this->click("link=Link");
 89+ $this->type("wikieditor-toolbar-link-int-target", "www.google.com");
 90+ try {
 91+ $this->assertEquals("External link", $this->getText("wikieditor-toolbar-link-int-target-status-external"));
 92+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 93+ array_push($this->verificationErrors, $e->toString());
 94+ }
 95+ $this->assertEquals("on", $this->getValue("wikieditor-toolbar-link-type-ext"));
 96+ $this->click("//div[13]/div[11]/button[1]");
 97+ $this->click("wpPreview");
 98+ $this->waitForPageToLoad("30000");
 99+ try {
 100+ $this->assertEquals("www.google.com", $this->getText("link=www.google.com"));
 101+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 102+ array_push($this->verificationErrors, $e->toString());
 103+ }
 104+ $this->click("link=www.google.com");
 105+ $this->waitForPageToLoad("30000");
 106+ try {
 107+ $this->assertEquals("Google", $this->getTitle());
 108+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 109+ array_push($this->verificationErrors, $e->toString());
 110+ }
 111+ }
 112+
 113+ // Add external link with different display text and verify
 114+ function verifyExternalLinkWithDisplayText(){
 115+ $this->type("wpTextbox1", "");
 116+ $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+ try {
 120+ $this->assertEquals("External link", $this->getText("wikieditor-toolbar-link-int-target-status-external"));
 121+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 122+ array_push($this->verificationErrors, $e->toString());
 123+ }
 124+ $this->assertEquals("on", $this->getValue("wikieditor-toolbar-link-type-ext"));
 125+ $this->click("//div[13]/div[11]/button[1]");
 126+ $this->click("wpPreview");
 127+ $this->waitForPageToLoad("30000");
 128+ try {
 129+ $this->assertEquals("Google", $this->getText("link=Google"));
 130+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 131+ array_push($this->verificationErrors, $e->toString());
 132+ }
 133+ $this->click("link=Google");
 134+ $this->waitForPageToLoad("30000");
 135+ try {
 136+ $this->assertEquals("Google", $this->getTitle());
 137+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 138+ array_push($this->verificationErrors, $e->toString());
 139+ }
 140+
 141+ }
 142+
 143+ // Add external link with Blank display text and verify
 144+ function verifyExternalLinkWithBlankDisplayText(){
 145+ $this->type("wpTextbox1", "");
 146+ $this->click("link=Link");
 147+ $this->type("wikieditor-toolbar-link-int-target", "www.google.com");
 148+ $this->type("wikieditor-toolbar-link-int-text", "");
 149+ try {
 150+ $this->assertEquals("External link", $this->getText("wikieditor-toolbar-link-int-target-status-external"));
 151+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 152+ array_push($this->verificationErrors, $e->toString());
 153+ }
 154+ $this->assertEquals("on", $this->getValue("wikieditor-toolbar-link-type-ext"));
 155+ $this->click("//div[13]/div[11]/button[1]");
 156+ $this->click("wpPreview");
 157+ $this->waitForPageToLoad("30000");
 158+ try {
 159+ $this->assertEquals("[1]", $this->getText("link=[1]"));
 160+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 161+ array_push($this->verificationErrors, $e->toString());
 162+ }
 163+ $this->click("link=[1]");
 164+ $this->waitForPageToLoad("30000");
 165+ try {
 166+ $this->assertEquals("Google", $this->getTitle());
 167+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 168+ array_push($this->verificationErrors, $e->toString());
 169+ }
 170+ }
 171+
 172+ // Add a table and verify
 173+ function verifyCreateTable(){
 174+ parent::doExpandAdvanceSection();
 175+ $this->type("wpTextbox1", "");
 176+ $this->click("link=Table");
 177+ $this->type("wpTextbox1", "");
 178+ $this->click("wikieditor-toolbar-table-sortable");
 179+ $this->click("//div[3]/button[1]");
 180+ $this->click("wikieditor-toolbar-table-sortable");
 181+ $this->click("wpPreview");
 182+ $this->waitForPageToLoad("30000");
 183+ try {
 184+ $this->assertEquals("Header text", $this->getText("//table[@id='sortable_table_id_0']/tbody/tr[1]/th[3]"));
 185+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 186+ array_push($this->verificationErrors, $e->toString());
 187+ }
 188+ }
 189+
 190+ // Add a table and verify only with head row
 191+ function verifyCreateTableWithHeadRow(){
 192+ parent::doExpandAdvanceSection();
 193+ $this->type("wpTextbox1", "");
 194+ $this->click("link=Table");
 195+ $this->click("wikieditor-toolbar-table-wikitable");
 196+ $this->type("wikieditor-toolbar-table-dimensions-rows", "4");
 197+ $this->type("wikieditor-toolbar-table-dimensions-columns", "4");
 198+ $this->click("//div[3]/button[1]");
 199+ $this->click("wikieditor-toolbar-table-wikitable");
 200+ $this->click("wpPreview");
 201+ $this->waitForPageToLoad("30000");
 202+ try {
 203+ $this->assertEquals("Header text", $this->getTable("//div[@id='wikiPreview']/table.0.0"));
 204+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 205+ array_push($this->verificationErrors, $e->toString());
 206+ }
 207+ }
 208+
 209+ // Add a table and verify only with borders
 210+ function verifyCreateTableWithBorders(){
 211+ $this->type("wpTextbox1", "");
 212+ $this->click("link=Table");
 213+ $this->click("wikieditor-toolbar-table-dimensions-header");
 214+ $this->type("wikieditor-toolbar-table-dimensions-columns", "5");
 215+ $this->click("//div[3]/button[1]");
 216+ $this->click("wikieditor-toolbar-table-dimensions-header");
 217+ $this->click("wpPreview");
 218+ $this->waitForPageToLoad("30000");
 219+ try {
 220+ $this->assertEquals("Example", $this->getTable("//div[@id='wikiPreview']/table.1.3"));
 221+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 222+ array_push($this->verificationErrors, $e->toString());
 223+ }
 224+ }
 225+
 226+ // Add a table and verify only with sort row
 227+ function verifyCreateTableWithSortRow(){
 228+ $this->type("wpTextbox1", "");
 229+ $this->click("link=Table");
 230+ $this->click("wikieditor-toolbar-table-dimensions-header");
 231+ $this->click("wikieditor-toolbar-table-wikitable");
 232+ $this->click("wikieditor-toolbar-table-sortable");
 233+ $this->type("wikieditor-toolbar-table-dimensions-rows", "2");
 234+ $this->type("wikieditor-toolbar-table-dimensions-columns", "5");
 235+ $this->click("//div[3]/button[1]");
 236+ $this->click("wikieditor-toolbar-table-dimensions-header");
 237+ $this->click("wikieditor-toolbar-table-wikitable");
 238+ $this->click("wikieditor-toolbar-table-sortable");
 239+ $this->click("wpPreview");
 240+ $this->waitForPageToLoad("30000");
 241+ try {
 242+ $this->assertEquals("Example", $this->getTable("sortable_table_id_0.0.0"));
 243+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 244+ array_push($this->verificationErrors, $e->toString());
 245+ }
 246+ }
 247+
 248+ // Add a table without headers,borders and sort rows
 249+ function verifyCreateTableWithNoSpecialEffects(){
 250+ parent::doExpandAdvanceSection();
 251+ $this->type("wpTextbox1", "");
 252+ $this->click("link=Table");
 253+ $this->click("wikieditor-toolbar-table-wikitable");
 254+ $this->click("wikieditor-toolbar-table-dimensions-header");
 255+ $this->type("wikieditor-toolbar-table-dimensions-rows", "6");
 256+ $this->type("wikieditor-toolbar-table-dimensions-columns", "2");
 257+ $this->click("//div[3]/button[1]");
 258+ $this->click("wikieditor-toolbar-table-dimensions-header");
 259+ $this->click("wikieditor-toolbar-table-wikitable");
 260+ $this->click("wpPreview");
 261+ $this->waitForPageToLoad("30000");
 262+ try {
 263+ $this->assertEquals("Example", $this->getTable("//div[@id='wikiPreview']/table.0.0"));
 264+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 265+ array_push($this->verificationErrors, $e->toString());
 266+ }
 267+ }
 268+
 269+ // Verify the replace all function on Search and Replace
 270+ function verifyTextSearchReplaceAll(){
 271+ parent::doExpandAdvanceSection();
 272+ $this->type("wpTextbox1", "");
 273+ $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");
 278+ $this->click("//button[3]");
 279+ $this->click("//button[4]");
 280+ $this->click("wpPreview");
 281+ $this->waitForPageToLoad("30000");
 282+ try {
 283+ $this->assertEquals("test team", $this->getText("//div[@id='wikiPreview']/p[1]"));
 284+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 285+ array_push($this->verificationErrors, $e->toString());
 286+ }
 287+ try {
 288+ $this->assertEquals("test team", $this->getText("//div[@id='wikiPreview']/p[2]"));
 289+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 290+ array_push($this->verificationErrors, $e->toString());
 291+ }
 292+ try {
 293+ $this->assertEquals("test team", $this->getText("//div[@id='wikiPreview']/p[3]"));
 294+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 295+ array_push($this->verificationErrors, $e->toString());
 296+ }
 297+ }
 298+
 299+ // Verify the replace next function on Search and Replace
 300+ function verifyTextSearchReplaceNext(){
 301+ parent::doExpandAdvanceSection();
 302+ $this->type("wpTextbox1", "");
 303+ $this->click("link=Search and replace");
 304+ $this->type("wpTextbox1", "calcey qa\n\ncalcey qa\n\ncalcey qa");
 305+ $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");
 309+ $this->click("//div[13]/div[11]/button[2]");
 310+ $this->click("//div[13]/div[11]/button[2]");
 311+ $this->click("//button[4]");
 312+ $this->click("wpPreview");
 313+ $this->waitForPageToLoad("30000");
 314+ try {
 315+ $this->assertEquals("test team", $this->getText("//div[@id='wikiPreview']/p[1]"));
 316+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 317+ array_push($this->verificationErrors, $e->toString());
 318+ }
 319+ try {
 320+ $this->assertEquals("test team", $this->getText("//div[@id='wikiPreview']/p[2]"));
 321+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 322+ array_push($this->verificationErrors, $e->toString());
 323+ }
 324+ try {
 325+ $this->assertEquals("calcey qa", $this->getText("//div[@id='wikiPreview']/p[3]"));
 326+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 327+ array_push($this->verificationErrors, $e->toString());
 328+ }
 329+ }
 330+
 331+ /*
 332+ * // When user click on find, text highlight on back which is not captured in Selenium directly.
 333+ function verifyTextSearchFindNext(){
 334+ parent::doExpandAdvanceSection();
 335+ $this->type("wpTextbox1", "");
 336+ $this->type("wpTextbox1", "test qa\ntest qa\ntest qa");
 337+ $this->click("link=Search and replace");
 338+ $this->type("wikieditor-toolbar-replace-search", "Test");
 339+
 340+ }
 341+ */
 342+}
 343+?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiNTOC_NewPage.php
@@ -0,0 +1,93 @@
 2+<?php
 3+require_once 'WikiNTOC_TC.php';
 4+/**
 5+ * This test case will be handling the NTOC related functions by creating a new page temporary.
 6+ * Adding different header levels via tool bar and verify the output
 7+ * Date : Apr - 2010
 8+ * @author : BhagyaG - Calcey
 9+ */
 10+class WikiNTOC_NewPage extends WikiNTOC_TC {
 11+
 12+ // Set up the testing environment
 13+ function setup(){
 14+ parent::setUp();
 15+ }
 16+
 17+ // Add header level 2 and verify Header output
 18+ function testHeaderLevel2(){
 19+ parent::doOpenLink();
 20+ parent::doLogin();
 21+ $this->open("/deployment-en/Main_Page");
 22+ $this->waitForPageToLoad("30000");
 23+ parent::doCreateNewPageTemporary();
 24+ parent::verifyHeaderLevel2();
 25+ parent::doLogout();
 26+ }
 27+
 28+ // Add header level 3 and verify Header output
 29+ function testHeaderLevel3(){
 30+ parent::doOpenLink();
 31+ parent::doLogin();
 32+ $this->open("/deployment-en/Main_Page");
 33+ $this->waitForPageToLoad("30000");
 34+ parent::doCreateNewPageTemporary();
 35+ parent::verifyHeaderLevel3();
 36+ parent::doLogout();
 37+ }
 38+
 39+ // Add header level 4 and verify Header output
 40+ function testHeaderLevel4(){
 41+ parent::doOpenLink();
 42+ parent::doLogin();
 43+ $this->open("/deployment-en/Main_Page");
 44+ $this->waitForPageToLoad("30000");
 45+ parent::doCreateNewPageTemporary();
 46+ parent::verifyHeaderLevel4();
 47+ parent::doLogout();
 48+ }
 49+
 50+ // Add header level 5 and verify Header output
 51+ function testHeaderLevel5(){
 52+ parent::doOpenLink();
 53+ parent::doLogin();
 54+ $this->open("/deployment-en/Main_Page");
 55+ $this->waitForPageToLoad("30000");
 56+ parent::doCreateNewPageTemporary();
 57+ parent::verifyHeaderLevel5();
 58+ parent::doLogout();
 59+ }
 60+
 61+ // Add header level 2 & 3 and verify Header output
 62+ function testHeaderLevel2and3(){
 63+ parent::doOpenLink();
 64+ parent::doLogin();
 65+ $this->open("/deployment-en/Main_Page");
 66+ $this->waitForPageToLoad("30000");
 67+ parent::doCreateNewPageTemporary();
 68+ parent::verifyHeaderLevel2and3();
 69+ parent::doLogout();
 70+ }
 71+
 72+ // Add header level 2 , 3 & 4 and verify Header output
 73+ function testHeaderLevel23and4(){
 74+ parent::doOpenLink();
 75+ parent::doLogin();
 76+ $this->open("/deployment-en/Main_Page");
 77+ $this->waitForPageToLoad("30000");
 78+ parent::doCreateNewPageTemporary();
 79+ parent::verifyHeaderLevel23and4();
 80+ parent::doLogout();
 81+ }
 82+
 83+ // Add header level 2 , 3 , 4 & 5 and verify Header output
 84+ function testHeaderLevel234and5(){
 85+ parent::doOpenLink();
 86+ parent::doLogin();
 87+ $this->open("/deployment-en/Main_Page");
 88+ $this->waitForPageToLoad("30000");
 89+ parent::doCreateNewPageTemporary();
 90+ parent::verifyHeaderLevel234and5();
 91+ parent::doLogout();
 92+ }
 93+}
 94+?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiNTOC_ ExistingPage.php
@@ -0,0 +1,94 @@
 2+<?php
 3+require_once 'WikiNTOC_TC.php';
 4+/**
 5+ * This test case will be handling the NTOC related functions.
 6+ * Adding different header levels via tool bar and verify the output
 7+ * Date : Apr - 2010
 8+ * @author : BhagyaG - Calcey
 9+ */
 10+class WikiNTOC_ExistingPage extends WikiNTOC_TC{
 11+
 12+ // Set up the testing environment
 13+ function setup(){
 14+ parent::setUp();
 15+ }
 16+
 17+ // Add header level 2 and verify Header output
 18+ function testHeaderLevel2(){
 19+ parent::doOpenLink();
 20+ parent::doLogin();
 21+ $this->open("/deployment-en/Main_Page");
 22+ $this->waitForPageToLoad("30000");
 23+ parent::doAccessRandomPage();
 24+ parent::verifyHeaderLevel2();
 25+ parent::doLogout();
 26+ }
 27+
 28+ // Add header level 3 and verify Header output
 29+ function testHeaderLevel3(){
 30+ parent::doOpenLink();
 31+ parent::doLogin();
 32+ $this->open("/deployment-en/Main_Page");
 33+ $this->waitForPageToLoad("30000");
 34+ parent::doAccessRandomPage();
 35+ parent::verifyHeaderLevel3();
 36+ parent::doLogout();
 37+ }
 38+
 39+ // Add header level 4 and verify Header output
 40+ function testHeaderLevel4(){
 41+ parent::doOpenLink();
 42+ parent::doLogin();
 43+ $this->open("/deployment-en/Main_Page");
 44+ $this->waitForPageToLoad("30000");
 45+ parent::doAccessRandomPage();
 46+ parent::verifyHeaderLevel4();
 47+ parent::doLogout();
 48+ }
 49+
 50+ // Add header level 5 and verify Header output
 51+ function testHeaderLevel5(){
 52+ parent::doOpenLink();
 53+ parent::doLogin();
 54+ $this->open("/deployment-en/Main_Page");
 55+ $this->waitForPageToLoad("30000");
 56+ parent::doAccessRandomPage();
 57+ parent::verifyHeaderLevel5();
 58+ parent::doLogout();
 59+ }
 60+
 61+ // Add header level 2 & 3 and verify Header output
 62+ function testHeaderLevel2and3(){
 63+ parent::doOpenLink();
 64+ parent::doLogin();
 65+ $this->open("/deployment-en/Main_Page");
 66+ $this->waitForPageToLoad("30000");
 67+ parent::doAccessRandomPage();
 68+ parent::verifyHeaderLevel2and3();
 69+ parent::doLogout();
 70+ }
 71+
 72+ // Add header level 2 , 3 & 4 and verify Header output
 73+ function testHeaderLevel23and4(){
 74+ parent::doOpenLink();
 75+ parent::doLogin();
 76+ $this->open("/deployment-en/Main_Page");
 77+ $this->waitForPageToLoad("30000");
 78+ parent::doAccessRandomPage();
 79+ parent::verifyHeaderLevel23and4();
 80+ parent::doLogout();
 81+ }
 82+
 83+ // Add header level 2 , 3 , 4 & 5 and verify Header output
 84+ function testHeaderLevel234and5(){
 85+ parent::doOpenLink();
 86+ parent::doLogin();
 87+ $this->open("/deployment-en/Main_Page");
 88+ $this->waitForPageToLoad("30000");
 89+ parent::doAccessRandomPage();
 90+ parent::verifyHeaderLevel234and5();
 91+ parent::doLogout();
 92+ }
 93+
 94+}
 95+?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiToolBarOther_NewPage.php
@@ -0,0 +1,38 @@
 2+<?php
 3+require_once 'WikiToolBarOther_TC.php';
 4+
 5+/**
 6+ * Description of WikiNewPageOther
 7+ *
 8+ * @author bhagyag
 9+ */
 10+class WikiToolBarOther_NewPage extends WikiToolBarOther_TC {
 11+
 12+ // Set up the testing environment
 13+ function setup(){
 14+ parent::setUp();
 15+ }
 16+
 17+ // Click on Embedded file function and verify the output
 18+ function testEmbeddedFile(){
 19+ parent::doOpenLink();
 20+ parent::doLogin();
 21+ $this->open("/deployment-en/Main_Page");
 22+ $this->waitForPageToLoad("30000");
 23+ parent::doCreateNewPageTemporary();
 24+ parent::verifyEmbeddedFile();
 25+ parent::doLogout();
 26+ }
 27+
 28+ // Click on Picture Gallery function and verify the output
 29+ function testPictureGallery(){
 30+ parent::doOpenLink();
 31+ parent::doLogin();
 32+ $this->open("/deployment-en/Main_Page");
 33+ $this->waitForPageToLoad("30000");
 34+ parent::doCreateNewPageTemporary();
 35+ parent::verifyPictureGallery();
 36+ parent::doLogout();
 37+ }
 38+}
 39+?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiToolBarOther_ExistingPage.php
@@ -0,0 +1,37 @@
 2+<?php
 3+require_once 'WikiToolBarOther_TC.php';
 4+/**
 5+ * Description of WikiExistingPageOther
 6+ *
 7+ * @author bhagyag
 8+ */
 9+class WikiToolBarOther_ExistingPage extends WikiToolBarOther_TC {
 10+
 11+ // Set up the testing environment
 12+ function setup(){
 13+ parent::setUp();
 14+ }
 15+
 16+ // Click on Embedded file function and verify the output
 17+ function testEmbeddedFile(){
 18+ parent::doOpenLink();
 19+ parent::doLogin();
 20+ $this->open("/deployment-en/Main_Page");
 21+ $this->waitForPageToLoad("30000");
 22+ parent::doAccessRandomPage();
 23+ parent::verifyEmbeddedFile();
 24+ parent::doLogout();
 25+ }
 26+
 27+ // Click on Picture Gallery function and verify the output
 28+ function testPictureGallery(){
 29+ parent::doOpenLink();
 30+ parent::doLogin();
 31+ $this->open("/deployment-en/Main_Page");
 32+ $this->waitForPageToLoad("30000");
 33+ parent::doAccessRandomPage();
 34+ parent::verifyPictureGallery();
 35+ parent::doLogout();
 36+ }
 37+}
 38+?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiDialogs_ExsistingPage.php
@@ -0,0 +1,169 @@
 2+<?php
 3+require_once 'WikiDialogs_TC.php';
 4+
 5+/**
 6+ * Description of WikiExsistingPageDialogs
 7+ *
 8+ * @author bhagyag
 9+ */
 10+class WikiDialogs_ExsistingPage extends WikiDialogs_TC {
 11+ // Set up the testing environment
 12+ function setup(){
 13+ parent::setUp();
 14+ }
 15+
 16+ // Add a internal link and verify
 17+ function testInternalLink(){
 18+ parent::doOpenLink();
 19+ parent::doLogin();
 20+ $this->open("/deployment-en/Main_Page");
 21+ $this->waitForPageToLoad("30000");
 22+ parent::doAccessRandomPage();
 23+ parent::verifyInternalLink();
 24+ parent::doLogout();
 25+ }
 26+
 27+ // Add a internal link with different display text and verify
 28+ function testInternalLinkWithDisplayText(){
 29+ parent::doOpenLink();
 30+ parent::doLogin();
 31+ $this->open("/deployment-en/Main_Page");
 32+ $this->waitForPageToLoad("30000");
 33+ parent::doAccessRandomPage();
 34+ parent::verifyInternalLinkWithDisplayText();
 35+ parent::doLogout();
 36+ }
 37+
 38+ // Add a internal link with blank display text and verify
 39+ function testInternalLinkWithBlankDisplayText(){
 40+ parent::doOpenLink();
 41+ parent::doLogin();
 42+ $this->open("/deployment-en/Main_Page");
 43+ $this->waitForPageToLoad("30000");
 44+ parent::doAccessRandomPage();
 45+ parent::verifyInternalLinkWithBlankDisplayText();
 46+ parent::doLogout();
 47+ }
 48+
 49+ // Add external link and verify
 50+ function testExternalLink(){
 51+ parent::doOpenLink();
 52+ parent::doLogin();
 53+ $this->open("/deployment-en/Main_Page");
 54+ $this->waitForPageToLoad("30000");
 55+ parent::doAccessRandomPage();
 56+ parent::verifyExternalLink();
 57+ parent::doLogout();
 58+ }
 59+
 60+ // Add external link with different display text and verify
 61+ function testExternalLinkWithDisplayText(){
 62+ parent::doOpenLink();
 63+ parent::doLogin();
 64+ $this->open("/deployment-en/Main_Page");
 65+ $this->waitForPageToLoad("30000");
 66+ parent::doAccessRandomPage();
 67+ parent::verifyExternalLinkWithDisplayText();
 68+ parent::doLogout();
 69+ }
 70+
 71+ // Add external link with Blank display text and verify
 72+ function testExternalLinkWithBlankDisplayText(){
 73+ parent::doOpenLink();
 74+ parent::doLogin();
 75+ $this->open("/deployment-en/Main_Page");
 76+ $this->waitForPageToLoad("30000");
 77+ parent::doAccessRandomPage();
 78+ parent::verifyExternalLinkWithBlankDisplayText();
 79+ parent::doLogout();
 80+ }
 81+
 82+ // Add a table and verify
 83+ function testCreateTable(){
 84+ parent::doOpenLink();
 85+ parent::doLogin();
 86+ $this->open("/deployment-en/Main_Page");
 87+ $this->waitForPageToLoad("30000");
 88+ parent::doAccessRandomPage();
 89+ parent::verifyCreateTable();
 90+ parent::doLogout();
 91+ }
 92+
 93+ // Add a table and verify only with head row
 94+ function testCreateTableWithHeadRow(){
 95+ parent::doOpenLink();
 96+ parent::doLogin();
 97+ $this->open("/deployment-en/Main_Page");
 98+ $this->waitForPageToLoad("30000");
 99+ parent::doAccessRandomPage();
 100+ parent::verifyCreateTableWithHeadRow();
 101+ parent::doLogout();
 102+ }
 103+
 104+ // Add a table and verify only with borders
 105+ function testCreateTableWithBorders(){
 106+ parent::doOpenLink();
 107+ parent::doLogin();
 108+ $this->open("/deployment-en/Main_Page");
 109+ $this->waitForPageToLoad("30000");
 110+ parent::doAccessRandomPage();
 111+ parent::verifyCreateTableWithBorders();
 112+ parent::doLogout();
 113+ }
 114+
 115+ // Add a table and verify only with sort row
 116+ function testCreateTableWithSortRow(){
 117+ parent::doOpenLink();
 118+ parent::doLogin();
 119+ $this->open("/deployment-en/Main_Page");
 120+ $this->waitForPageToLoad("30000");
 121+ parent::doAccessRandomPage();
 122+ parent::verifyCreateTableWithSortRow();
 123+ parent::doLogout();
 124+ }
 125+
 126+ // Add a table without headers,borders and sort rows
 127+ function testCreateTableWithNoSpecialEffects(){
 128+ parent::doOpenLink();
 129+ parent::doLogin();
 130+ $this->open("/deployment-en/Main_Page");
 131+ $this->waitForPageToLoad("30000");
 132+ parent::doAccessRandomPage();
 133+ parent::verifyCreateTableWithNoSpecialEffects();
 134+ parent::doLogout();
 135+ }
 136+
 137+ // Verify the replace all function on Search and Replace
 138+ function testTextSearchReplaceAll(){
 139+ parent::doOpenLink();
 140+ parent::doLogin();
 141+ $this->open("/deployment-en/Main_Page");
 142+ $this->waitForPageToLoad("30000");
 143+ parent::doAccessRandomPage();
 144+ parent::verifyTextSearchReplaceAll();
 145+ parent::doLogout();
 146+ }
 147+
 148+ // Verify the replace next function on Search and Replace
 149+ function testTextSearchReplaceNext(){
 150+ parent::doOpenLink();
 151+ parent::doLogin();
 152+ $this->open("/deployment-en/Main_Page");
 153+ $this->waitForPageToLoad("30000");
 154+ parent::doAccessRandomPage();
 155+ parent::verifyTextSearchReplaceNext();
 156+ parent::doLogout();
 157+ }
 158+
 159+ // When user click on find, text highlight on back which is not captured in Selenium directly. */
 160+ /* function testTextSearchFindNext(){
 161+ parent::doOpenLink();
 162+ parent::doLogin();
 163+ $this->open("/deployment-en/Main_Page");
 164+ $this->waitForPageToLoad("30000");
 165+ parent::doAccessRandomPage();
 166+ parent::verifyTextSearchFindNext();
 167+ parent::doLogout();
 168+ }*/
 169+}
 170+?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikSearch_TC.php
@@ -0,0 +1,55 @@
 2+<?php
 3+require_once 'WikiCommonFunction_TC.php';
 4+/**
 5+ * This test case will be handling the search function.
 6+ * Date : Apr - 2010
 7+ * @author : BhagyaG - Calcey
 8+ */
 9+class WikiSearch_TC extends WikiCommonFunction_TC {
 10+ // Set up the testing environment
 11+ function setup(){
 12+ parent::setUp();
 13+ }
 14+
 15+ // Search for a Wiki Page. Search result should be directed to the page itself
 16+ function testSearchPage(){
 17+ parent::doOpenLink();
 18+ parent::doLogin();
 19+ $this->click("link=Main page");
 20+ $this->type("//*[@id='searchInput']", "Hair (musical)");
 21+ $this->click("//*[@id='searchButton']");
 22+ $this->waitForPageToLoad("30000");
 23+ try {
 24+ $this->assertEquals("Hair (musical)", $this->getText("//*[@id='firstHeading']"));
 25+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 26+ array_push($this->verificationErrors, $e->toString());
 27+ }
 28+ $this->click("link=Main page");
 29+ $this->waitForPageToLoad("30000");
 30+ parent::doLogout();
 31+ }
 32+
 33+ // Search for a text. Search result should display links which contain the search text
 34+ function testSearchText(){
 35+ parent::doOpenLink();
 36+ parent::doLogin();
 37+ $this->click("link=Main page");
 38+ $this->waitForPageToLoad("30000");
 39+ $this->type("//*[@id='searchInput']", "TV");
 40+ $this->click("searchButton");
 41+ $this->waitForPageToLoad("30000");
 42+ try {
 43+ $this->assertEquals("Search results", $this->getText("firstHeading"));
 44+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 45+ array_push($this->verificationErrors, $e->toString());
 46+ }
 47+ try {
 48+ $this->assertEquals("TV - Search results - Wikipedia, the free encyclopedia", $this->getTitle());
 49+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 50+ array_push($this->verificationErrors, $e->toString());
 51+ }
 52+ parent::doLogout();
 53+ }
 54+
 55+}
 56+?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiTextFormat_TC.php
@@ -0,0 +1,188 @@
 2+<?php
 3+require_once 'WikiCommonFunction_TC.php';
 4+/**
 5+ * This test case will be handling the text formatting related functions via tool bar
 6+ * Date : Apr - 2010
 7+ * @author : BhagyaG - Calcey
 8+ */
 9+class WikiTextFormat_TC extends WikiCommonFunction_TC {
 10+
 11+ // Mark text Bold and verify output
 12+ function verifyTextBold(){
 13+ $this->type("wpTextbox1", "");
 14+ $this->click("link=Bold");
 15+ $this->type("wpTextbox1", "'''Bold''' text");
 16+ $this->click("wpPreview");
 17+ $this->waitForPageToLoad("30000");
 18+ try {
 19+ $this->assertEquals("Bold", $this->getText("//div[@id='wikiPreview']/p/b"));
 20+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 21+ array_push($this->verificationErrors, $e->toString());
 22+ }
 23+ }
 24+
 25+ // Mark text Italic and verify output
 26+ function verifyTextItalic(){
 27+ $this->type("wpTextbox1", "");
 28+ $this->click("link=Italic");
 29+ $this->type("wpTextbox1", "''Italian'' text");
 30+ $this->click("wpPreview");
 31+ $this->waitForPageToLoad("30000");
 32+ $this->assertEquals("Italian", $this->getText("//div[@id='wikiPreview']/p/i"));
 33+ }
 34+
 35+ // Mark text Bold and Italic and verify output
 36+ function verifyTextItalicandBold(){
 37+ $this->type("wpTextbox1", "");
 38+ $this->click("link=Italic");
 39+ $this->click("link=Bold");
 40+ $this->type("wpTextbox1", "Text '''''Italic & Bold'''''");
 41+ $this->click("wpPreview");
 42+ $this->waitForPageToLoad("30000");
 43+ $this->assertEquals("Italic & Bold", $this->getText("//div[@id='wikiPreview']/p/i/b"));
 44+ }
 45+
 46+
 47+ // Use Bullet Item function and verify output
 48+ function verifyBulletItem(){
 49+ parent::doExpandAdvanceSection();
 50+ $this->type("wpTextbox1", "");
 51+ $this->click("link=Bulleted list");
 52+ $this->click("link=Bulleted list");
 53+ $this->click("link=Bulleted list");
 54+ $this->type("wpTextbox1", "* Bulleted list item\n* Bulleted list item\n* Bulleted list item");
 55+ $this->click("wpPreview");
 56+ $this->waitForPageToLoad("30000");
 57+ try {
 58+ $this->assertEquals("Bulleted list item", $this->getText("//div[@id='wikiPreview']/ul/li[1]"));
 59+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 60+ array_push($this->verificationErrors, $e->toString());
 61+ }
 62+ try {
 63+ $this->assertEquals("Bulleted list item", $this->getText("//div[@id='wikiPreview']/ul/li[2]"));
 64+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 65+ array_push($this->verificationErrors, $e->toString());
 66+ }
 67+ try {
 68+ $this->assertEquals("Bulleted list item", $this->getText("//div[@id='wikiPreview']/ul/li[3]"));
 69+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 70+ array_push($this->verificationErrors, $e->toString());
 71+ }
 72+ }
 73+
 74+ // Use Numbered Item function and verify output
 75+ function verifyNumberedItem(){
 76+ parent::doExpandAdvanceSection();
 77+ $this->type("wpTextbox1", "");
 78+ $this->click("link=Numbered list");
 79+ $this->click("link=Numbered list");
 80+ $this->click("link=Numbered list");
 81+ $this->type("wpTextbox1", "# Numbered list item\n# Numbered list item\n# Numbered list item");
 82+ $this->click("wpPreview");
 83+ $this->waitForPageToLoad("30000");
 84+ try {
 85+ $this->assertEquals("Numbered list item", $this->getText("//div[@id='wikiPreview']/ol/li[1]"));
 86+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 87+ array_push($this->verificationErrors, $e->toString());
 88+ }
 89+ try {
 90+ $this->assertEquals("Numbered list item", $this->getText("//div[@id='wikiPreview']/ol/li[2]"));
 91+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 92+ array_push($this->verificationErrors, $e->toString());
 93+ }
 94+ try {
 95+ $this->assertEquals("Numbered list item", $this->getText("//div[@id='wikiPreview']/ol/li[3]"));
 96+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 97+ array_push($this->verificationErrors, $e->toString());
 98+ }
 99+ }
 100+
 101+ // Mark text as Nowiki and verify output
 102+ function verifyNoWiki(){
 103+ parent::doExpandAdvanceSection();
 104+ $this->type("wpTextbox1", "");
 105+ $this->type("wpTextbox1", "<nowiki>==Heading text==</nowiki>");
 106+ $this->click("wpPreview");
 107+ $this->waitForPageToLoad("30000");
 108+ try {
 109+ $this->assertEquals("==Heading text==", $this->getText("//div[@id='wikiPreview']/p"));
 110+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 111+ array_push($this->verificationErrors, $e->toString());
 112+ }
 113+ }
 114+
 115+ // Create a line break and verify output
 116+ function verifyLineBreak(){
 117+ parent::doExpandAdvanceSection();
 118+ $this->type("wpTextbox1", "");
 119+ $this->type("wpTextbox1", "this is a test text to check the line\n break.");
 120+ $this->click("wpPreview");
 121+ $this->waitForPageToLoad("30000");
 122+ try {
 123+ $this->assertEquals("this is a test text to check the line\n break.", $this->getText("//div[@id='wikiPreview']/p"));
 124+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 125+ array_push($this->verificationErrors, $e->toString());
 126+ }
 127+ }
 128+
 129+ // Mark text as Big and verify output
 130+ function verifyTextBig(){
 131+ parent::doExpandAdvanceSection();
 132+ $this->type("wpTextbox1", "");
 133+ $this->click("link=Big");
 134+ $this->type("wpTextbox1", "<big>This</big> text");
 135+ $this->click("wpPreview");
 136+ $this->waitForPageToLoad("30000");
 137+ try {
 138+ $this->assertEquals("This", $this->getText("//div[@id='wikiPreview']/p/big"));
 139+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 140+ array_push($this->verificationErrors, $e->toString());
 141+ }
 142+ }
 143+
 144+ // Mark text as Small and verify output
 145+ function verifyTextSmall(){
 146+ parent::doExpandAdvanceSection();
 147+ $this->type("wpTextbox1", "");
 148+ $this->click("link=Small");
 149+ $this->type("wpTextbox1", "<small>This</small> text\n");
 150+ $this->click("wpPreview");
 151+ $this->waitForPageToLoad("30000");
 152+ try {
 153+ $this->assertEquals("This", $this->getText("//div[@id='wikiPreview']/p/small"));
 154+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 155+ array_push($this->verificationErrors, $e->toString());
 156+ }
 157+ }
 158+
 159+ // Mark text as Super Script and verify output
 160+ function verifyTextSuperscript(){
 161+ parent::doExpandAdvanceSection();
 162+ $this->type("wpTextbox1", "");
 163+ $this->click("link=Superscript");
 164+ $this->type("wpTextbox1", "<sup>This</sup> text\n");
 165+ $this->click("wpPreview");
 166+ $this->waitForPageToLoad("30000");
 167+ try {
 168+ $this->assertEquals("This", $this->getText("//div[@id='wikiPreview']/p/sup"));
 169+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 170+ array_push($this->verificationErrors, $e->toString());
 171+ }
 172+ }
 173+
 174+ // Mark text as Sub Script and verify output
 175+ function verifyTextSubscript(){
 176+ parent::doExpandAdvanceSection();
 177+ $this->type("wpTextbox1", "");
 178+ $this->click("link=Subscript");
 179+ $this->type("wpTextbox1", "<sub>This</sub> text\n");
 180+ $this->click("wpPreview");
 181+ $this->waitForPageToLoad("30000");
 182+ try {
 183+ $this->assertEquals("This", $this->getText("//div[@id='wikiPreview']/p/sub"));
 184+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 185+ array_push($this->verificationErrors, $e->toString());
 186+ }
 187+ }
 188+}
 189+?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiCommonFunction_TC.php
@@ -0,0 +1,91 @@
 2+<?php
 3+require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
 4+/**
 5+ * This test case will be handling the common functions on test.
 6+ * Date : Apr - 2010
 7+ * @author : BhagyaG - Calcey
 8+ */
 9+class WikiCommonFunction_TC extends PHPUnit_Extensions_SeleniumTestCase {
 10+ /** Wiki server environment details.This array should be commented if the test
 11+ * run on local browsers.
 12+
 13+ public static $browsers = array(
 14+ array(
 15+ 'name' => 'Safari',
 16+ 'browser' => '*safari',
 17+ 'host' => 'raskin.usability.wikimedia.org',
 18+ 'port' => 4444,
 19+ 'timeout' => 30000,
 20+ )
 21+ ); **/
 22+
 23+ // Setup the browser URL and local browser
 24+ function setUp() {
 25+ // Setting the local browser. this should be disabled if the test run in Wiki environment.
 26+ $this->setBrowser("*firefox");
 27+ // Main link to be connected
 28+ $this->setBrowserUrl("http://prototype.wikimedia.org");
 29+ }
 30+
 31+ // Open the page.
 32+ function doOpenLink(){
 33+ $this->open("/deployment-en/Main_Page");
 34+ $this->waitForPageToLoad("30000");
 35+ }
 36+
 37+ // Login to the application
 38+ function doLogin() {
 39+ if (!$this->isTextPresent("Log out")) {
 40+ $this->click("link=Log in / create account");
 41+ $this->waitForPageToLoad("30000");
 42+ $this->type("wpName1", "bhagya_qa");
 43+ $this->type("wpPassword1", "test");
 44+ $this->click("wpLoginAttempt");
 45+ $this->waitForPageToLoad("30000");
 46+ try {
 47+ $this->assertEquals("Bhagya qa", $this->getText("link=Bhagya qa"));
 48+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 49+ array_push($this->verificationErrors, $e->toString());
 50+ }
 51+ }
 52+ }
 53+
 54+ // Log out from the application
 55+ function doLogout() {
 56+ $this->open("/deployment-en/Main_Page");
 57+ if ($this->isTextPresent("Log out")) {
 58+ $this->click("link=Log out");
 59+ $this->waitForPageToLoad("30000");
 60+ try {
 61+ $this->assertEquals("Log in / create account", $this->getText("link=Log in / create account"));
 62+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 63+ array_push($this->verificationErrors, $e->toString());
 64+ }
 65+ }
 66+ }
 67+
 68+ //Expand advance tool bar section if its not
 69+ function doExpandAdvanceSection() {
 70+ if (!$this->isTextPresent("Heading")){
 71+ $this->click("link=Advanced");
 72+ }
 73+ }
 74+
 75+ //Create a temporary new page
 76+ function doCreateNewPageTemporary() {
 77+ $this->type("//*[@id='searchInput']", "TestWikiPaget");
 78+ $this->click("//*[@id='searchButton']");
 79+ $this->waitForPageToLoad("30000");
 80+ $this->click("link=TestWikiPaget");
 81+ $this->waitForPageToLoad("30000");
 82+ }
 83+
 84+ //Access a random page
 85+ function doAccessRandomPage() {
 86+ $this->click("link=Random article");
 87+ $this->waitForPageToLoad("30000");
 88+ $this->click("//li[@id='ca-edit']/a/span");
 89+ $this->waitForPageToLoad("30000");
 90+ }
 91+}
 92+?>
\ No newline at end of file
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiWatchUnWatch_TC.php
@@ -0,0 +1,68 @@
 2+<?php
 3+require_once 'WikiCommonFunction_TC.php';
 4+/**
 5+ * This test case will be handling the page watch functions.
 6+ * Date : Apr - 2010
 7+ * @author : BhagyaG - Calcey
 8+ */
 9+class WikiWatchUnWatch_TC extends WikiCommonFunction_TC {
 10+ // Set up the testing environment
 11+ function setup(){
 12+ parent::setUp();
 13+ }
 14+
 15+ // Mark a page as watch and verify the My Watch list
 16+ function testWatch(){
 17+
 18+ parent::doOpenLink();
 19+ parent::doLogin();
 20+ $this->click("link=Random article");
 21+ $this->waitForPageToLoad("30000");
 22+ $randompage = $this->getText("firstHeading");
 23+ $this->click("link=Watch");
 24+ $this->click("link=My watchlist");
 25+ $this->waitForPageToLoad("30000");
 26+ $this->click("link=View and edit watchlist");
 27+ $this->waitForPageToLoad("30000");
 28+
 29+ $this->assertTrue($this->isTextPresent($randompage));
 30+ parent::doLogout();
 31+ }
 32+
 33+
 34+ // Mark a page as watch and mark the same page as unwatch and verify the My Watch list
 35+ function testUnWatch(){
 36+
 37+ parent::doOpenLink();
 38+ parent::doLogin();
 39+ $this->click("link=Random article");
 40+ $this->waitForPageToLoad("30000");
 41+ $randompage = $this->getText("firstHeading");
 42+ $this->click("link=Watch");
 43+ $this->click("link=My watchlist");
 44+ $this->waitForPageToLoad("30000");
 45+ $this->click("link=View and edit watchlist");
 46+ $this->waitForPageToLoad("30000");
 47+ $this->assertTrue($this->isTextPresent($randompage));
 48+ $this->click("link=" . $randompage);
 49+ $this->waitForPageToLoad("30000");
 50+ $this->click("link=Unwatch");
 51+ $this->click("link=My watchlist");
 52+ $this->waitForPageToLoad("30000");
 53+ $this->click("link=View and edit watchlist");
 54+ $this->waitForPageToLoad("30000");
 55+ try {
 56+ $this->assertFalse($this->isTextPresent($randompage));
 57+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 58+ array_push($this->verificationErrors, $e->toString());
 59+ }
 60+ parent::doLogout();
 61+
 62+ }
 63+
 64+ /** function testEditWatch(){
 65+
 66+ }**/
 67+
 68+}
 69+?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiPreferences_TC.php
@@ -0,0 +1,15 @@
 2+<?php
 3+require_once 'WikiCommonTC.php';
 4+/**
 5+ * This test case will be handling the user account settings.
 6+ * Date : Apr - 2010
 7+ * @author : BhagyaG - Calcey
 8+ */
 9+class WikiPreferences_TC extends WikiCommonTC {
 10+
 11+ function setup(){
 12+ parent::setUp();
 13+ }
 14+
 15+}
 16+?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiDialogs_NewPage.php
@@ -0,0 +1,168 @@
 2+<?php
 3+require_once 'WikiDialogs_TC.php';
 4+/**
 5+ * Description of WikiNewPageDialogs
 6+ *
 7+ * @author bhagyag
 8+ */
 9+class WikiDialogs_NewPage extends WikiDialogs_TC {
 10+ // Set up the testing environment
 11+ function setup(){
 12+ parent::setUp();
 13+ }
 14+
 15+ // Add a internal link and verify
 16+ function testInternalLink(){
 17+ parent::doOpenLink();
 18+ parent::doLogin();
 19+ $this->open("/deployment-en/Main_Page");
 20+ $this->waitForPageToLoad("30000");
 21+ parent::doCreateNewPageTemporary();
 22+ parent::verifyInternalLink();
 23+ parent::doLogout();
 24+ }
 25+
 26+ // Add a internal link with different display text and verify
 27+ function testInternalLinkWithDisplayText(){
 28+ parent::doOpenLink();
 29+ parent::doLogin();
 30+ $this->open("/deployment-en/Main_Page");
 31+ $this->waitForPageToLoad("30000");
 32+ parent::doCreateNewPageTemporary();
 33+ parent::verifyInternalLinkWithDisplayText();
 34+ parent::doLogout();
 35+ }
 36+
 37+ // Add a internal link with blank display text and verify
 38+ function testInternalLinkWithBlankDisplayText(){
 39+ parent::doOpenLink();
 40+ parent::doLogin();
 41+ $this->open("/deployment-en/Main_Page");
 42+ $this->waitForPageToLoad("30000");
 43+ parent::doCreateNewPageTemporary();
 44+ parent::verifyInternalLinkWithBlankDisplayText();
 45+ parent::doLogout();
 46+ }
 47+
 48+ // Add external link and verify
 49+ function testExternalLink(){
 50+ parent::doOpenLink();
 51+ parent::doLogin();
 52+ $this->open("/deployment-en/Main_Page");
 53+ $this->waitForPageToLoad("30000");
 54+ parent::doCreateNewPageTemporary();
 55+ parent::verifyExternalLink();
 56+ parent::doLogout();
 57+ }
 58+
 59+ // Add external link with different display text and verify
 60+ function testExternalLinkWithDisplayText(){
 61+ parent::doOpenLink();
 62+ parent::doLogin();
 63+ $this->open("/deployment-en/Main_Page");
 64+ $this->waitForPageToLoad("30000");
 65+ parent::doCreateNewPageTemporary();
 66+ parent::verifyExternalLinkWithDisplayText();
 67+ parent::doLogout();
 68+ }
 69+
 70+ // Add external link with Blank display text and verify
 71+ function testExternalLinkWithBlankDisplayText(){
 72+ parent::doOpenLink();
 73+ parent::doLogin();
 74+ $this->open("/deployment-en/Main_Page");
 75+ $this->waitForPageToLoad("30000");
 76+ parent::doCreateNewPageTemporary();
 77+ parent::verifyExternalLinkWithBlankDisplayText();
 78+ parent::doLogout();
 79+ }
 80+
 81+ // Add a table and verify
 82+ function testCreateTable(){
 83+ parent::doOpenLink();
 84+ parent::doLogin();
 85+ $this->open("/deployment-en/Main_Page");
 86+ $this->waitForPageToLoad("30000");
 87+ parent::doCreateNewPageTemporary();
 88+ parent::verifyCreateTable();
 89+ parent::doLogout();
 90+ }
 91+
 92+ // Add a table and verify only with head row
 93+ function testCreateTableWithHeadRow(){
 94+ parent::doOpenLink();
 95+ parent::doLogin();
 96+ $this->open("/deployment-en/Main_Page");
 97+ $this->waitForPageToLoad("30000");
 98+ parent::doCreateNewPageTemporary();
 99+ parent::verifyCreateTableWithHeadRow();
 100+ parent::doLogout();
 101+ }
 102+
 103+ // Add a table and verify only with borders
 104+ function testCreateTableWithBorders(){
 105+ parent::doOpenLink();
 106+ parent::doLogin();
 107+ $this->open("/deployment-en/Main_Page");
 108+ $this->waitForPageToLoad("30000");
 109+ parent::doCreateNewPageTemporary();
 110+ parent::verifyCreateTableWithBorders();
 111+ parent::doLogout();
 112+ }
 113+
 114+ // Add a table and verify only with sort row
 115+ function testCreateTableWithSortRow(){
 116+ parent::doOpenLink();
 117+ parent::doLogin();
 118+ $this->open("/deployment-en/Main_Page");
 119+ $this->waitForPageToLoad("30000");
 120+ parent::doCreateNewPageTemporary();
 121+ parent::verifyCreateTableWithSortRow();
 122+ parent::doLogout();
 123+ }
 124+
 125+ // Add a table without headers,borders and sort rows
 126+ function testCreateTableWithNoSpecialEffects(){
 127+ parent::doOpenLink();
 128+ parent::doLogin();
 129+ $this->open("/deployment-en/Main_Page");
 130+ $this->waitForPageToLoad("30000");
 131+ parent::doCreateNewPageTemporary();
 132+ parent::verifyCreateTableWithNoSpecialEffects();
 133+ parent::doLogout();
 134+ }
 135+
 136+ // Verify the replace all function on Search and Replace
 137+ function testTextSearchReplaceAll(){
 138+ parent::doOpenLink();
 139+ parent::doLogin();
 140+ $this->open("/deployment-en/Main_Page");
 141+ $this->waitForPageToLoad("30000");
 142+ parent::doCreateNewPageTemporary();
 143+ parent::verifyTextSearchReplaceAll();
 144+ parent::doLogout();
 145+ }
 146+
 147+ // Verify the replace next function on Search and Replace
 148+ function testTextSearchReplaceNext(){
 149+ parent::doOpenLink();
 150+ parent::doLogin();
 151+ $this->open("/deployment-en/Main_Page");
 152+ $this->waitForPageToLoad("30000");
 153+ parent::doCreateNewPageTemporary();
 154+ parent::verifyTextSearchReplaceNext();
 155+ parent::doLogout();
 156+ }
 157+
 158+ // When user click on find, text highlight on back which is not captured in Selenium directly. */
 159+ function testTextSearchFindNext(){
 160+ parent::doOpenLink();
 161+ parent::doLogin();
 162+ $this->open("/deployment-en/Main_Page");
 163+ $this->waitForPageToLoad("30000");
 164+ parent::doCreateNewPageTemporary();
 165+ parent::verifyTextSearchFindNext();
 166+ parent::doLogout();
 167+ }
 168+}
 169+?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiNTOC_TC.php
@@ -0,0 +1,164 @@
 2+<?php
 3+require_once 'WikiCommonFunction_TC.php';
 4+/*
 5+ * This test case will be handling the NTOC related functions.
 6+ * Adding different header levels via tool bar and verify the output
 7+ * This will be used by both WikiExistingPageNTOC and WikiNewPageNTOC
 8+ * Date : Apr - 2010
 9+ * @author : BhagyaG - Calcey
 10+ */
 11+class WikiNTOC_TC extends WikiCommonFunction_TC {
 12+
 13+ // Add header level 2 and verify Header output
 14+ function verifyHeaderLevel2(){
 15+ parent::doExpandAdvanceSection();
 16+ $this->click("link=Heading");
 17+ $this->click("link=Heading");
 18+ $this->click("link=Level 2");
 19+ $this->type("wpTextbox1", "==Heading text==");
 20+ $this->click("wpPreview");
 21+ $this->waitForPageToLoad("30000");
 22+ try {
 23+ $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h2"));
 24+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 25+ array_push($this->verificationErrors, $e->toString());
 26+ }
 27+ }
 28+
 29+
 30+ // Add header level 3 and verify Header output
 31+ function verifyHeaderLevel3(){
 32+ parent::doExpandAdvanceSection();
 33+ $this->click("link=Heading");
 34+ $this->click("link=Heading");
 35+ $this->click("link=Level 3");
 36+ $this->type("wpTextbox1", "===Heading text===");
 37+ $this->click("wpPreview");
 38+ $this->waitForPageToLoad("30000");
 39+ try {
 40+ $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h3"));
 41+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 42+ array_push($this->verificationErrors, $e->toString());
 43+ }
 44+ }
 45+
 46+ // Add header level 4 and verify Header output
 47+ function verifyHeaderLevel4(){
 48+ parent::doExpandAdvanceSection();
 49+ $this->click("link=Heading");
 50+ $this->click("link=Heading");
 51+ $this->click("link=Level 4");
 52+ $this->type("wpTextbox1", "====Heading text====");
 53+ $this->click("wpPreview");
 54+ $this->waitForPageToLoad("30000");
 55+ try {
 56+ $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h4"));
 57+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 58+ array_push($this->verificationErrors, $e->toString());
 59+ }
 60+ }
 61+
 62+ // Add header level 5 and verify Header output
 63+ function verifyHeaderLevel5(){
 64+ parent::doExpandAdvanceSection();
 65+ $this->click("link=Heading");
 66+ $this->click("link=Heading");
 67+ $this->click("link=Level 5");
 68+ $this->type("wpTextbox1", "=====Heading text=====");
 69+ $this->click("wpPreview");
 70+ $this->waitForPageToLoad("30000");
 71+ try {
 72+ $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h5"));
 73+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 74+ array_push($this->verificationErrors, $e->toString());
 75+ }
 76+ }
 77+
 78+ // Add header level 2 & 3 and verify Header output
 79+ function verifyHeaderLevel2and3(){
 80+ parent::doExpandAdvanceSection();
 81+ $this->click("link=Heading");
 82+ $this->click("link=Level 2");
 83+ $this->click("link=Heading");
 84+ $this->click("link=Level 3");
 85+ $this->type("wpTextbox1", "==Heading text==\n===Heading text===");
 86+ $this->click("wpPreview");
 87+ $this->waitForPageToLoad("30000");
 88+ try {
 89+ $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h2"));
 90+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 91+ array_push($this->verificationErrors, $e->toString());
 92+ }
 93+ try {
 94+ $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h3"));
 95+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 96+ array_push($this->verificationErrors, $e->toString());
 97+ }
 98+ }
 99+
 100+ // Add header level 2 , 3 & 4 and verify Header output
 101+ function verifyHeaderLevel23and4(){
 102+ parent::doExpandAdvanceSection();
 103+ $this->click("link=Heading");
 104+ $this->click("link=Level 2");
 105+ $this->click("link=Heading");
 106+ $this->click("link=Level 3");
 107+ $this->click("link=Heading");
 108+ $this->click("link=Level 4");
 109+ $this->type("wpTextbox1", "==Heading text==\n===Heading text===\n====Heading text====");
 110+ $this->click("wpPreview");
 111+ $this->waitForPageToLoad("30000");
 112+ try {
 113+ $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h2"));
 114+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 115+ array_push($this->verificationErrors, $e->toString());
 116+ }
 117+ try {
 118+ $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h3"));
 119+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 120+ array_push($this->verificationErrors, $e->toString());
 121+ }
 122+ try {
 123+ $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h4"));
 124+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 125+ array_push($this->verificationErrors, $e->toString());
 126+ }
 127+ }
 128+
 129+ // Add header level 2 , 3 , 4 & 5 and verify Header output
 130+ function verifyHeaderLevel234and5(){
 131+ parent::doExpandAdvanceSection();
 132+ $this->click("link=Heading");
 133+ $this->click("link=Level 2");
 134+ $this->click("link=Heading");
 135+ $this->click("link=Level 3");
 136+ $this->click("link=Heading");
 137+ $this->click("link=Level 4");
 138+ $this->click("link=Heading");
 139+ $this->click("link=Level 5");
 140+ $this->type("wpTextbox1", "==Heading text==\n===Heading text===\n====Heading text====\n=====Heading text=====");
 141+ $this->click("wpPreview");
 142+ $this->waitForPageToLoad("30000");
 143+ try {
 144+ $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h2"));
 145+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 146+ array_push($this->verificationErrors, $e->toString());
 147+ }
 148+ try {
 149+ $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h3"));
 150+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 151+ array_push($this->verificationErrors, $e->toString());
 152+ }
 153+ try {
 154+ $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h4"));
 155+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 156+ array_push($this->verificationErrors, $e->toString());
 157+ }
 158+ try {
 159+ $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h5"));
 160+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 161+ array_push($this->verificationErrors, $e->toString());
 162+ }
 163+ }
 164+}
 165+?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiTestSuite.php
@@ -2,26 +2,40 @@
33 require_once 'PHPUnit/Framework.php';
44 require_once 'PHPUnit/TextUI/TestRunner.php';
55
6 -require_once 'WikiAcaiSearchTC.php';
7 -require_once 'WikiWatchUnWatchTC.php';
8 -require_once 'WikiToolBarDialogsTC.php';
9 -require_once 'WikiToolBarNTOC.php';
10 -require_once 'WikiToolBarOtherTC.php';
11 -require_once 'WikiToolBarTextFormatTC.php';
 6+require_once 'WikSearch_TC.php';
 7+require_once 'WikiWatchUnWatch_TC.php';
128
 9+require_once 'WikiNTOC_ ExistingPage.php';
 10+require_once 'WikiDialogs_ExsistingPage.php';
 11+require_once 'WikiToolBarOther_ExistingPage.php';
 12+require_once 'WikiTextFormat_ExistingPage.php';
 13+
 14+require_once 'WikiNTOC_NewPage.php';
 15+require_once 'WikiDialogs_NewPage.php';
 16+require_once 'WikiToolBarOther_NewPage.php';
 17+require_once 'WikiTextFormat_NewPage.php';
 18+
 19+
1320 $suite = new PHPUnit_Framework_TestSuite('Wiki Tests');
1421
1522 require_once('WikiListener.php');
1623 $wLis = new WikiListener();
1724 $result = new PHPUnit_Framework_TestResult();
1825 //Add test case to the test suite
19 -$suite->addTestSuite("WikiAcaiSearchTC");
20 -$suite->addTestSuite("WikiWatchUnWatchTC");
21 -$suite->addTestSuite("WikiToolBarDialogsTC");
22 -$suite->addTestSuite("WikiToolBarNTOC");
23 -$suite->addTestSuite("WikiToolBarOtherTC");
24 -$suite->addTestSuite("WikiToolBarTextFormatTC");
25 -$result->addListener($wLis); //Define your listener which the test result will use to give output
 26+$suite->addTestSuite("WikSearch_TC");
 27+$suite->addTestSuite("WikiWatchUnWatch_TC");
 28+
 29+$suite->addTestSuite("WikiNTOC_ ExistingPage");
 30+$suite->addTestSuite("WikiDialogs_ExsistingPage");
 31+$suite->addTestSuite("WikiToolBarOther_ExistingPage");
 32+$suite->addTestSuite("WikiTextFormat_ExistingPage");
 33+
 34+$suite->addTestSuite("WikiNTOC_NewPage");
 35+$suite->addTestSuite("WikiDialogs_NewPage");
 36+$suite->addTestSuite("WikiToolBarOther_NewPage");
 37+$suite->addTestSuite("WikiTextFormat_NewPage");
 38+
 39+//$result->addListener($wLis); //Define your listener which the test result will use to give output
2640 $suite->run($result); //And of course run this tests
2741
2842 ?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiToolBarOther_TC.php
@@ -0,0 +1,61 @@
 2+<?php
 3+require_once 'WikiCommonFunction_TC.php';
 4+/**
 5+ * This test case will be handling the general tool bar functions
 6+ * Date : Apr - 2010
 7+ * @author : BhagyaG - Calcey
 8+ */
 9+class WikiToolBarOther_TC extends WikiCommonFunction_TC {
 10+ // Click on Embedded file function and verify the output
 11+ function verifyEmbeddedFile(){
 12+ $this->click("link=Embedded file");
 13+ $this->type("wpTextbox1", "\" \"");
 14+ $this->type("wpTextbox1", "[[File:Example.jpg]]");
 15+ $this->click("wpPreview");
 16+ $this->waitForPageToLoad("30000");
 17+ try {
 18+ $this->assertEquals("", $this->getText("//img[@alt='Example.jpg']"));
 19+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 20+ array_push($this->verificationErrors, $e->toString());
 21+ }
 22+ }
 23+
 24+ /** Reference link is not directing to the given link.
 25+ * For example if I add www.google.com as the reference link,
 26+ * on preview the link is not directing to google site.
 27+ function verifyReference(){
 28+ parent::doOpenLink();
 29+ parent::doLogin();
 30+
 31+ $this->open("/deployment-en/Main_Page");
 32+ $this->click("link=Random article");
 33+ $this->waitForPageToLoad("30000");
 34+ $this->click("//li[@id='ca-edit']/a/span");
 35+ $this->waitForPageToLoad("30000");
 36+ $this->type("wpTextbox1", "");
 37+ $this->click("link=Reference");
 38+ $this->type("wpTextbox1", "");
 39+ $this->type("wikieditor-toolbar-reference-text", "www.google.com");
 40+ $this->click("//div[13]/div[11]/button[1]");
 41+ $this->click("wpPreview");
 42+
 43+ parent::doLogout();
 44+ }**/
 45+
 46+ // Click on Picture Gallery function and verify the output
 47+ function verifyPictureGallery(){
 48+ parent::doExpandAdvanceSection();
 49+ $this->type("wpTextbox1", "");
 50+ $this->click("link=Picture gallery");
 51+ $this->click("wpPreview");
 52+ $this->waitForPageToLoad("30000");
 53+ try {
 54+ $this->assertEquals("", $this->getText("//div[@id='wikiPreview']/table/tbody/tr/td[1]/div/div[1]/div"));
 55+ } catch (PHPUnit_Framework_AssertionFailedError $e) {
 56+ array_push($this->verificationErrors, $e->toString());
 57+ }
 58+ }
 59+
 60+
 61+}
 62+?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiTextFormat_NewPage.php
@@ -0,0 +1,136 @@
 2+<?php
 3+require_once 'WikiTextFormat_TC.php';
 4+/**
 5+ * Description of WikiNewPageTextFormat
 6+ *
 7+ * @author bhagyag
 8+ */
 9+class WikiTextFormat_NewPage extends WikiTextFormat_TC {
 10+
 11+ // Set up the testing environment
 12+ function setup(){
 13+ parent::setUp();
 14+ }
 15+
 16+ // Mark text Bold and verify output
 17+ function testTextBold(){
 18+ parent::doOpenLink();
 19+ parent::doLogin();
 20+ $this->open("/deployment-en/Main_Page");
 21+ $this->waitForPageToLoad("30000");
 22+ parent::doCreateNewPageTemporary();
 23+ parent::verifyTextBold();
 24+ parent::doLogout();
 25+ }
 26+
 27+ // Mark text Italic and verify output
 28+ function testTextItalic(){
 29+ parent::doOpenLink();
 30+ parent::doLogin();
 31+ $this->open("/deployment-en/Main_Page");
 32+ $this->waitForPageToLoad("30000");
 33+ parent::doCreateNewPageTemporary();
 34+ parent::verifyTextItalic();
 35+ parent::doLogout();
 36+ }
 37+
 38+ // Mark text Italic & Bold and verify output
 39+ function testTextItalicandBold(){
 40+ parent::doOpenLink();
 41+ parent::doLogin();
 42+ $this->open("/deployment-en/Main_Page");
 43+ $this->waitForPageToLoad("30000");
 44+ parent::doCreateNewPageTemporary();
 45+ parent::verifyTextItalicandBold();
 46+ parent::doLogout();
 47+ }
 48+
 49+ // Use Bullet Item function and verify output
 50+ function testBulletItem(){
 51+ parent::doOpenLink();
 52+ parent::doLogin();
 53+ $this->open("/deployment-en/Main_Page");
 54+ $this->waitForPageToLoad("30000");
 55+ parent::doCreateNewPageTemporary();
 56+ parent::verifyBulletItem();
 57+ parent::doLogout();
 58+ }
 59+
 60+ // Use Numbered Item function and verify output
 61+ function testNumberedItem(){
 62+ parent::doOpenLink();
 63+ parent::doLogin();
 64+ $this->open("/deployment-en/Main_Page");
 65+ $this->waitForPageToLoad("30000");
 66+ parent::doCreateNewPageTemporary();
 67+ parent::verifyNumberedItem();
 68+ parent::doLogout();
 69+ }
 70+
 71+ // Mark text as Nowiki and verify output
 72+ function testNoWiki(){
 73+ parent::doOpenLink();
 74+ parent::doLogin();
 75+ $this->open("/deployment-en/Main_Page");
 76+ $this->waitForPageToLoad("30000");
 77+ parent::doCreateNewPageTemporary();
 78+ parent::verifyNoWiki();
 79+ parent::doLogout();
 80+ }
 81+
 82+ // Create a line break and verify output
 83+ function testLineBreak(){
 84+ parent::doOpenLink();
 85+ parent::doLogin();
 86+ $this->open("/deployment-en/Main_Page");
 87+ $this->waitForPageToLoad("30000");
 88+ parent::doCreateNewPageTemporary();
 89+ parent::verifyLineBreak();
 90+ parent::doLogout();
 91+ }
 92+
 93+ // Mark text as Big and verify output
 94+ function testTextBig(){
 95+ parent::doOpenLink();
 96+ parent::doLogin();
 97+ $this->open("/deployment-en/Main_Page");
 98+ $this->waitForPageToLoad("30000");
 99+ parent::doCreateNewPageTemporary();
 100+ parent::verifyTextBig();
 101+ parent::doLogout();
 102+ }
 103+
 104+ // Mark text as Small and verify output
 105+ function testTextSmall(){
 106+ parent::doOpenLink();
 107+ parent::doLogin();
 108+ $this->open("/deployment-en/Main_Page");
 109+ $this->waitForPageToLoad("30000");
 110+ parent::doCreateNewPageTemporary();
 111+ parent::verifyTextSmall();
 112+ parent::doLogout();
 113+ }
 114+
 115+ // Mark text as Super Script and verify output
 116+ function testTextSuperscript(){
 117+ parent::doOpenLink();
 118+ parent::doLogin();
 119+ $this->open("/deployment-en/Main_Page");
 120+ $this->waitForPageToLoad("30000");
 121+ parent::doCreateNewPageTemporary();
 122+ parent::verifyTextSuperscript();
 123+ parent::doLogout();
 124+ }
 125+
 126+ // Mark text as Sub Script and verify output
 127+ function testTextSubscript(){
 128+ parent::doOpenLink();
 129+ parent::doLogin();
 130+ $this->open("/deployment-en/Main_Page");
 131+ $this->waitForPageToLoad("30000");
 132+ parent::doCreateNewPageTemporary();
 133+ parent::verifyTextSubscript();
 134+ parent::doLogout();
 135+ }
 136+}
 137+?>
Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiTextFormat_ExistingPage.php
@@ -0,0 +1,138 @@
 2+<?php
 3+require_once 'WikiTextFormat_TC.php';
 4+
 5+/**
 6+ * Description of WikiNewExistingTextFormat
 7+ *
 8+ * @author bhagyag
 9+ */
 10+class WikiTextFormat_ExistingPage extends WikiTextFormat_TC {
 11+
 12+ // Set up the testing environment
 13+ function setup(){
 14+ parent::setUp();
 15+ }
 16+
 17+ // Mark text Bold and verify output
 18+ function testTextBold(){
 19+ parent::doOpenLink();
 20+ parent::doLogin();
 21+ $this->open("/deployment-en/Main_Page");
 22+ $this->waitForPageToLoad("30000");
 23+ parent::doAccessRandomPage();
 24+ parent::verifyTextBold();
 25+ parent::doLogout();
 26+ }
 27+
 28+ // Mark text Italic and verify output
 29+ function testTextItalic(){
 30+ parent::doOpenLink();
 31+ parent::doLogin();
 32+ $this->open("/deployment-en/Main_Page");
 33+ $this->waitForPageToLoad("30000");
 34+ parent::doAccessRandomPage();
 35+ parent::verifyTextItalic();
 36+ parent::doLogout();
 37+ }
 38+
 39+ // Mark text Italic & Bold and verify output
 40+ function testTextItalicandBold(){
 41+ parent::doOpenLink();
 42+ parent::doLogin();
 43+ $this->open("/deployment-en/Main_Page");
 44+ $this->waitForPageToLoad("30000");
 45+ parent::doAccessRandomPage();
 46+ parent::verifyTextItalicandBold();
 47+ parent::doLogout();
 48+ }
 49+
 50+
 51+ // Use Bullet Item function and verify output
 52+ function testBulletItem(){
 53+ parent::doOpenLink();
 54+ parent::doLogin();
 55+ $this->open("/deployment-en/Main_Page");
 56+ $this->waitForPageToLoad("30000");
 57+ parent::doAccessRandomPage();
 58+ parent::verifyBulletItem();
 59+ parent::doLogout();
 60+ }
 61+
 62+ // Use Numbered Item function and verify output
 63+ function testNumberedItem(){
 64+ parent::doOpenLink();
 65+ parent::doLogin();
 66+ $this->open("/deployment-en/Main_Page");
 67+ $this->waitForPageToLoad("30000");
 68+ parent::doAccessRandomPage();
 69+ parent::verifyNumberedItem();
 70+ parent::doLogout();
 71+ }
 72+
 73+ // Mark text as Nowiki and verify output
 74+ function testNoWiki(){
 75+ parent::doOpenLink();
 76+ parent::doLogin();
 77+ $this->open("/deployment-en/Main_Page");
 78+ $this->waitForPageToLoad("30000");
 79+ parent::doAccessRandomPage();
 80+ parent::verifyNoWiki();
 81+ parent::doLogout();
 82+ }
 83+
 84+ // Create a line break and verify output
 85+ function testLineBreak(){
 86+ parent::doOpenLink();
 87+ parent::doLogin();
 88+ $this->open("/deployment-en/Main_Page");
 89+ $this->waitForPageToLoad("30000");
 90+ parent::doAccessRandomPage();
 91+ parent::verifyLineBreak();
 92+ parent::doLogout();
 93+ }
 94+
 95+ // Mark text as Big and verify output
 96+ function testTextBig(){
 97+ parent::doOpenLink();
 98+ parent::doLogin();
 99+ $this->open("/deployment-en/Main_Page");
 100+ $this->waitForPageToLoad("30000");
 101+ parent::doAccessRandomPage();
 102+ parent::verifyTextBig();
 103+ parent::doLogout();
 104+ }
 105+
 106+ // Mark text as Small and verify output
 107+ function testTextSmall(){
 108+ parent::doOpenLink();
 109+ parent::doLogin();
 110+ $this->open("/deployment-en/Main_Page");
 111+ $this->waitForPageToLoad("30000");
 112+ parent::doAccessRandomPage();
 113+ parent::verifyTextSmall();
 114+ parent::doLogout();
 115+ }
 116+
 117+ // Mark text as Super Script and verify output
 118+ function testTextSuperscript(){
 119+ parent::doOpenLink();
 120+ parent::doLogin();
 121+ $this->open("/deployment-en/Main_Page");
 122+ $this->waitForPageToLoad("30000");
 123+ parent::doAccessRandomPage();
 124+ parent::verifyTextSuperscript();
 125+ parent::doLogout();
 126+ }
 127+
 128+ // Mark text as Sub Script and verify output
 129+ function testTextSubscript(){
 130+ parent::doOpenLink();
 131+ parent::doLogin();
 132+ $this->open("/deployment-en/Main_Page");
 133+ $this->waitForPageToLoad("30000");
 134+ parent::doAccessRandomPage();
 135+ parent::verifyTextSubscript();
 136+ parent::doLogout();
 137+ }
 138+}
 139+?>

Status & tagging log