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
21
22
23
24 public abstract class IdentityPersonLookUpEditAbstractSmokeTestBase extends AdminTmplMthdSTNavBase{
25
26
27
28
29
30
31
32 public static final String BOOKMARK_URL = ITUtil.PORTAL + "?channelTitle=Person&channelUrl="
33 + ITUtil.getBaseUrlString() + "/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.kim.api.identity.Person&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 "Person";
44 }
45
46 public void testIdentityPersonLookUpEditBookmark(Failable failable) throws Exception {
47 testIdentityPersonLookUpEdit();
48 passed();
49 }
50
51 public void testIdentityPersonLookUpEditNav(Failable failable) throws Exception {
52 testIdentityPersonLookUpEdit();
53 passed();
54 }
55
56 public void testIdentityPersonLookUpEdit() throws Exception {
57
58 selectFrameIframePortlet();
59 waitAndTypeByName("principalName","fran");
60 waitAndClickByXpath("(//input[@name='methodToCall.search'])[2]");
61 selectFrameIframePortlet();
62 waitAndClickByXpath("//a[@title='edit Person withPrincipal ID=fran ']");
63 waitAndTypeByName("document.documentHeader.documentDescription", "Test description of person");
64 selectByName("newAffln.affiliationTypeCode", "Staff");
65 selectByName("newAffln.campusCode","BL - BLOOMINGTON");
66 waitAndClickByName("newAffln.dflt");
67 waitAndClickByName("methodToCall.addAffln.anchor");
68 waitAndTypeByName("document.affiliations[0].newEmpInfo.employeeId","9999999999");
69 waitAndClickByName("document.affiliations[0].newEmpInfo.primary");
70 selectByName("document.affiliations[0].newEmpInfo.employmentStatusCode","Active");
71 selectByName("document.affiliations[0].newEmpInfo.employmentTypeCode","Professional");
72 waitAndTypeByName("document.affiliations[0].newEmpInfo.baseSalaryAmount","99999");
73 waitAndTypeByXpath("//*[@id='document.affiliations[0].newEmpInfo.primaryDepartmentCode']", "BL-BUS");
74 waitAndClickByName("methodToCall.addEmpInfo.line0.anchor");
75 waitAndClickByName("methodToCall.showAllTabs");
76 waitAndClickByName("methodToCall.route");
77
78 if (hasDocError()) {
79
80 if (!extractErrorText().startsWith("3 error(s) found on page")) {
81 checkForDocError();
82 }
83 } else {
84 assertTextPresent("Document was successfully submitted.");
85 }
86 waitAndClickByName("methodToCall.close");
87 waitAndClickByName("methodToCall.processAnswer.button1");
88 }
89 }