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.ITUtil;
20 import edu.samplu.common.UpgradedSeleniumITBase;
21 import org.junit.Test;
22 import static org.junit.Assert.assertNotSame;
23 import static org.junit.Assert.fail;
24
25
26
27
28
29
30 public class DeleteSubCollectionLineIT extends UpgradedSeleniumITBase{
31 @Override
32 public String getTestUrl() {
33 return "/kr-krad/uicomponents?viewId=UifCompView_KNS&methodToCall=start&readOnlyFields=field91";
34 }
35
36 @Test
37
38
39
40 public void deleteSubCollectionLine() throws Exception {
41
42 waitAndClick("link=Collections");
43 Thread.sleep(5000);
44
45
46 waitForElementPresent("name=list4[0].subList[0].field1");
47
48 waitAndType("name=list4[0].subList[0].field1", "selenium");
49
50 waitAndClick("css=div[title='Line Summary \'A\' With Expression'].uif-group.uif-gridGroup.uif-collectionItem.uif-gridCollectionItem div.uif-group.uif-collectionGroup.uif-tableCollectionGroup.uif-tableSubCollection.uif-disclosure tr.odd button[data-loadingmessage='Deleting Line...'].uif-action.uif-secondaryActionButton.uif-smallActionButton");
51 Thread.sleep(2000);
52
53
54 for (int second = 0;; second++) {
55 if (second >= 60) fail("timeout");
56 try { if (!"selenium".equals(getValue("name=list4[0].subList[0].field1"))) break;} catch (Exception e) {}
57 Thread.sleep(1000);
58 }
59
60 assertNotSame("selenium", getValue("name=list4[0].subList[0].field1"));
61 }
62 }