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.AdminMenuBlanketAppITBase;
19 import edu.samplu.common.ITUtil;
20 import org.apache.commons.lang.RandomStringUtils;
21
22 import static org.junit.Assert.assertTrue;
23
24
25
26
27
28
29 public class LocationCountryBlanketAppIT extends AdminMenuBlanketAppITBase {
30
31 @Override
32 public String getLinkLocator() {
33 return "link=Country";
34 }
35
36 @Override
37 public String blanketApprove() throws InterruptedException{
38 String docId = getText("//div[@id='headerarea']/div/table/tbody/tr[1]/td[1]");
39 assertElementPresent("methodToCall.cancel");
40 String twoLetters = RandomStringUtils.randomAlphabetic(2).toUpperCase();
41 String countryName = "Validation Test Country " + ITUtil.DTS + twoLetters;
42 waitAndType("//input[@id='document.documentHeader.documentDescription']", countryName);
43 waitAndType("//input[@id='document.newMaintainableObject.code']", twoLetters);
44 waitAndType("//input[@id='document.newMaintainableObject.name']", countryName);
45 waitAndType("//input[@id='document.newMaintainableObject.alternateCode']", "V" + twoLetters);
46 return docId;
47 }
48 }
49