Index: trunk/testing/selenium/UsabilityInitiative/WikiAutomationTC/testCases/WikiToolBarNTOCTC.php |
— | — | @@ -1,127 +0,0 @@ |
2 | | -<?php |
3 | | -require_once 'WikiCommonTC.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 WikiToolBarNTOC extends WikiCommonTC { |
11 | | - // Set up the testing environment |
12 | | - function setup(){ |
13 | | - parent::setUp(); |
14 | | - } |
15 | | - |
16 | | - // Add header level 2 and verify Header output |
17 | | - function testHeaderLevel2(){ |
18 | | - |
19 | | - parent::doOpenLink(); |
20 | | - parent::doLogin(); |
21 | | - $this->open("/deployment-en/Main_Page"); |
22 | | - $this->waitForPageToLoad("30000"); |
23 | | - $this->click("link=Random article"); |
24 | | - $this->waitForPageToLoad("30000"); |
25 | | - $this->click("//li[@id='ca-edit']/a/span"); |
26 | | - $this->waitForPageToLoad("30000"); |
27 | | - parent::doExpandAdvanceSection(); |
28 | | - $this->click("link=Heading"); |
29 | | - $this->click("link=Heading"); |
30 | | - $this->click("link=Level 2"); |
31 | | - $this->type("wpTextbox1", "==Heading text=="); |
32 | | - $this->click("wpPreview"); |
33 | | - $this->waitForPageToLoad("30000"); |
34 | | - try { |
35 | | - $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h2")); |
36 | | - } catch (PHPUnit_Framework_AssertionFailedError $e) { |
37 | | - array_push($this->verificationErrors, $e->toString()); |
38 | | - } |
39 | | - |
40 | | - parent::doLogout(); |
41 | | - |
42 | | - } |
43 | | - |
44 | | - // Add header level 3 and verify Header output |
45 | | - function testHeaderLevel3(){ |
46 | | - |
47 | | - parent::doOpenLink(); |
48 | | - parent::doLogin(); |
49 | | - $this->open("/deployment-en/Main_Page"); |
50 | | - $this->waitForPageToLoad("30000"); |
51 | | - $this->click("link=Random article"); |
52 | | - $this->waitForPageToLoad("30000"); |
53 | | - $this->click("//li[@id='ca-edit']/a/span"); |
54 | | - $this->waitForPageToLoad("30000"); |
55 | | - parent::doExpandAdvanceSection(); |
56 | | - $this->click("link=Heading"); |
57 | | - $this->click("link=Heading"); |
58 | | - $this->click("link=Level 3"); |
59 | | - $this->type("wpTextbox1", "===Heading text==="); |
60 | | - $this->click("wpPreview"); |
61 | | - $this->waitForPageToLoad("30000"); |
62 | | - try { |
63 | | - $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h3")); |
64 | | - } catch (PHPUnit_Framework_AssertionFailedError $e) { |
65 | | - array_push($this->verificationErrors, $e->toString()); |
66 | | - } |
67 | | - |
68 | | - parent::doLogout(); |
69 | | - |
70 | | - } |
71 | | - |
72 | | - // Add header level 4 and verify Header output |
73 | | - function testHeaderLevel4(){ |
74 | | - |
75 | | - parent::doOpenLink(); |
76 | | - parent::doLogin(); |
77 | | - $this->open("/deployment-en/Main_Page"); |
78 | | - $this->waitForPageToLoad("30000"); |
79 | | - $this->click("link=Random article"); |
80 | | - $this->waitForPageToLoad("30000"); |
81 | | - $this->click("//li[@id='ca-edit']/a/span"); |
82 | | - $this->waitForPageToLoad("30000"); |
83 | | - parent::doExpandAdvanceSection(); |
84 | | - $this->click("link=Heading"); |
85 | | - $this->click("link=Heading"); |
86 | | - $this->click("link=Level 4"); |
87 | | - $this->type("wpTextbox1", "====Heading text===="); |
88 | | - $this->click("wpPreview"); |
89 | | - $this->waitForPageToLoad("30000"); |
90 | | - try { |
91 | | - $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h4")); |
92 | | - } catch (PHPUnit_Framework_AssertionFailedError $e) { |
93 | | - array_push($this->verificationErrors, $e->toString()); |
94 | | - } |
95 | | - |
96 | | - parent::doLogout(); |
97 | | - |
98 | | - } |
99 | | - |
100 | | - // Add header level 5 and verify Header output |
101 | | - function testHeaderLevel5(){ |
102 | | - |
103 | | - parent::doOpenLink(); |
104 | | - parent::doLogin(); |
105 | | - $this->open("/deployment-en/Main_Page"); |
106 | | - $this->waitForPageToLoad("30000"); |
107 | | - $this->click("link=Random article"); |
108 | | - $this->waitForPageToLoad("30000"); |
109 | | - $this->click("//li[@id='ca-edit']/a/span"); |
110 | | - $this->waitForPageToLoad("30000"); |
111 | | - parent::doExpandAdvanceSection(); |
112 | | - $this->click("link=Heading"); |
113 | | - $this->click("link=Heading"); |
114 | | - $this->click("link=Level 5"); |
115 | | - $this->type("wpTextbox1", "=====Heading text====="); |
116 | | - $this->click("wpPreview"); |
117 | | - $this->waitForPageToLoad("30000"); |
118 | | - try { |
119 | | - $this->assertEquals("Heading text", $this->getText("//*[@id='wikiPreview']/h5")); |
120 | | - } catch (PHPUnit_Framework_AssertionFailedError $e) { |
121 | | - array_push($this->verificationErrors, $e->toString()); |
122 | | - } |
123 | | - |
124 | | - parent::doLogout(); |
125 | | - |
126 | | - } |
127 | | -} |
128 | | -?> |