incubator-photark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lrese...@apache.org
Subject svn commit: r940721 - in /incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui: FF3TestBrowser.java IE7TestBrowser.java IE8TestBrowser.java
Date Tue, 04 May 2010 03:42:52 GMT
Author: lresende
Date: Tue May  4 03:42:52 2010
New Revision: 940721

URL: http://svn.apache.org/viewvc?rev=940721&view=rev
Log:
PHOTARK-35 - Applying patch from Henry Saputra to comply with JDK 1.5

Modified:
    incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui/FF3TestBrowser.java
    incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui/IE7TestBrowser.java
    incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui/IE8TestBrowser.java

Modified: incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui/FF3TestBrowser.java
URL: http://svn.apache.org/viewvc/incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui/FF3TestBrowser.java?rev=940721&r1=940720&r2=940721&view=diff
==============================================================================
--- incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui/FF3TestBrowser.java
(original)
+++ incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui/FF3TestBrowser.java
Tue May  4 03:42:52 2010
@@ -98,15 +98,15 @@ public class FF3TestBrowser {
 		//testing the loaded page
 		HtmlSelect select = page.getHtmlElementById("selectAlbum"); 
 		assertTrue(select.asText().contains("New Album"));
-		assertTrue(page.getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
-		assertTrue(page.getHtmlElementById("deleteAlbum").getAttribute("style").contains("display:
none;"));
-		assertTrue(page.getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("deleteAlbum").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display:
none;"));
 
-		assertFalse(page.getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
-		assertFalse(page.getHtmlElementById("newAlbumLabel").getAttribute("style").contains("display:
none;"));
-		assertFalse(page.getHtmlElementById("newAlbumName").getAttribute("style").contains("display:
none;"));
-		assertFalse(page.getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
-		assertFalse(page.getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("newAlbumLabel").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("newAlbumName").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
 
 		//selecting an album from drop down
 		HtmlOption option = select.getOption(1);
@@ -114,26 +114,26 @@ public class FF3TestBrowser {
 		Thread.sleep(3000);
 		//testing whether the expected changes has happened
 		assertTrue(select.asText().contains("boston"));
-		assertTrue(page.getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc"));
 		
-		assertTrue(page.getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
-		assertTrue(page.getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
 		
-		assertTrue(page.getHtmlElementById("newAlbumLabel").getAttribute("style").contains("display:
none;"));
-		assertTrue(page.getHtmlElementById("newAlbumName").getAttribute("style").contains("display:
none;"));
-		assertTrue(page.getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
-		assertFalse(page.getHtmlElementById("deleteAlbum").getAttribute("style").contains("display:
none;"));
-		assertFalse(page.getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("newAlbumLabel").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("newAlbumName").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("deleteAlbum").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display:
none;"));
 
 		//checking the changes by clicking the edit album description button
-		assertTrue(page.getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
-		page.getHtmlElementById("btnAlbumDesc").click();
+		assertTrue(page.<HtmlElement>getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
+		page.<HtmlElement>getHtmlElementById("btnAlbumDesc").click();
 		assertTrue(page.getFocusedElement().getAttribute("id").contains("albumDescription"));
-		assertFalse(page.getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
-		assertFalse(page.getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
-		page.getHtmlElementById("cancelBtnAlbumDesc").click();
-		assertTrue(page.getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
-		assertTrue(page.getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
+		page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").click();
+		assertTrue(page.<HtmlElement>getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
 
 	}
 	

Modified: incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui/IE7TestBrowser.java
URL: http://svn.apache.org/viewvc/incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui/IE7TestBrowser.java?rev=940721&r1=940720&r2=940721&view=diff
==============================================================================
--- incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui/IE7TestBrowser.java
(original)
+++ incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui/IE7TestBrowser.java
Tue May  4 03:42:52 2010
@@ -97,15 +97,15 @@ public class IE7TestBrowser {
 		//testing the loaded page
 		HtmlSelect select = page.getHtmlElementById("selectAlbum"); 
 		assertTrue(select.asText().contains("New Album"));
-		assertTrue(page.getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
-		assertTrue(page.getHtmlElementById("deleteAlbum").getAttribute("style").contains("display:
none;"));
-		assertTrue(page.getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("deleteAlbum").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display:
none;"));
 
-		assertFalse(page.getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
-		assertFalse(page.getHtmlElementById("newAlbumLabel").getAttribute("style").contains("display:
none;"));
-		assertFalse(page.getHtmlElementById("newAlbumName").getAttribute("style").contains("display:
none;"));
-		assertFalse(page.getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
-		assertFalse(page.getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("newAlbumLabel").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("newAlbumName").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
 
 		//selecting an album from drop down
 		HtmlOption option = select.getOption(1);
@@ -113,26 +113,26 @@ public class IE7TestBrowser {
 		Thread.sleep(3000);
 		//testing whether the expected changes has happened
 		assertTrue(select.asText().contains("boston"));
-		assertTrue(page.getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc"));
 		
-		assertTrue(page.getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
-		assertTrue(page.getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
 		
-		assertTrue(page.getHtmlElementById("newAlbumLabel").getAttribute("style").contains("display:
none;"));
-		assertTrue(page.getHtmlElementById("newAlbumName").getAttribute("style").contains("display:
none;"));
-		assertTrue(page.getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
-		assertFalse(page.getHtmlElementById("deleteAlbum").getAttribute("style").contains("display:
none;"));
-		assertFalse(page.getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("newAlbumLabel").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("newAlbumName").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("deleteAlbum").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display:
none;"));
 
 		//checking the changes by clicking the edit album description button
-		assertTrue(page.getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
-		page.getHtmlElementById("btnAlbumDesc").click();
+		assertTrue(page.<HtmlElement>getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
+		page.<HtmlElement>getHtmlElementById("btnAlbumDesc").click();
 		assertTrue(page.getFocusedElement().getAttribute("id").contains("albumDescription"));
-		assertFalse(page.getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
-		assertFalse(page.getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
-		page.getHtmlElementById("cancelBtnAlbumDesc").click();
-		assertTrue(page.getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
-		assertTrue(page.getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
+		page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").click();
+		assertTrue(page.<HtmlElement>getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
 
 	}
 	

Modified: incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui/IE8TestBrowser.java
URL: http://svn.apache.org/viewvc/incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui/IE8TestBrowser.java?rev=940721&r1=940720&r2=940721&view=diff
==============================================================================
--- incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui/IE8TestBrowser.java
(original)
+++ incubator/photark/trunk/photark-ui-test/src/test/java/org/apache/photark/ui/IE8TestBrowser.java
Tue May  4 03:42:52 2010
@@ -97,15 +97,15 @@ public class IE8TestBrowser {
 		//testing the loaded page
 		HtmlSelect select = page.getHtmlElementById("selectAlbum"); 
 		assertTrue(select.asText().contains("New Album"));
-		assertTrue(page.getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
-		assertTrue(page.getHtmlElementById("deleteAlbum").getAttribute("style").contains("display:
none;"));
-		assertTrue(page.getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("deleteAlbum").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display:
none;"));
 
-		assertFalse(page.getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
-		assertFalse(page.getHtmlElementById("newAlbumLabel").getAttribute("style").contains("display:
none;"));
-		assertFalse(page.getHtmlElementById("newAlbumName").getAttribute("style").contains("display:
none;"));
-		assertFalse(page.getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
-		assertFalse(page.getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("newAlbumLabel").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("newAlbumName").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
 
 		//selecting an album from drop down
 		HtmlOption option = select.getOption(1);
@@ -113,26 +113,26 @@ public class IE8TestBrowser {
 		Thread.sleep(3000);
 		//testing whether the expected changes has happened
 		assertTrue(select.asText().contains("boston"));
-		assertTrue(page.getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("albumCover").asXml().contains("photark/gallery/boston/dsc"));
 		
-		assertTrue(page.getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
-		assertTrue(page.getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00376.jpg"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("adminTableGallery").asXml().contains("photark/gallery/boston/dsc00368.jpg"));
 		
-		assertTrue(page.getHtmlElementById("newAlbumLabel").getAttribute("style").contains("display:
none;"));
-		assertTrue(page.getHtmlElementById("newAlbumName").getAttribute("style").contains("display:
none;"));
-		assertTrue(page.getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
-		assertFalse(page.getHtmlElementById("deleteAlbum").getAttribute("style").contains("display:
none;"));
-		assertFalse(page.getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("newAlbumLabel").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("newAlbumName").getAttribute("style").contains("display:
none;"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("deleteAlbum").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("btnAlbumDesc").getAttribute("style").contains("display:
none;"));
 
 		//checking the changes by clicking the edit album description button
-		assertTrue(page.getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
-		page.getHtmlElementById("btnAlbumDesc").click();
+		assertTrue(page.<HtmlElement>getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
+		page.<HtmlElement>getHtmlElementById("btnAlbumDesc").click();
 		assertTrue(page.getFocusedElement().getAttribute("id").contains("albumDescription"));
-		assertFalse(page.getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
-		assertFalse(page.getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
-		page.getHtmlElementById("cancelBtnAlbumDesc").click();
-		assertTrue(page.getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
-		assertTrue(page.getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
+		assertFalse(page.<HtmlElement>getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
+		page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").click();
+		assertTrue(page.<HtmlElement>getHtmlElementById("albumDescription").getAttribute("readonly").contains("readonly"));
+		assertTrue(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display:
none;"));
 
 	}
 



Mime
View raw message