Skip to content

Commit

Permalink
Test Fixes - portal/dbupgrade/sampledatalatest/documentlibrary
Browse files Browse the repository at this point in the history
  • Loading branch information
brianchiu authored and brianchandotcom committed Mar 30, 2012
1 parent 3b06cd3 commit b338136
Show file tree
Hide file tree
Showing 36 changed files with 84 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,17 @@
<tr>
<td>select</td>
<td>//select[@id='_86_scopeType']</td>
<td>Select Layout</td>
<td>Select Page</td>
</tr>
<tr>
<td>waitForVisible</td>
<td>//label[@for='scopeLayoutUuid']</td>
<td>Scope Layout</td>
<td>Scope Page</td>
</tr>
<tr>
<td>assertText</td>
<td>//label[@for='scopeLayoutUuid']</td>
<td>Scope Layout</td>
<td>Scope Page</td>
</tr>
<tr>
<td>select</td>
Expand All @@ -116,7 +116,7 @@
<tr>
<td>assertSelectedLabel</td>
<td>//select[@id='_86_scopeType']</td>
<td>Select Layout</td>
<td>Select Page</td>
</tr>
<tr>
<td>assertSelectedLabel</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public void testConfigurePage2PortletDLScopeLayoutCurrentPage()
assertEquals(RuntimeVariables.replace("Scope"),
selenium.getText("//label[@for='scopeType']"));
selenium.select("//select[@id='_86_scopeType']",
RuntimeVariables.replace("Select Layout"));
RuntimeVariables.replace("Select Page"));

for (int second = 0;; second++) {
if (second >= 90) {
Expand All @@ -152,7 +152,7 @@ public void testConfigurePage2PortletDLScopeLayoutCurrentPage()
Thread.sleep(1000);
}

assertEquals(RuntimeVariables.replace("Scope Layout"),
assertEquals(RuntimeVariables.replace("Scope Page"),
selenium.getText("//label[@for='scopeLayoutUuid']"));
selenium.select("//select[@id='_86_scopeLayoutUuid']",
RuntimeVariables.replace("Current Page (DL Page2 Name)"));
Expand All @@ -163,7 +163,7 @@ public void testConfigurePage2PortletDLScopeLayoutCurrentPage()
assertEquals(RuntimeVariables.replace(
"You have successfully updated the setup."),
selenium.getText("//div[@class='portlet-msg-success']"));
assertEquals("Select Layout",
assertEquals("Select Page",
selenium.getSelectedLabel("//select[@id='_86_scopeType']"));
assertEquals("Current Page (DL Page2 Name)",
selenium.getSelectedLabel("//select[@id='_86_scopeLayoutUuid']"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,17 @@
<tr>
<td>select</td>
<td>//select[@id='_86_scopeType']</td>
<td>Select Layout</td>
<td>Select Page</td>
</tr>
<tr>
<td>waitForVisible</td>
<td>//label[@for='scopeLayoutUuid']</td>
<td>Scope Layout</td>
<td>Scope Page</td>
</tr>
<tr>
<td>assertText</td>
<td>//label[@for='scopeLayoutUuid']</td>
<td>Scope Layout</td>
<td>Scope Page</td>
</tr>
<tr>
<td>select</td>
Expand All @@ -116,7 +116,7 @@
<tr>
<td>assertSelectedLabel</td>
<td>//select[@id='_86_scopeType']</td>
<td>Select Layout</td>
<td>Select Page</td>
</tr>
<tr>
<td>assertSelectedLabel</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void testConfigurePage3PortletDLScopeLayoutPage2()
assertEquals(RuntimeVariables.replace("Scope"),
selenium.getText("//label[@for='scopeType']"));
selenium.select("//select[@id='_86_scopeType']",
RuntimeVariables.replace("Select Layout"));
RuntimeVariables.replace("Select Page"));

for (int second = 0;; second++) {
if (second >= 90) {
Expand All @@ -151,7 +151,7 @@ public void testConfigurePage3PortletDLScopeLayoutPage2()
Thread.sleep(1000);
}

assertEquals(RuntimeVariables.replace("Scope Layout"),
assertEquals(RuntimeVariables.replace("Scope Page"),
selenium.getText("//label[@for='scopeLayoutUuid']"));
selenium.select("//select[@id='_86_scopeLayoutUuid']",
RuntimeVariables.replace("DL Page2 Name"));
Expand All @@ -162,7 +162,7 @@ public void testConfigurePage3PortletDLScopeLayoutPage2()
assertEquals(RuntimeVariables.replace(
"You have successfully updated the setup."),
selenium.getText("//div[@class='portlet-msg-success']"));
assertEquals("Select Layout",
assertEquals("Select Page",
selenium.getSelectedLabel("//select[@id='_86_scopeType']"));
assertEquals("DL Page2 Name",
selenium.getSelectedLabel("//select[@id='_86_scopeLayoutUuid']"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</tr>
<tr>
<td>assertVisible</td>
<td>//img[@src='/html/themes/classic/images/file_system/large/folder_full_document.png']</td>
<td>//span[@class='document-thumbnail']/img</td>
<td>Folder Image</td>
</tr>
<tr>
Expand Down Expand Up @@ -105,7 +105,7 @@
</tr>
<tr>
<td>assertVisible</td>
<td>//img[@src='/html/themes/classic/images/file_system/large/folder_full_document.png']</td>
<td>//span[@class='document-thumbnail']/img</td>
<td>Folder Image</td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ public void testGuest_ViewPage2Folder2() throws Exception {
assertEquals(RuntimeVariables.replace(
"Documents and Media (DL Page2 Name)"),
selenium.getText("//span[@class='portlet-title-text']"));
assertTrue(selenium.isVisible(
"//img[@src='/html/themes/classic/images/file_system/large/folder_full_document.png']"));
assertTrue(selenium.isVisible("//span[@class='document-thumbnail']/img"));
assertEquals(RuntimeVariables.replace("DL Folder2 Name"),
selenium.getText(
"//a[contains(@class,'document-link')]/span[@class='entry-title']"));
Expand Down Expand Up @@ -153,8 +152,7 @@ public void testGuest_ViewPage2Folder2() throws Exception {
assertEquals(RuntimeVariables.replace(
"Documents and Media (DL Page2 Name)"),
selenium.getText("//span[@class='portlet-title-text']"));
assertTrue(selenium.isVisible(
"//img[@src='/html/themes/classic/images/file_system/large/folder_full_document.png']"));
assertTrue(selenium.isVisible("//span[@class='document-thumbnail']/img"));
assertEquals(RuntimeVariables.replace("DL Folder2 Name"),
selenium.getText(
"//a[contains(@class,'document-link')]/span[@class='entry-title']"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</tr>
<tr>
<td>assertVisible</td>
<td>//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png']</td>
<td>xPath=(//span[@class='document-thumbnail']/img)[2]</td>
<td>Folder Image</td>
</tr>
<tr>
Expand Down Expand Up @@ -105,7 +105,7 @@
</tr>
<tr>
<td>assertVisible</td>
<td>//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png']</td>
<td>xPath=(//span[@class='document-thumbnail']/img)[2]</td>
<td>Folder Image</td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void testGuest_ViewPage2Folder3() throws Exception {
"Documents and Media (DL Page2 Name)"),
selenium.getText("//span[@class='portlet-title-text']"));
assertTrue(selenium.isVisible(
"//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png']"));
"xPath=(//span[@class='document-thumbnail']/img)[2]"));
assertEquals(RuntimeVariables.replace("DL Folder3 Name"),
selenium.getText(
"xPath=(//a[contains(@class,'document-link')]/span[@class='entry-title'])[2]"));
Expand Down Expand Up @@ -154,7 +154,7 @@ public void testGuest_ViewPage2Folder3() throws Exception {
"Documents and Media (DL Page2 Name)"),
selenium.getText("//span[@class='portlet-title-text']"));
assertTrue(selenium.isVisible(
"//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png']"));
"xPath=(//span[@class='document-thumbnail']/img)[2]"));
assertEquals(RuntimeVariables.replace("DL Folder3 Name"),
selenium.getText(
"xPath=(//a[contains(@class,'document-link')]/span[@class='entry-title'])[2]"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</tr>
<tr>
<td>assertVisible</td>
<td>xPath=(//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png'])[2]</td>
<td>xPath=(//span[@class='document-thumbnail']/img)[3]</td>
<td>Folder Image</td>
</tr>
<tr>
Expand Down Expand Up @@ -105,7 +105,7 @@
</tr>
<tr>
<td>assertVisible</td>
<td>xPath=(//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png'])[2]</td>
<td>xPath=(//span[@class='document-thumbnail']/img)[3]</td>
<td>Folder Image</td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void testGuest_ViewPage2Folder4() throws Exception {
"Documents and Media (DL Page2 Name)"),
selenium.getText("//span[@class='portlet-title-text']"));
assertTrue(selenium.isVisible(
"xPath=(//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png'])[2]"));
"xPath=(//span[@class='document-thumbnail']/img)[3]"));
assertEquals(RuntimeVariables.replace("DL Folder4 Name"),
selenium.getText(
"xPath=(//a[contains(@class,'document-link')]/span[@class='entry-title'])[3]"));
Expand Down Expand Up @@ -154,7 +154,7 @@ public void testGuest_ViewPage2Folder4() throws Exception {
"Documents and Media (DL Page2 Name)"),
selenium.getText("//span[@class='portlet-title-text']"));
assertTrue(selenium.isVisible(
"xPath=(//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png'])[2]"));
"xPath=(//span[@class='document-thumbnail']/img)[3]"));
assertEquals(RuntimeVariables.replace("DL Folder4 Name"),
selenium.getText(
"xPath=(//a[contains(@class,'document-link')]/span[@class='entry-title'])[3]"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</tr>
<tr>
<td>assertVisible</td>
<td>xPath=(//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png'])[3]</td>
<td>xPath=(//span[@class='document-thumbnail']/img)[4]</td>
<td>Folder Image</td>
</tr>
<tr>
Expand Down Expand Up @@ -105,7 +105,7 @@
</tr>
<tr>
<td>assertVisible</td>
<td>xPath=(//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png'])[3]</td>
<td>xPath=(//span[@class='document-thumbnail']/img)[4]</td>
<td>Folder Image</td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void testGuest_ViewPage2Folder5() throws Exception {
"Documents and Media (DL Page2 Name)"),
selenium.getText("//span[@class='portlet-title-text']"));
assertTrue(selenium.isVisible(
"xPath=(//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png'])[3]"));
"xPath=(//span[@class='document-thumbnail']/img)[4]"));
assertEquals(RuntimeVariables.replace("DL Folder5 Name"),
selenium.getText(
"xPath=(//a[contains(@class,'document-link')]/span[@class='entry-title'])[4]"));
Expand Down Expand Up @@ -154,7 +154,7 @@ public void testGuest_ViewPage2Folder5() throws Exception {
"Documents and Media (DL Page2 Name)"),
selenium.getText("//span[@class='portlet-title-text']"));
assertTrue(selenium.isVisible(
"xPath=(//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png'])[3]"));
"xPath=(//span[@class='document-thumbnail']/img)[4]"));
assertEquals(RuntimeVariables.replace("DL Folder5 Name"),
selenium.getText(
"xPath=(//a[contains(@class,'document-link')]/span[@class='entry-title'])[4]"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</tr>
<tr>
<td>assertVisible</td>
<td>xPath=(//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png'])[4]</td>
<td>xPath=(//span[@class='document-thumbnail']/img)[5]</td>
<td>Folder Image</td>
</tr>
<tr>
Expand Down Expand Up @@ -105,7 +105,7 @@
</tr>
<tr>
<td>assertVisible</td>
<td>xPath=(//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png'])[4]</td>
<td>xPath=(//span[@class='document-thumbnail']/img)[5]</td>
<td>Folder Image</td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void testGuest_ViewPage2Folder6() throws Exception {
"Documents and Media (DL Page2 Name)"),
selenium.getText("//span[@class='portlet-title-text']"));
assertTrue(selenium.isVisible(
"xPath=(//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png'])[4]"));
"xPath=(//span[@class='document-thumbnail']/img)[5]"));
assertEquals(RuntimeVariables.replace("DL Folder6 Name"),
selenium.getText(
"xPath=(//a[contains(@class,'document-link')]/span[@class='entry-title'])[5]"));
Expand Down Expand Up @@ -154,7 +154,7 @@ public void testGuest_ViewPage2Folder6() throws Exception {
"Documents and Media (DL Page2 Name)"),
selenium.getText("//span[@class='portlet-title-text']"));
assertTrue(selenium.isVisible(
"xPath=(//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png'])[4]"));
"xPath=(//span[@class='document-thumbnail']/img)[5]"));
assertEquals(RuntimeVariables.replace("DL Folder6 Name"),
selenium.getText(
"xPath=(//a[contains(@class,'document-link')]/span[@class='entry-title'])[5]"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</tr>
<tr>
<td>assertVisible</td>
<td>//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png']</td>
<td>//span[@class='document-thumbnail']/img</td>
<td>Folder Image</td>
</tr>
<tr>
Expand Down Expand Up @@ -125,7 +125,7 @@
</tr>
<tr>
<td>assertVisible</td>
<td>xPath=(//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png'])[5]</td>
<td>xPath=(//span[@class='document-thumbnail']/img)[6]</td>
<td>Folder Image</td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ public void testGuest_ViewPage2Folder7() throws Exception {
Thread.sleep(1000);
}

assertTrue(selenium.isVisible(
"//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png']"));
assertTrue(selenium.isVisible("//span[@class='document-thumbnail']/img"));
assertEquals(RuntimeVariables.replace("DL Folder7 Name"),
selenium.getText(
"//a[contains(@class,'document-link')]/span[@class='entry-title']"));
Expand Down Expand Up @@ -178,7 +177,7 @@ public void testGuest_ViewPage2Folder7() throws Exception {
"Documents and Media (DL Page2 Name)"),
selenium.getText("//span[@class='portlet-title-text']"));
assertTrue(selenium.isVisible(
"xPath=(//img[@src='/html/themes/classic/images/file_system/large/folder_empty.png'])[5]"));
"xPath=(//span[@class='document-thumbnail']/img)[6]"));
assertEquals(RuntimeVariables.replace("DL Folder7 Name"),
selenium.getText(
"xPath=(//a[contains(@class,'document-link')]/span[@class='entry-title'])[6]"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</tr>
<tr>
<td>assertVisible</td>
<td>//img[@src='/html/themes/classic/images/file_system/large/document.png']</td>
<td>//span[@class='document-thumbnail']/img</td>
<td>Document&nbsp;&nbsp;Image</td>
</tr>
<tr>
Expand Down Expand Up @@ -80,7 +80,7 @@
</tr>
<tr>
<td>assertVisible</td>
<td>//img[@src='/html/themes/classic/images/file_system/large/document.png']</td>
<td>//span[@class='document-thumbnail']/img</td>
<td>Document&nbsp;&nbsp;Image</td>
</tr>
<tr>
Expand Down Expand Up @@ -133,7 +133,6 @@
<td>//tr[3]/td[4]</td>
<td>Approved</td>
</tr>

</tbody></table>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ public void testViewPage1DLFolder1Document1() throws Exception {
Thread.sleep(1000);
}

assertTrue(selenium.isVisible(
"//img[@src='/html/themes/classic/images/file_system/large/document.png']"));
assertTrue(selenium.isVisible("//span[@class='document-thumbnail']/img"));
assertEquals(RuntimeVariables.replace("DL Folder1 Document1 Title.doc"),
selenium.getText(
"//a[contains(@class,'document-link')]/span[@class='entry-title']"));
Expand All @@ -118,8 +117,7 @@ public void testViewPage1DLFolder1Document1() throws Exception {
selenium.getText("//h1[@class='header-title']/span"));
assertEquals(RuntimeVariables.replace("DL Folder1 Document1 Title.doc"),
selenium.getText("//h2[@class='document-title']"));
assertTrue(selenium.isVisible(
"//img[@src='/html/themes/classic/images/file_system/large/document.png']"));
assertTrue(selenium.isVisible("//span[@class='document-thumbnail']/img"));
assertTrue(selenium.isPartialText("//span[@class='user-date']",
"Uploaded by Joe Bloggs"));
assertEquals(RuntimeVariables.replace("Version 1.0"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</tr>
<tr>
<td>assertVisible</td>
<td>//img[@src='/html/themes/classic/images/file_system/large/folder_full_document.png']</td>
<td>//span[@class='document-thumbnail']/img</td>
<td>Folder Image</td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ public void testViewPage1DLFolder1() throws Exception {

assertEquals(RuntimeVariables.replace("Documents and Media"),
selenium.getText("//span[@class='portlet-title-text']"));
assertTrue(selenium.isVisible(
"//img[@src='/html/themes/classic/images/file_system/large/folder_full_document.png']"));
assertTrue(selenium.isVisible("//span[@class='document-thumbnail']/img"));
assertEquals(RuntimeVariables.replace("DL Folder1 Name"),
selenium.getText(
"//a[contains(@class,'document-link')]/span[@class='entry-title']"));
Expand Down
Loading

0 comments on commit b338136

Please sign in to comment.