1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.main;
17
18 import org.kuali.rice.testtools.common.JiraAwareFailable;
19 import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
20 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
21 import org.kuali.rice.testtools.selenium.WebDriverUtils;
22 import org.junit.Test;
23
24
25
26
27 public class CreateNewAgendaAft extends WebDriverLegacyITBase {
28
29
30
31
32
33
34 public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Create%20New%20Agenda&channelUrl=" + WebDriverUtils
35 .getBaseUrlString() +"/kr-krad/krmsAgendaEditor?methodToCall=start&dataObjectClassName=org.kuali.rice.krms.impl.ui.AgendaEditor&returnLocation=" +
36 AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK;
37
38 @Override
39 protected String getBookmarkUrl() {
40 return BOOKMARK_URL;
41 }
42
43 @Override
44 protected void navigate() throws Exception {
45 waitForTitleToEqualKualiPortalIndex();
46 selectTopFrame();
47 waitAndClickByLinkText("Main Menu","");
48 waitForTitleToEqualKualiPortalIndex();
49 waitAndClickByLinkText("Create New Agenda", "");
50 waitForTitleToEqualKualiPortalIndex("");
51 selectFrameIframePortlet();
52 checkForIncidentReport("Create New Agenda", "");
53 }
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71 protected void createNewEnterDetails() throws InterruptedException {
72 selectFrameIframePortlet();
73 selectByName("document.newMaintainableObject.dataObject.namespace","Kuali Rules Test");
74 waitAndTypeByName("document.newMaintainableObject.dataObject.agenda.name",getDescriptionUnique());
75 waitAndTypeByName("document.newMaintainableObject.dataObject.contextName","Context1");
76 }
77
78 @Test
79 public void testCreateNewAgendaSaveBookmark() throws Exception {
80 createNewEnterDetails();
81 waitAndClickByXpath("//button[contains(text(),'Save')]");
82 passed();
83 }
84
85 @Test
86 public void testCreateNewAgendaSaveNav() throws Exception {
87 createNewEnterDetails();
88 waitAndClickByXpath("//button[contains(text(),'Save')]");
89 passed();
90 }
91
92 @Test
93 public void testCreateNewAgendaSubmitBookmark() throws Exception {
94 createNewEnterDetails();
95 waitAndClickByXpath("//button[contains(text(),'Submit')]");
96 waitAndClickConfirmationOk();
97 passed();
98 }
99
100 @Test
101 public void testCreateNewAgendaSubmitNav() throws Exception {
102 createNewEnterDetails();
103 waitAndClickByXpath("//button[contains(text(),'Submit')]");
104 waitAndClickConfirmationOk();
105 passed();
106 }
107
108 @Test
109 public void testCreateNewAgendaSaveSubmitBookmark() throws Exception {
110 createNewEnterDetails();
111 waitAndClickByXpath("//button[contains(text(),'Save')]");
112 waitAndClickByXpath("//button[contains(text(),'Submit')]");
113 waitAndClickConfirmationOk();
114 passed();
115 }
116
117 @Test
118 public void testCreateNewAgendaSaveSubmitNav() throws Exception {
119 createNewEnterDetails();
120 waitAndClickByXpath("//button[contains(text(),'Save')]");
121 waitAndClickByXpath("//button[contains(text(),'Submit')]");
122 waitAndClickConfirmationOk();
123 passed();
124 }
125
126 public void testCreateNewAgendaBookmark(JiraAwareFailable failable) throws Exception {
127 testCreateNewAgenda();
128 passed();
129 }
130 public void testCreateNewAgendaNav(JiraAwareFailable failable) throws Exception {
131 testCreateNewAgenda();
132 passed();
133 }
134 }