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 LabsCollectionsAft extends LabsKitchenSinkBase {
25
26 public static final String BOOKMARK_URL = "/kr-krad/uicomponents?viewId=UifCompView&formKey=ab7fa92d-a2a0-4b94-b349-c00eb81de311&cacheKey=endwmf7mxaohx3lxynk6sm&pageId=UifCompView-Page7#UifCompView-Page7";
27
28 @Override
29 protected String getBookmarkUrl() {
30 return BOOKMARK_URL;
31 }
32
33 @Override
34 protected void navigate() throws Exception {
35 navigateToKitchenSink("Collections");
36 }
37
38 @Test
39 public void testCollectionsBookmark() throws Exception {
40 testCollections();
41 passed();
42 }
43
44 @Test
45 public void testCollectionsNav() throws Exception {
46 testCollections();
47 passed();
48 }
49
50 protected void testCollections() throws InterruptedException
51 {
52
53 assertElementPresentByXpath("//table[@class='table table-condensed table-bordered uif-tableCollectionLayout uif-hasAddLine']/tbody/tr[@class='uif-collectionAddItem']");
54 assertElementPresentByXpath("//table[@class='table table-condensed table-bordered uif-tableCollectionLayout uif-hasAddLine']/tbody/tr/td[@class='uif-collection-column-action uif-collection-column-action']");
55
56
57 assertElementPresentByXpath("//table[@class='table table-condensed table-bordered uif-tableCollectionLayout uif-hasAddLine dataTable']/tbody/tr[@class='uif-collectionAddItem odd']");
58 assertElementPresentByXpath("//div[@class='dataTables_length']/label/select");
59
60
61 assertElementPresentByXpath("//div[@class='uif-collectionItem uif-tableCollectionItem uif-collectionAddItem']/table[@class='table table-condensed table-bordered uif-gridLayout']");
62 assertElementPresentByXpath("//div[@class='dataTables_scrollBody']/table[@class='table table-condensed table-bordered uif-tableCollectionLayout dataTable']/tbody/tr/td[@class='uif-collection-column-action uif-collection-column-action ']");
63
64
65 assertElementPresentByXpath("//div[@id='collection3_disclosureContent']/div[@class='uif-stackedCollectionLayout']/div/table");
66
67
68 assertElementPresentByXpath("//div[@id='collection4_disclosureContent']/div[@class='uif-stackedCollectionLayout']/div/table");
69 waitAndClickByXpath("//span[contains(text(),'SubCollection - (3 lines)')]");
70 assertElementPresentByXpath("//div[@id='subCollection1_line0_disclosureContent']");
71
72
73 assertElementPresentByXpath("//ul/li/div[@data-parent='UifCompView-CollectionList']");
74 }
75 }