1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package edu.samplu.krad.compview;
18
19 import edu.samplu.common.WebDriverLegacyITBase;
20
21 import org.junit.Test;
22
23 import static org.junit.Assert.assertEquals;
24 import static org.junit.Assert.assertTrue;
25 import static org.junit.Assert.fail;
26
27
28
29
30
31
32
33
34 public class ParentLineLegacyIT extends WebDriverLegacyITBase {
35 @Override
36 public String getTestUrl() {
37 return "/kr-krad/uicomponents?methodToCall=start&readOnlyFields=field91&viewId=UifCompView_KNS#UifCompView-Page7";
38 }
39
40 @Test
41
42
43
44 public void testSubCollectionSize() throws Exception {
45 checkForIncidentReport("link=Collections");
46
47 waitAndClickByLinkText("Collections");
48
49 for (int second = 0;; second++) {
50 if (second >= 30)
51 fail("timeout");
52 try {
53 if(getText("div.uif-group.uif-collectionGroup.uif-tableCollectionGroup.uif-tableSubCollection.uif-disclosure span.uif-headerText-span").equals("SubCollection - (3 lines)"))
54 {
55 break;
56 }
57
58 }
59 catch (Exception e) {}
60 Thread.sleep(1000);
61 }
62
63 assertEquals("SubCollection - (3 lines)", getText("div.uif-group.uif-collectionGroup.uif-tableCollectionGroup.uif-tableSubCollection.uif-disclosure span.uif-headerText-span"));
64 assertEquals("SubCollection - (2 lines)", getTextByXpath("//a[@id='subCollection1_line1_toggle']/span"));
65
66
67 }
68 }