1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.main;
17
18 import edu.sampleu.common.NavTemplateMethodAftBase;
19 import org.kuali.rice.testtools.common.JiraAwareFailable;
20 import org.openqa.selenium.By;
21
22
23
24
25 public abstract class MainTmplMthdSTNavBase extends NavTemplateMethodAftBase {
26
27 public static final String DATA_TABLES_INFO = "dataTables_info";
28
29 @Override
30 protected String getCreateNewLinkLocator() {
31 return "Create New";
32 }
33
34 @Override
35 protected String getMenuLinkLocator() {
36 return "Main Menu";
37 }
38
39 protected void testSearchEditBack(JiraAwareFailable failable) throws Exception {
40 waitAndClickSearch3();
41 waitForElementPresentByClassName(DATA_TABLES_INFO);
42 String pageBannerText = getText(By.className(DATA_TABLES_INFO));
43 waitAndClickEdit();
44 waitForElementPresentByClassName("uif-headerText-span");
45 back();
46 waitForElementPresentByClassName(DATA_TABLES_INFO);
47 if (!pageBannerText.equals(getText(By.className(DATA_TABLES_INFO)))) {
48 failable.fail("https://jira.kuali.org/browse/KULRICE-9709 Search Edit Back does not show search results in Firefox");
49 }
50 }
51
52 protected void testSearchSearchBack(JiraAwareFailable failable, String fieldName, String searchText) throws Exception {
53 waitAndClickSearch3();
54 waitForElementPresentByClassName(DATA_TABLES_INFO);
55 String pageBannerText = getText(By.className(DATA_TABLES_INFO));
56 waitAndTypeByName(fieldName, searchText);
57 waitAndClickSearch3();
58 waitForElementPresentByClassName(DATA_TABLES_INFO, "Problem with second search");
59 back();
60 acceptAlertIfPresent();
61 waitForElementsPresentByClassName(DATA_TABLES_INFO, "Going back from Search to Search results not available");
62 assertTextPresent("https://jira.kuali.org/browse/KULRICE-9710 Search Search back does not display first search results in Firefox", pageBannerText);
63 }
64 }