1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.samplu.krad.library.containers;
17
18 import org.junit.Test;
19
20 import org.kuali.rice.testtools.selenium.Failable;
21 import org.kuali.rice.testtools.selenium.ITUtil;
22 import org.kuali.rice.testtools.selenium.SmokeTestBase;
23 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
24
25
26
27
28 public class DemoLibraryContainerAccordionSmokeTest extends SmokeTestBase {
29
30
31
32
33 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-AccordionGroup-View&methodToCall=start";
34
35 @Override
36 protected String getBookmarkUrl() {
37 return BOOKMARK_URL;
38 }
39
40 @Override
41 protected void navigate() throws Exception {
42 waitAndClickById("Demo-LibraryLink", "");
43 waitAndClickByLinkText("Containers");
44 waitAndClickByLinkText("Accordion Group");
45 }
46
47 protected void testLibraryContainerAccordion() throws Exception {
48 waitAndClickByLinkText("Accordion Item 1");
49 assertElementPresentByXpath("//div[@id='Demo-AccordionGroup-SubList1' and @style='display: block;']");
50 waitAndClickByLinkText("Accordion Item 1");
51 assertElementPresentByXpath("//div[@id='Demo-AccordionGroup-SubList1' and @style='display: none;']");
52 waitAndClickByLinkText("Accordion Item 2");
53 assertElementPresentByXpath("//div[@id='Demo-AccordionGroup-SubList2' and @style='display: block;']");
54 waitAndClickByLinkText("Accordion Item 2");
55 assertElementPresentByXpath("//div[@id='Demo-AccordionGroup-SubList2' and @style='display: none;']");
56
57 }
58
59 @Test
60 public void testContainerAccordionBookmark() throws Exception {
61 testLibraryContainerAccordion();
62 passed();
63 }
64
65 @Test
66 public void testContainerAccordionNav() throws Exception {
67 testLibraryContainerAccordion();
68 passed();
69 }
70 }