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 org.apache.commons.lang.RandomStringUtils;
21
22
23
24
25 public abstract class IdentityPersonCreateNewAbstractSmokeTestBase extends AdminTmplMthdSTNavBase{
26
27
28
29
30
31
32
33 public static final String BOOKMARK_URL = ITUtil.PORTAL + "?channelTitle=Person&channelUrl="
34 + ITUtil.getBaseUrlString() + "/kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.rice.kim.api.identity.Person&docFormKey=88888888&returnLocation="+
35 ITUtil.PORTAL_URL + ITUtil.HIDE_RETURN_LINK ;
36
37
38
39
40
41
42 @Override
43 protected String getLinkLocator() {
44 return "Person";
45 }
46
47 public void testIdentityPersonCreateNewBookmark(Failable failable) throws Exception {
48 testIdentityPersonCreateNew();
49 }
50
51 public void testIdentityPersonCreateNewNav(Failable failable) throws Exception {
52 testIdentityPersonCreateNew();
53 }
54
55 public void testIdentityPersonCreateNew() throws Exception {
56 selectFrameIframePortlet();
57 waitAndClickByXpath(CREATE_NEW_XPATH);
58 waitAndTypeByName("document.documentHeader.documentDescription", "Test description of person");
59 selectByName("newAffln.affiliationTypeCode", "Staff");
60 selectByName("newAffln.campusCode","BL - BLOOMINGTON");
61 waitAndClickByName("newAffln.dflt");
62 waitAndClickByName("methodToCall.addAffln.anchor");
63 waitAndTypeByName("document.affiliations[0].newEmpInfo.employeeId","9999999999");
64 waitAndClickByName("document.affiliations[0].newEmpInfo.primary");
65 selectByName("document.affiliations[0].newEmpInfo.employmentStatusCode","Active");
66 selectByName("document.affiliations[0].newEmpInfo.employmentTypeCode","Professional");
67 waitAndTypeByName("document.affiliations[0].newEmpInfo.baseSalaryAmount","99999");
68 waitAndTypeByXpath("//*[@id='document.affiliations[0].newEmpInfo.primaryDepartmentCode']", "BL-BUS");
69 waitAndClickByName("methodToCall.addEmpInfo.line0.anchor");
70 waitAndClickByName("methodToCall.showAllTabs");
71 selectByName("newName.nameCode", "Primary");
72 waitAndTypeByName("newName.firstName","Marco");
73 waitAndTypeByName("newName.lastName","Simoncelli");
74 waitAndClickByName("newName.dflt");
75 waitAndClickByName("methodToCall.addName.anchor");
76 selectByName("newAddress.addressTypeCode", "Work");
77 waitAndTypeByName("newAddress.line1","123 Address Ln");
78 waitAndTypeByName("newAddress.city","Bloomington");
79 selectByName("newAddress.stateProvinceCode", "INDIANA");
80 waitAndTypeByName("newAddress.postalCode","47408");
81 selectByName("newAddress.countryCode","United States");
82 waitAndClickByName("newAddress.dflt");
83 waitAndClickByName("methodToCall.addAddress.anchor");
84 selectByName("newPhone.phoneTypeCode","Work");
85 waitAndTypeByName("newPhone.phoneNumber", "855-555-5555");
86 selectByName("newPhone.countryCode","United States");
87 waitAndClickByName("newPhone.dflt");
88 waitAndClickByName("methodToCall.addPhone.anchor");
89 waitAndTypeByName("newEmail.emailAddress","email@provider.net");
90 selectByName("newEmail.emailTypeCode","Work");
91 waitAndClickByName("newEmail.dflt");
92 waitAndClickByName("methodToCall.addEmail.anchor");
93 waitAndTypeByName("document.principalName", RandomStringUtils.randomAlphabetic(12).toLowerCase());
94
95
96 waitAndClickByName("methodToCall.route");
97 checkForDocError();
98
99 waitAndClickByName("methodToCall.close");
100 waitAndClickByName("methodToCall.processAnswer.button1");
101 }
102 }