1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.admin;
17
18 import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
19 import org.kuali.rice.testtools.selenium.WebDriverUtils;
20 import org.openqa.selenium.By;
21
22
23
24
25 public class ConfigParameterAft extends AdminTmplMthdAftNavCopyBase {
26
27
28
29
30
31
32 public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Parameter&channelUrl="+ WebDriverUtils
33 .getBaseUrlString()+"/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.coreservice.impl.parameter.ParameterBo&docFormKey=88888888&returnLocation="
34 + AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK;
35
36 public static String[] inputVerifyDetails;
37
38 @Override
39 protected String getBookmarkUrl() {
40 return BOOKMARK_URL;
41 }
42
43
44
45
46
47
48 @Override
49 protected String getLinkLocator() {
50 return "Parameter";
51 }
52
53 @Override
54 protected void createNewEnterDetails() throws InterruptedException {
55 inputDetails();
56
57 selectOptionByName("document.newMaintainableObject.namespaceCode", inputVerifyDetails[6]);
58 }
59
60 private void inputDetails() throws InterruptedException {
61 inputVerifyDetails = new String[] {
62 getDescriptionUnique(),
63 "ActionList",
64 "name" + uniqueString,
65 "desc" + uniqueString,
66 "Config",
67 "Allowed",
68 namespaceCode
69 };
70
71
72
73
74
75
76 waitAndTypeByName("document.documentHeader.documentDescription", inputVerifyDetails[0]);
77 jiraAwareTypeByName("document.newMaintainableObject.componentCode", inputVerifyDetails[1]);
78 jiraAwareTypeByName("document.newMaintainableObject.name", inputVerifyDetails[2]);
79 jiraAwareTypeByName("document.newMaintainableObject.description", inputVerifyDetails[3]);
80 jiraAwareTypeByName(("document.newMaintainableObject.parameterTypeCode"), inputVerifyDetails[4]);
81
82 waitAndClickByName("document.newMaintainableObject.evaluationOperatorCode", inputVerifyDetails[5]);
83 }
84
85 @Override
86 protected void blanketApproveAssert(String docId) throws InterruptedException {
87 super.blanketApproveAssert(docId);
88 waitAndClickLinkContainingText(docId);
89
90 driver.switchTo().window((String)driver.getWindowHandles().toArray()[1]);
91
92 assertTextPresent(inputVerifyDetails);
93 screenshot();
94 }
95
96 @Override
97 protected void createNewLookupDetails() throws InterruptedException {
98 inputDetails();
99
100 assertEquals("", getTextByName(CANCEL_NAME));
101
102 String componentLookUp = "//input[@name='methodToCall.performLookup.(!!org.kuali.rice.coreservice.impl.component.ComponentBo!!).(((code:document.newMaintainableObject.componentCode,namespaceCode:document.newMaintainableObject.namespaceCode,))).((`document.newMaintainableObject.componentCode:code,document.newMaintainableObject.namespaceCode:namespaceCode,`)).((<>)).(([])).((**)).((^^)).((&&)).((//)).((~~)).(::::;"
103 + getBaseUrlString() + "/kr/lookup.do;::::).anchor4']";
104 waitAndClickByXpath(componentLookUp);
105 waitAndClickSearch();
106 waitAndClickReturnValue();
107 }
108 }