1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.main;
17
18 import org.apache.commons.lang.RandomStringUtils;
19 import org.kuali.rice.testtools.common.JiraAwareFailable;
20 import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
21 import org.kuali.rice.testtools.selenium.WebDriverUtils;
22
23
24
25
26 public class ContextLookUpAftBase extends MainTmplMthdSTNavBase{
27
28
29
30
31
32
33
34
35 public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Context%20Lookup&channelUrl="
36 + WebDriverUtils.getBaseUrlString() + AutomatedFunctionalTestUtils.KRAD_LOOKUP_METHOD
37 + "org.kuali.rice.krms.impl.repository.ContextBo"
38 + AutomatedFunctionalTestUtils.SHOW_MAINTENANCE_LINKS
39 + "&returnLocation=" + AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK;
40
41 @Override
42 protected String getBookmarkUrl() {
43 return BOOKMARK_URL;
44 }
45
46
47
48
49
50
51 @Override
52 protected String getLinkLocator() {
53 return "Context Lookup";
54 }
55
56 public void testContextLookUpBookmark(JiraAwareFailable failable) throws Exception {
57 contextLookupAssertions();
58 passed();
59 }
60 public void testContextLookUpNav(JiraAwareFailable failable) throws Exception {
61 contextLookupAssertions();
62 passed();
63 }
64
65 public void testContextCopy(JiraAwareFailable failable) throws Exception {
66 waitAndClickSearchByText();
67 waitAndClickLinkContainingText("copy");
68 String randomNumber = RandomStringUtils.randomAlphabetic(4);
69 waitAndTypeByName("document.newMaintainableObject.dataObject.id", "Context " + randomNumber);
70 clearTextByName("document.newMaintainableObject.dataObject.name");
71 waitAndTypeByName("document.newMaintainableObject.dataObject.name", "Context name" + randomNumber);
72 clearTextByName("document.newMaintainableObject.dataObject.description");
73 waitAndTypeByName("document.newMaintainableObject.dataObject.description", "Context desc" + randomNumber);
74 waitAndClickButtonByText("Submit");
75 waitAndClickConfirmSubmitOk();
76 waitForProgressLoading(WebDriverUtils.configuredImplicityWait() * 10);
77 waitForTextPresent("Document was successfully submitted.");
78 passed();
79 }
80 }