1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.samplu.krad.demo.travel.account.maintenance;
17
18 import org.openqa.selenium.By;
19 import org.openqa.selenium.internal.selenesedriver.SwitchToFrame;
20
21 import edu.samplu.common.Failable;
22 import edu.samplu.common.ITUtil;
23 import edu.samplu.common.WebDriverLegacyITBase;
24
25
26
27
28 public abstract class DemoTravelAccountMaintenanceNewAbstractSmokeTestBase extends WebDriverLegacyITBase {
29
30
31
32
33 public static final String FANCY_BOX_CLOSE_XPATH = "//div[@class='fancybox-item fancybox-close']";
34
35
36
37
38 public static final String FANCY_BOX_IFRAME_XPATH = "//iframe[@class='fancybox-iframe']";
39
40
41
42
43 public static final String BOOKMARK_URL = "/kr-krad/maintenance?methodToCall=start&dataObjectClassName=org.kuali.rice.krad.demo.travel.account.TravelAccount&hideReturnLink=true";
44
45 @Override
46 public String getTestUrl() {
47 return ITUtil.KRAD_PORTAL;
48 }
49
50 protected void navigation() throws Exception {
51 waitAndClickById("Demo-DemoLink", "");
52 waitAndClickByLinkText("Account Maintenance (New)");
53 }
54
55 protected void testTravelAccountMaintenanceNew() throws Exception {
56 waitAndTypeByName("document.documentHeader.documentDescription","Travel Account Maintenance New Test Document");
57 waitAndTypeByName("document.newMaintainableObject.dataObject.number","a1");
58 waitAndClickByXpath("//input[@alt='Direct Inquiry']");
59 waitForElementPresentByXpath("//a[@title='Travel Account ']");
60 waitAndClickByXpath(FANCY_BOX_CLOSE_XPATH);
61 assertTextPresent("Travel Account Maintenance");
62 }
63
64 public void testDemoTravelAccountMaintenanceNewBookmark(Failable failable) throws Exception {
65 testTravelAccountMaintenanceNew();
66 passed();
67 }
68
69 public void testDemoTravelAccountMaintenanceNewNav(Failable failable) throws Exception {
70 navigation();
71 testTravelAccountMaintenanceNew();
72 passed();
73 }
74 }