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.ITUtil;
19 import edu.samplu.common.SmokeTestBase;
20 import org.junit.Test;
21
22
23
24
25
26
27 public class ComponentSmokeTest extends SmokeTestBase {
28
29 String docId;
30
31
32
33
34 public static final String FOR_TEST_MESSAGE = " for Component Parameter";
35
36
37
38
39
40
41 public static final String BOOKMARK_URL = ITUtil.PORTAL + "?channelTitle=Component&channelUrl=" + ITUtil.getBaseUrlString() +
42 "/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.coreservice.impl.component.ComponentBo&docFormKey=88888888&returnLocation=" +
43 ITUtil.PORTAL_URL + "&hideReturnLink=true";
44
45 @Override
46 public String getBookmarkUrl() {
47 return BOOKMARK_URL;
48 }
49
50 protected void navigate() throws InterruptedException {
51 waitAndClickAdministration(this);
52 waitForTitleToEqualKualiPortalIndex();
53 checkForIncidentReport("Component");
54 selectFrameIframePortlet();
55 waitAndClickByLinkText("Component");
56
57 checkForIncidentReport("Component");
58 }
59
60 protected void testComponentCreateNewCancel() throws Exception {
61 waitAndCreateNew();
62 testCancelConfirmation();
63 passed();
64 }
65
66 protected void testComponentParameter() throws Exception {
67
68 waitAndCreateNew();
69 String componentName = "TestName" + ITUtil.createUniqueDtsPlusTwoRandomChars();
70 String componentCode = "TestCode" + ITUtil.createUniqueDtsPlusTwoRandomChars();
71 docId = testCreateNewComponent(componentName, componentCode, FOR_TEST_MESSAGE);
72
73
74 navigate();
75 testLookUpComponent(docId, componentName, componentCode);
76
77
78 testEditComponent(docId, componentName, componentCode);
79
80
81 navigate();
82 testVerifyEditedComponent(docId, componentName, componentCode);
83
84
85 testCopyComponent(docId, componentName + "copy", componentCode + "copy");
86
87
88 navigate();
89 testVerifyCopyComponent(docId, componentName + "copy", componentCode + "copy");
90 passed();
91 }
92
93 @Test
94 public void testCreateNewCancelComponentBookmark() throws Exception {
95 testComponentCreateNewCancel();
96 }
97
98 @Test
99 public void testComponentCreateNewCancelComponentNav() throws Exception {
100 testComponentCreateNewCancel();
101 }
102
103 @Test
104 public void testComponentParameterBookmark() throws Exception {
105 testComponentParameter();
106 }
107
108 @Test
109 public void testComponentParameterNav() throws Exception {
110 testComponentParameter();
111 }
112 }