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 edu.samplu.common.WebDriverLegacyITBase;
21
22
23
24
25
26
27 public abstract class ComponentAbstractSmokeTestBase extends WebDriverLegacyITBase {
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 protected void bookmark() {
46 open(ITUtil.getBaseUrlString() + BOOKMARK_URL);
47 }
48
49
50
51
52
53 protected abstract void gotoTest() throws Exception;
54
55 protected void navigtaion() throws InterruptedException {
56 waitAndClickAdministration(this);
57 waitForTitleToEqualKualiPortalIndex();
58 checkForIncidentReport("Component");
59 selectFrameIframePortlet();
60 waitAndClickByLinkText("Component");
61
62 checkForIncidentReport("Component");
63 }
64
65 protected void testComponentCreateNewCancelBookmark(Failable failable) throws Exception {
66 waitAndCreateNew();
67 testCancelConfirmation();
68 passed();
69 }
70
71 protected void testComponentCreateNewCancelNav(Failable failable) throws Exception {
72 navigtaion();
73 waitAndCreateNew();
74 testCancelConfirmation();
75 passed();
76 }
77
78 protected void testComponentParameterBookmark(Failable failable) throws Exception {
79 testComponentParameter();
80 passed();
81 }
82
83 protected void testComponentParameterNav(Failable failable) throws Exception {
84 navigtaion();
85 testComponentParameter();
86 passed();
87 }
88
89 protected void testComponentParameter() throws Exception {
90
91 waitAndCreateNew();
92 String componentName = "TestName" + ITUtil.DTS_TWO;
93 String componentCode = "TestCode" + ITUtil.DTS_TWO;
94 docId = testCreateNewComponent(componentName, componentCode, FOR_TEST_MESSAGE);
95
96
97 gotoTest();
98 testLookUpComponent(docId, componentName, componentCode);
99
100
101 testEditComponent(docId, componentName, componentCode);
102
103
104 gotoTest();
105 testVerifyEditedComponent(docId, componentName, componentCode);
106
107
108 testCopyComponent(docId, componentName + "copy", componentCode + "copy");
109
110
111 gotoTest();
112 testVerifyCopyComponent(docId, componentName + "copy", componentCode + "copy");
113 }
114 }