1 /**
2 * Copyright 2005-2014 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package edu.sampleu.krad.reference;
17
18 import org.junit.Test;
19 import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
20 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
21 import org.kuali.rice.testtools.selenium.WebDriverUtils;
22
23 /**
24 * Tests the Component section in Rice.
25 *
26 * @author Kuali Rice Team (rice.collab@kuali.org)
27 */
28 public class CitizenshipStatusAft extends WebDriverLegacyITBase {
29
30 /**
31 * AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Citizenship%20Status&channelUrl="
32 * + WebDriverUtils.getBaseUrlString() + AutomatedFunctionalTestUtils.KRAD_LOOKUP_METHOD +
33 * "org.kuali.rice.kim.impl.identity.citizenship.EntityCitizenshipStatusBo&returnLocation="
34 * + AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK;
35 */
36 public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Citizenship%20Status&channelUrl="
37 + WebDriverUtils.getBaseUrlString() + AutomatedFunctionalTestUtils.KRAD_LOOKUP_METHOD +
38 "org.kuali.rice.kim.impl.identity.citizenship.EntityCitizenshipStatusBo&returnLocation="
39 + AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK;
40
41 @Override
42 protected String getBookmarkUrl() {
43 return BOOKMARK_URL;
44 }
45
46 @Override
47 protected void navigate() throws InterruptedException {
48 waitAndClickKRAD();
49 waitAndClickByLinkText("Citizenship Status");
50 }
51
52 //Code for KRAD Test Package.
53 protected void testCitizenshipStatus() throws Exception {
54 selectFrameIframePortlet();
55 waitAndClickButtonByText("Search");
56 Thread.sleep(3000);
57 // Code cannot be executed as there is not data to test on Citizenship Status.
58 // assertTextPresent("AFLT");
59 // assertTextPresent("FCLTY");
60 // assertTextPresent("STAFF");
61 // waitAndClickByXpath("//input[@name='lookupCriteria[active]' and @value='N']");
62 // waitAndClickButtonByText("Search");
63 // Thread.sleep(3000);
64 // if(isTextPresent("AFLT")) {
65 // fail("Conditions not working !");
66 // }
67 // waitAndTypeByName("lookupCriteria[code]","AFLT");
68 // waitAndClickButtonByText("Search");
69 // Thread.sleep(3000);
70 // if(isTextPresent("FCLTY")) {
71 // fail("Conditions not working !");
72 // }
73 }
74
75 @Test
76 public void testCitizenshipStatusBookmark() throws Exception {
77 testCitizenshipStatus();
78 passed();
79 }
80
81 @Test
82 public void testCitizenshipStatusNav() throws Exception {
83 testCitizenshipStatus();
84 passed();
85 }
86 }