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.notification;
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   * Created by sona on 10/14/14.
25   */
26  public class AgendaEditorPropositionLabelAft extends WebDriverLegacyITBase{
27          public static final String BOOKMARK_URL =
28                  AutomatedFunctionalTestUtils.PORTAL
29                          + "?channelTitle=Agenda%20Lookup&channelUrl="
30                          + WebDriverUtils.getBaseUrlString()
31                          + AutomatedFunctionalTestUtils.KRAD_LOOKUP_METHOD
32                          + "org.kuali.rice.krms.impl.repository.AgendaBo"
33                          + AutomatedFunctionalTestUtils.SHOW_MAINTENANCE_LINKS
34                          + "&returnLocation="
35                          + AutomatedFunctionalTestUtils.PORTAL_URL
36                          + 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              waitAndClickByLinkText(AGENDA_LOOKUP_LINK_TEXT);
46              waitForPageToLoad();
47          }
48  
49          protected void testAgendaEditorPropositionLabel() throws Exception {
50              selectFrameIframePortlet();
51              waitAndTypeByName("lookupCriteria[name]","My Fabulous Agenda");
52              waitAndClickByXpath("//button[contains(text(),'Search')]");
53              waitAndClickByXpath("//a[contains(text(),'edit')]");
54              selectFrameIframePortlet();
55              waitAndClickByXpath("//a/div[contains(text(),'Rule1: stub rule lorem ipsum')]");
56              waitAndClickByXpath("//button[contains(text(),'Edit Rule')]");
57              selectFrameIframePortlet();
58              waitForTextPresent("Campus Code = BL");
59              selectByName("document.newMaintainableObject.dataObject.agendaItemLine.rule.propositionTree.rootElement.children[0].data.proposition.id","T1000");
60              waitAndClickButtonByExactText("Edit")   ;
61              assertLabelWithTextPresent("Description");
62              assertLabelWithTextPresent("Category");
63              assertLabelWithTextPresent("Term");
64              assertLabelWithTextPresent("Comparison");
65              assertLabelWithTextPresent("Value");
66              passed();
67          }
68  
69  
70          @Test
71          public void testAgendaEditorPropositionLabelNav() throws Exception {
72              testAgendaEditorPropositionLabel();
73          }
74  
75  }