1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.samplu.admin.test;
17
18 import edu.samplu.common.Failable;
19 import edu.samplu.common.ITUtil;
20 import org.apache.commons.lang.RandomStringUtils;
21
22
23
24
25 public abstract class ConfigComponentCreateNewAbstractSmokeTestBase extends AdminTmplMthdSTNavBase{
26
27
28
29
30
31
32 public static final String BOOKMARK_URL = ITUtil.PORTAL+"?channelTitle=Component&channelUrl="+ITUtil.getBaseUrlString()+
33 "/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.coreservice.impl.component.ComponentBo&docFormKey=88888888&returnLocation="+
34 ITUtil.PORTAL_URL+ ITUtil.HIDE_RETURN_LINK;
35
36
37
38
39
40
41 @Override
42 protected String getLinkLocator() {
43 return "Component";
44 }
45
46 public void testConfigComponentCreateNewBookmark(Failable failable) throws Exception {
47 testConfigComponentCreateNew();
48 passed();
49 }
50
51 public void testConfigComponentCreateNewNav(Failable failable) throws Exception {
52 testConfigComponentCreateNew();
53 passed();
54 }
55
56 public void testConfigComponentCreateNew() throws Exception
57 {
58 selectFrameIframePortlet();
59 waitAndClickByXpath(CREATE_NEW_XPATH);
60 String fourLetters = RandomStringUtils.randomAlphabetic(4);
61 waitAndTypeByName("document.documentHeader.documentDescription","Test description of Component create new");
62 selectByName("document.newMaintainableObject.namespaceCode","KR-WKFLW - Workflow");
63 waitAndTypeByName("document.newMaintainableObject.code","Test1" + fourLetters);
64 waitAndTypeByName("document.newMaintainableObject.name","Test1ComponentCode" + fourLetters);
65 waitAndClickByName("methodToCall.route");
66 checkForDocError();
67 waitAndClickByName("methodToCall.close");
68 waitAndClickByName("methodToCall.processAnswer.button1");
69 }
70 }