TAP5-2225: adding test.
authorThiago H. de Paula Figueiredo <thiagohp@apache.org>
Wed, 5 Apr 2017 14:46:55 +0000 (11:46 -0300)
committerThiago H. de Paula Figueiredo <thiagohp@apache.org>
Wed, 5 Apr 2017 14:46:55 +0000 (11:46 -0300)
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java

index 665570b..5bb9556 100644 (file)
@@ -311,4 +311,25 @@ public class AjaxTests extends App1TestCase
         assertTextPresent("Today");
 
     }
+    
+    @Test
+    public void publishevent() throws InterruptedException
+    {
+        openLinks("@PublishEvent Demo");
+        
+        waitForAjaxRequestsToComplete();
+        
+        final String template = "//table/tbody/tr[%d]/td[%d]";
+        
+        for (int i = 1; i <= 8; i++) {
+            assertEquals("Row " + i, 
+                    getText(String.format(template, i, 3)),
+                    getText(String.format(template, i, 4)));
+        }
+
+//        // An ugly way of giving time for all the AJAX requests to finish
+//        // without adding more JavaScript for that.
+//        Thread.sleep(3000);
+    }
+    
 }