1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.demo.uif.library.widgets;
17
18 import org.junit.Test;
19 import org.kuali.rice.krad.demo.uif.library.LibraryBase;
20 import org.openqa.selenium.By;
21 import org.openqa.selenium.WebElement;
22
23
24
25
26 public class LibraryWidgetsPopoverContentAft extends LibraryBase {
27
28
29
30
31 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-PopoverContentView";
32
33 @Override
34 protected String getBookmarkUrl() {
35 return BOOKMARK_URL;
36 }
37
38 @Override
39 protected void navigate() throws Exception {
40 navigateToLibraryDemo("Widgets", "Popover Content");
41 }
42
43 protected void testWidgetsPopover() throws Exception {
44 waitAndClickByXpath("//section[@id='Demo-PopoverContent-Example1']/button[contains(text(),'Popover Form Action')]");
45 waitAndClickByXpath("//div[@id='Demo-PopoverContent-Group']/button");
46 acceptAlertIfPresent();
47 }
48
49 protected void testWidgetPopoverOptions() throws Exception
50 { waitAndClickByLinkText("Options");
51 waitAndClickByXpath("//section[@id='Demo-PopoverContent-Example2']/button[contains(text(),'Popover Form Action')]");
52 waitAndClickByXpath("//div[@id='Demo-PopoverContent-Group2']/button");
53 acceptAlertIfPresent();
54 }
55
56 private void testAllLightBox() throws Exception {
57 testWidgetsPopover();
58 testWidgetPopoverOptions();
59 passed();
60 }
61
62 @Test
63 public void testWidgetsLightBoxBookmark() throws Exception {
64 testAllLightBox();
65 }
66
67 @Test
68 public void testWidgetsLightBoxNav() throws Exception {
69 testAllLightBox();
70 }
71 }