1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.demo.uif.library.collections;
17
18 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
19 import org.junit.Test;
20 import org.openqa.selenium.By;
21
22
23
24
25 public class LibraryCollectionFeaturesMultiValueLookupAft extends WebDriverLegacyITBase {
26
27
28
29
30 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-CollectionLookupView&methodToCall=start";
31
32 @Override
33 protected String getBookmarkUrl() {
34 return BOOKMARK_URL;
35 }
36
37 @Override
38 protected void navigate() throws Exception {
39 jGrowl("Click the Library Link");
40 waitAndClickLibraryLink();
41 waitAndClickByLinkText("Collection Features");
42 waitAndClickByLinkText("Multi-Value Lookup");
43 }
44
45 protected void testMultiValueLookup() throws InterruptedException {
46 lightBoxLookupAddMultipleLines();
47
48 waitAndTypeByName("lookupCriteria[number]", "a1");
49 waitAndClickSearchByText();
50 assertButtonDisabledByText("return selected");
51
52 jGrowl("Check Travel Account 1 checkbox");
53 waitAndClickByValue("IAT:Travel Account 1:a1");
54 assertButtonEnabledByText("return selected");
55
56 jGrowl("Uncheck Travel Account 1 checkbox");
57 waitAndClickByValue("IAT:Travel Account 1:a1");
58 assertButtonDisabledByText("return selected");
59
60 waitAndClickButtonByText("return selected");
61 Thread.sleep(3000);
62 assertTextPresent("a1");
63 }
64
65 private void lightBoxLookupAddMultipleLines() throws InterruptedException {
66 waitAndClickByLinkText("Lookup/Add Multiple Lines");
67 gotoLightBox();
68 gotoLightBoxIframe();
69 }
70
71 @Test
72 public void testMultiValueLookupBookmark() throws InterruptedException {
73 testMultiValueLookup();
74 passed();
75 }
76
77 @Test
78 public void testMultiValueLookupNav() throws InterruptedException {
79 testMultiValueLookup();
80 passed();
81 }
82
83 @Test
84 public void testMultivalueLookUpSelectThisPageBookmark() throws Exception {
85 lightBoxLookupAddMultipleLines();
86 testMultiValueSelectAllThisPage();
87 passed();
88 }
89
90 @Test
91 public void testMultivalueLookUpSelectThisPageNav() throws Exception {
92 lightBoxLookupAddMultipleLines();
93 testMultiValueSelectAllThisPage();
94 passed();
95 }
96
97 @Test
98 public void testMultivalueLookUpSelectAllPagesBookmark() throws Exception {
99 lightBoxLookupAddMultipleLines();
100 testMultiValueSelectAllPages();
101 passed();
102 }
103
104 @Test
105 public void testMultivalueLookUpSelectAllPagesNav() throws Exception {
106 lightBoxLookupAddMultipleLines();
107 testMultiValueSelectAllPages();
108 passed();
109 }
110 }