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.selenium.AutomatedFunctionalTestUtils;
19 import org.kuali.rice.testtools.selenium.WebDriverUtils;
20
21
22
23
24 public class CreateNewAgendaAftBase extends MainTmplMthdSTNavBase{
25
26
27
28
29
30
31 public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Create%20New%20Agenda&channelUrl=" + WebDriverUtils
32 .getBaseUrlString() +"/kr-krad/krmsAgendaEditor?methodToCall=start&dataObjectClassName=org.kuali.rice.krms.impl.ui.AgendaEditor&returnLocation=" +
33 AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK;
34
35 @Override
36 protected String getBookmarkUrl() {
37 return BOOKMARK_URL;
38 }
39
40
41
42
43
44
45 @Override
46 protected String getLinkLocator() {
47 return "Create New Agenda";
48 }
49
50 protected void testCreateNewAgenda() throws Exception {
51 selectFrameIframePortlet();
52 String desc = getDescriptionUnique();
53 String docId = waitForAgendaDocId();
54 waitAndSelectLabeled("Namespace:", "Kuali Rules Test");
55 waitAndTypeLabeledInput("Name:", desc);
56 fireEvent("document.newMaintainableObject.dataObject.contextName", "focus");
57 waitAndTypeLabeledInput("Context:", "Context1");
58 fireEvent("document.newMaintainableObject.dataObject.contextName", "blur");
59 Thread.sleep(1000);
60
61 fireEvent("document.newMaintainableObject.dataObject.contextName", "focus");
62 Thread.sleep(500);
63 fireEvent("document.newMaintainableObject.dataObject.contextName", "blur");
64 waitForElementPresentByName("document.newMaintainableObject.dataObject.agenda.typeId");
65 waitAndSelectLabeled("Type:", "Campus Agenda");
66 waitForElementPresentByName("document.newMaintainableObject.dataObject.customAttributesMap[Campus]");
67 waitAndTypeLabeledInput("Campus:", "BL");
68 waitAndTypeLabeledInput("label:", "Type label for " + desc);
69 submitSuccessfully();
70 assertDocSearch(docId, "FINAL");
71 }
72 }