View Javadoc
1   /**
2    * Copyright 2005-2016 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package edu.sampleu.main;
17  
18  import org.junit.Test;
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  
23  /**
24   * Checks editing propositions.
25   *
26   * @author Kuali Rice Team (rice.collab@kuali.org)
27   */
28  public class AgendaEditorEditPropositionAft extends WebDriverLegacyITBase {
29  
30      public static final String BOOKMARK_URL =
31              AutomatedFunctionalTestUtils.PORTAL
32                      + "?channelTitle=Agenda%20Lookup&channelUrl="
33                      + WebDriverUtils.getBaseUrlString()
34                      + AutomatedFunctionalTestUtils.KRAD_LOOKUP_METHOD
35                      + "org.kuali.rice.krms.impl.repository.AgendaBo"
36                      + AutomatedFunctionalTestUtils.SHOW_MAINTENANCE_LINKS
37                      + "&returnLocation="
38                      + AutomatedFunctionalTestUtils.PORTAL_URL
39                      + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK;
40  
41      @Override
42      protected String getBookmarkUrl() {
43          return BOOKMARK_URL;
44      }
45  
46      @Override
47      protected void navigate() throws Exception {
48          waitAndClickByLinkText(AGENDA_LOOKUP_LINK_TEXT);
49          waitForPageToLoad();
50      }
51  
52      /**
53       * Test that we can submit an already existing agenda with a proposition with no errors.
54       *
55       * @throws Exception for any test problems
56       */
57      protected void testNoEditSubmit() throws Exception {
58          selectFrameIframePortlet();
59  
60          // search for and edit specific record
61          waitAndTypeByName("lookupCriteria[id]", "T1001");
62          waitAndClickButtonByExactText("Search");
63          waitAndClickByLinkText("edit");
64  
65          // make sure we can submit, reload, and that we are then in final status
66          submitSuccessfully();
67          waitAndClickButtonByText("Reload");
68          waitForTextPresent("FINAL");
69      }
70  
71      @Test
72      public void testAgendaEditorEditPropositionNav() throws Exception {
73          testNoEditSubmit();
74          passed();
75      }
76  
77  }