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.NavTemplateMethodSTBase;
19 import org.kuali.rice.testtools.selenium.Failable;
20 import org.openqa.selenium.By;
21
22
23
24
25 public abstract class AdminTmplMthdSTNavBase extends NavTemplateMethodSTBase {
26
27 public static final String CREATE_NEW_LOCATOR = "//img[contains(@alt,'create new')]";
28
29
30 public static final String ADMIN_LOCATOR = "Administration";
31 public static final String SPAN_CLASS_PAGEBANNER = "//span[@class='pagebanner']";
32
33 @Override
34 protected String getCreateNewLinkLocator() {
35 return CREATE_NEW_LOCATOR;
36 }
37
38 @Override
39 protected String getMenuLinkLocator() {
40 return ADMIN_LOCATOR;
41 }
42
43
44
45
46 public void testCreateNewCancelNav() throws Exception {
47 gotoCreateNew();
48 testCancelConfirmation();
49 }
50
51
52
53
54 public void testEditCancel() throws Exception {
55 testSearchEditCancel();
56 }
57
58 public void testSearchEditBack(Failable failable) throws Exception {
59 waitAndClickSearch2();
60 String pageBannerText = getTextByXpath(SPAN_CLASS_PAGEBANNER);
61 waitAndClickByLinkText("edit");
62 waitFor(By.name(BLANKET_APPROVE_NAME));
63 back();
64 checkForIncidentReport();
65 assertTextPresent("Going back from Edit Search results not available https://jira.kuali.org/browse/KULRICE-9709", pageBannerText);
66 }
67
68 public void testSearchSearchBack(Failable failable, String fieldName, String searchText) throws Exception {
69 waitAndClickSearch2();
70 String pageBannerText = getTextByXpath(SPAN_CLASS_PAGEBANNER);
71 waitAndTypeByName(fieldName, searchText);
72 waitAndClickSearch2();
73 back();
74 assertTextPresent("Going back from Search to Search results not available https://jira.kuali.org/browse/KULRICE-9710", pageBannerText);
75 }
76 }