1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.krad.screenelement;
17
18 import org.junit.Test;
19 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
20
21
22
23
24 public class StandardLayoutDemoAft extends WebDriverLegacyITBase {
25
26
27
28
29 public static final String BOOKMARK_URL ="/kr-krad/uicomponents?viewId=Demo-StandardLayout&methodToCall=start";
30
31 @Override
32 protected String getBookmarkUrl() {
33 return BOOKMARK_URL;
34 }
35
36 @Override
37 protected void navigate() throws InterruptedException {
38 waitAndClickKRAD();
39 waitAndClickByLinkText("Standard Layout Demo");
40 switchToWindow("Kuali :: View Title");
41 }
42
43 private void testStandardLayoutDemo() throws Exception{
44
45 waitForElementPresentByXpath("//div[@data-parent='Demo-StandardLayout-Section1']/input[@name='field1']");
46 waitForElementPresentByXpath("//div[@data-parent='Demo-StandardLayout-Section1']/input[@name='field2']");
47 waitForElementPresentByXpath("//section[@id='Demo-StandardLayout-Section2-SubSection1' and @data-parent='Demo-StandardLayout-Section2']");
48 waitForElementPresentByXpath("//section[@id='Demo-StandardLayout-Section2-SubSection2' and @data-parent='Demo-StandardLayout-Section2']");
49 waitForElementPresentByXpath("//div[@data-parent='Demo-StandardLayout-Section3']/input[@name='field8']");
50 waitForElementPresentByXpath("//div[@data-parent='Demo-StandardLayout-Section3']/input[@name='field9']");
51 waitForElementPresentByXpath("//div[@data-parent='Demo-StandardLayout-Section3']/div/input[@name='field10']");
52 waitForElementPresentByXpath("//div[@data-parent='Demo-StandardLayout-Section3']/div/input[@name='field11']");
53 waitForElementPresentByXpath("//section[@id='Demo-StandardLayout-Section3-SubSection1' and @data-parent='Demo-StandardLayout-Section3']");
54
55
56 waitAndClickByName("Demo-StandardLayout-CollectionSectionsPage");
57 waitForElementPresentByXpath("//section[@id='Demo-StandardLayout-CollectionSection1']/section[@class='uif-collectionItem uif-boxCollectionItem uif-collectionAddItem clearfix']");
58 waitForElementPresentByXpath("//section[@id='Demo-StandardLayout-CollectionSection1']/section[@class='uif-collectionItem uif-boxCollectionItem clearfix']");
59 waitForElementPresentByXpath("//section[@id='Demo-StandardLayout-CollectionSection1']/section/table[@class='table table-condensed table-bordered uif-gridLayout uif-table-fixed']");
60 waitForElementPresentByXpath("//div[@data-group='Demo-StandardLayout-CollectionSection2-SubCollection_line0']");
61 waitForElementPresentByXpath("//div[@id='Demo-StandardLayout-Section4']/input[@name='field15']");
62 waitForElementPresentByXpath("//div[@id='Demo-StandardLayout-Section4']/input[@name='field16']");
63 waitForElementPresentByXpath("//section[@id='Demo-StandardLayout-CollectionSubSection' and @data-parent='Demo-StandardLayout-Section4']/section");
64
65
66 waitAndClickByName("Demo-StandardLayout-CssGridPage");
67 waitForElementPresentByXpath("//section[@id='Demo-StandardLayout-CssGridSection1' and @data-parent='Demo-StandardLayout-CssGridPage']");
68 waitForElementPresentByXpath("//section[@id='Demo-StandardLayout-CssGridSection2' and @data-parent='Demo-StandardLayout-CssGridPage']");
69 waitForElementPresentByXpath("//section[@id='Demo-StandardLayout-CssGridSection3' and @data-parent='Demo-StandardLayout-CssGridPage']");
70 }
71
72 @Test
73 public void testStandardLayoutDemoBookmark() throws Exception {
74 testStandardLayoutDemo();
75 passed();
76 }
77
78 @Test
79 public void testStandardLayoutDemoNav() throws Exception {
80 testStandardLayoutDemo();
81 passed();
82 }
83 }