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.AdminMenuBlanketAppLegacyITBase;
19 import edu.samplu.common.AdminMenuLegacyITBase;
20 import edu.samplu.common.ITUtil;
21 import org.apache.commons.lang.RandomStringUtils;
22
23
24
25
26
27
28 public class LocationCountyBlanketAppLegacyIT extends AdminMenuBlanketAppLegacyITBase {
29
30 @Override
31 protected String getLinkLocator() {
32 return "County";
33 }
34
35 @Override
36 public String blanketApprove() throws Exception {
37 String docId = waitForDocId();
38 waitAndTypeByXpath("//input[@id='document.documentHeader.documentDescription']", "Validation Test County");
39 assertBlanketApproveButtonsPresent();
40 String countryLookUp = "//input[@name='methodToCall.performLookup.(!!org.kuali.rice.location.impl.country.CountryBo!!).(((code:document.newMaintainableObject.countryCode,))).((`document.newMaintainableObject.countryCode:code,`)).((<>)).(([])).((**)).((^^)).((&&)).((//)).((~~)).(::::;" + getBaseUrlString()+ "/kr/lookup.do;::::).anchor4']";
41 waitAndClickByXpath(countryLookUp);
42 waitAndTypeByName("code", "US");
43 waitAndClickByXpath("//input[@name='methodToCall.search' and @value='search']");
44 waitAndClickByLinkText("return value");
45 waitAndTypeByXpath("//input[@id='document.newMaintainableObject.code']", RandomStringUtils.randomAlphabetic(2).toUpperCase());
46 String stateLookUp = "//input[@name='methodToCall.performLookup.(!!org.kuali.rice.location.impl.state.StateBo!!).(((countryCode:document.newMaintainableObject.countryCode,code:document.newMaintainableObject.stateCode,))).((`document.newMaintainableObject.countryCode:countryCode,document.newMaintainableObject.stateCode:code,`)).((<>)).(([])).((**)).((^^)).((&&)).((//)).((~~)).(::::;" + getBaseUrlString() + "/kr/lookup.do;::::).anchor4']";
47 waitAndClickByXpath(stateLookUp);
48 waitAndTypeByName("code", "IN");
49 waitAndClickByXpath("//input[@name='methodToCall.search' and @value='search']");
50 waitAndClickByLinkText("return value");
51 String countyName = "Validation Test County"+ITUtil.DTS;
52 waitAndTypeByXpath("//input[@id='document.newMaintainableObject.name']", countyName);
53 waitAndClickByXpath("//input[@id='document.newMaintainableObject.active']");
54 return docId;
55 }
56 }
57