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 String docId;
29
30
31
32
33
34
35 public static final String BOOKMARK_URL = ITUtil.PORTAL + "?channelTitle=Component&channelUrl=" + ITUtil.getBaseUrlString() +
36 "/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.coreservice.impl.component.ComponentBo&docFormKey=88888888&returnLocation=" +
37 ITUtil.PORTAL_URL + "&hideReturnLink=true";
38
39 protected void bookmark() {
40 open(ITUtil.getBaseUrlString() + BOOKMARK_URL);
41 }
42
43
44
45
46
47 protected abstract void gotoTest() throws Exception;
48
49 protected void navigtaion() throws InterruptedException {
50 waitAndClickAdministration(this);
51 waitForTitleToEqualKualiPortalIndex();
52 checkForIncidentReport("Component");
53 selectFrameIframePortlet();
54 waitAndClickByLinkText("Component");
55
56 checkForIncidentReport("Component");
57 }
58
59 protected void testComponentCreateNewCancelBookmark(Failable failable) throws Exception {
60 waitAndCreateNew();
61 testCancelConfirmation();
62 passed();
63 }
64
65 protected void testComponentCreateNewCancelNav(Failable failable) throws Exception {
66 navigtaion();
67 waitAndCreateNew();
68 testCancelConfirmation();
69 passed();
70 }
71
72 protected void testComponentParameterBookmark(Failable failable) throws Exception {
73 testComponentParameter();
74 passed();
75 }
76
77 protected void testComponentParameterNav(Failable failable) throws Exception {
78 navigtaion();
79 testComponentParameter();
80 passed();
81 }
82
83 protected void testComponentParameter() throws Exception {
84
85 waitAndCreateNew();
86 String componentName = "TestName" + ITUtil.DTS_TWO;
87 String componentCode = "TestCode" + ITUtil.DTS_TWO;
88 docId = testCreateNewComponent(componentName, componentCode);
89
90
91 gotoTest();
92 testLookUpComponent(docId, componentName, componentCode);
93
94
95 testEditComponent(docId, componentName, componentCode);
96
97
98 gotoTest();
99 testVerifyEditedComponent(docId, componentName, componentCode);
100
101
102 testCopyComponent(docId, componentName + "copy", componentCode + "copy");
103
104
105 gotoTest();
106 testVerifyCopyComponent(docId, componentName + "copy", componentCode + "copy");
107 }
108 }