1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  package org.kuali.rice.krad.labs.kitchensink;
17  
18  import org.junit.Test;
19  
20  
21  
22  
23  
24  public class LabsOtherExamplesAft extends LabsKitchenSinkBase {
25  
26      public static final String BOOKMARK_URL = "/kr-krad/uicomponents?viewId=UifCompView";
27      
28      @Override
29      protected String getBookmarkUrl() {
30          return BOOKMARK_URL;
31      }
32  
33  	@Override
34  	protected void navigate() throws Exception {
35  		navigateToKitchenSink("Other Examples");
36  	}
37  	
38  	@Test
39      public void testOtherExamplesBookmark() throws Exception {
40  		waitAndClickByLinkText("Other Examples");
41          testOtherExamples();
42          passed();
43      }
44  
45      @Test
46      public void testOtherExamplesNav() throws Exception {
47          testOtherExamples();
48          passed();
49      }
50      
51      protected void testOtherExamples() throws InterruptedException {
52      	
53      	waitForElementPresentByXpath("//input[@name='remoteFieldValuesMap[remoteField1]' and @value='Apple']");
54      	assertElementPresentByXpath("//select[@name='remoteFieldValuesMap[remoteField4]']");
55      	
56      	
57      	assertElementPresentByXpath("//table[@class='table table-condensed table-bordered uif-tableCollectionLayout uif-hasAddLine']/tbody/tr/td[3]/div/input[@value='Apple']");
58      	assertElementPresentByXpath("//button[@id='remotableFieldsCollection_add']");
59      	
60      	
61      	assertElementPresentByXpath("//input[@name='field91' and @value='Read only value']");
62      	assertElementPresentByXpath("//input[@name='uiTestObject.field3' and @value='Foo-Bear']");
63      	
64      	
65      	fireEvent("field1","focus");
66      	waitForTextPresent("This tooltip is triggered by focus or and mouse over.");
67      	fireMouseOverEventByName("field2");
68      	assertElementPresentByXpath("//td[@class='jquerybubblepopup-innerHtml']");
69      	fireMouseOverEventByName("field119");
70      	assertElementPresentByXpath("//td[@class='jquerybubblepopup-innerHtml']");
71      	fireMouseOverEventByName("field120");
72      	assertElementPresentByXpath("//td[@class='jquerybubblepopup-innerHtml']");
73      	
74      	
75      	fireMouseOverEventByXpath("//div[@id='TableCollection1-Hover1_line1']");
76      	assertElementPresentByXpath("//td[@class='jquerybubblepopup-innerHtml']");
77      }
78  }