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