1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.admin;
17
18 import org.junit.Test;
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 ConfigNamespaceCreateNewAft extends AdminTmplMthdAftNavCreateNewBase {
27
28
29
30
31
32
33 public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Namespace&channelUrl="+ WebDriverUtils
34 .getBaseUrlString()+"/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.coreservice.impl.namespace.NamespaceBo&docFormKey=88888888&returnLocation="+
35 AutomatedFunctionalTestUtils.PORTAL_URL+ AutomatedFunctionalTestUtils.HIDE_RETURN_LINK;
36
37 protected void createNewEnterDetails() throws InterruptedException {
38 waitAndTypeByName("document.documentHeader.documentDescription", getDescriptionUnique());
39 jiraAwareTypeByName("document.newMaintainableObject.code", "code" + uniqueString);
40 jiraAwareTypeByName("document.newMaintainableObject.name", "name" + uniqueString);
41 }
42
43 @Override
44 protected String getBookmarkUrl() {
45 return BOOKMARK_URL;
46 }
47
48
49
50
51
52
53 @Override
54 protected String getLinkLocator() {
55 return "Namespace";
56 }
57
58 public void testConfigNamespaceCreateNewBookmark(JiraAwareFailable failable) throws Exception {
59 testConfigNamespaceCreateNew();
60 passed();
61 }
62
63 public void testConfigNamespaceCreateNewNav(JiraAwareFailable failable) throws Exception {
64 testConfigNamespaceCreateNew();
65 passed();
66 }
67
68 public void testConfigNamespaceCreateNew() throws Exception {
69 selectFrameIframePortlet();
70 waitAndCreateNew();
71
72 String docId = waitForDocId();
73
74 waitAndTypeByName("document.documentHeader.documentDescription", "Test description of Namespace create new " + AutomatedFunctionalTestUtils
75 .createUniqueDtsPlusTwoRandomCharsNot9Digits());
76 waitAndTypeByName("document.newMaintainableObject.code", "KR-SYS3" + AutomatedFunctionalTestUtils
77 .createUniqueDtsPlusTwoRandomChars());
78 waitAndTypeByName("document.newMaintainableObject.name","Enterprise Infrastructure 3");
79 waitAndTypeByName("document.newMaintainableObject.applicationId","RICE");
80
81 addAdHocRecipientsPerson(new String[]{getUserName(), "A"});
82
83
84 waitAndClickSave();
85 waitAndClickSubmit();
86 assertActionList(docId, "A", "ENROUTE");
87 assertOutbox(docId, "FINAL");
88 checkForDocError();
89
90 assertDocSearch(docId, DOC_STATUS_FINAL);
91
92
93
94 }
95
96 @Test
97 public void testConfigNamespaceCreateNewBookmark() throws Exception {
98 testConfigNamespaceCreateNewBookmark(this);
99 }
100
101 @Test
102 public void testConfigNamespaceCreateNewNav() throws Exception {
103 testConfigNamespaceCreateNewNav(this);
104 }
105 }