1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.kim.api.location;
17
18 import edu.sampleu.admin.AdminTmplMthdAftNavBase;
19 import org.apache.commons.lang.RandomStringUtils;
20 import org.kuali.rice.testtools.common.JiraAwareFailable;
21 import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
22 import org.kuali.rice.testtools.selenium.WebDriverUtils;
23
24
25
26
27 public abstract class LocationPostCodeAftBase extends AdminTmplMthdAftNavBase {
28
29
30
31
32
33
34 public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Postal%20Code&channelUrl="
35 + WebDriverUtils.getBaseUrlString() + AutomatedFunctionalTestUtils.KNS_LOOKUP_METHOD +
36 "org.kuali.rice.location.impl.postalcode.PostalCodeBo&docFormKey=88888888&returnLocation=" +
37 AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK ;
38
39 @Override
40 protected String getBookmarkUrl() {
41 return BOOKMARK_URL;
42 }
43
44
45
46
47
48
49 @Override
50 protected String getLinkLocator() {
51 return "Postal Code";
52 }
53
54 @Override
55 protected void createNewEnterDetails() throws InterruptedException {
56 waitAndTypeByName("document.documentHeader.documentDescription", getDescriptionUnique());
57 jiraAwareTypeByName("document.newMaintainableObject.countryCode", "US");
58 jiraAwareTypeByName("document.newMaintainableObject.code", uniqueString);
59 jiraAwareTypeByName("document.newMaintainableObject.stateCode", "IN");
60 jiraAwareTypeByName("document.newMaintainableObject.cityName", "name" + uniqueString);
61 }
62
63 public void testLocationPostCodeBookmark(JiraAwareFailable failable) throws Exception {
64 testCreateNewCancel();
65 driver.navigate().to(WebDriverUtils.getBaseUrlString() + BOOKMARK_URL);
66 testCreateNewSave();
67 driver.navigate().to(WebDriverUtils.getBaseUrlString() + BOOKMARK_URL);
68 testCreateNewSubmit();
69 driver.navigate().to(WebDriverUtils.getBaseUrlString() + BOOKMARK_URL);
70 testCreateNewSaveSubmit();
71 passed();
72 }
73
74 public void testLocationPostCodeNav(JiraAwareFailable failable) throws Exception {
75 testCreateNewCancelNav();
76 passed();
77 }
78 }