View Javadoc
1   /**
2    * Copyright 2005-2013 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.samplu.krad.compview;
17  
18  import edu.samplu.common.Failable;
19  import edu.samplu.common.ITUtil;
20  import edu.samplu.common.WebDriverLegacyITBase;
21  
22  /**
23   * Tests the Component section in Rice.
24   *
25   * @author Kuali Rice Team (rice.collab@kuali.org)
26   */
27  public abstract class RichMessagesAbstractSmokeTestBase extends WebDriverLegacyITBase {
28  
29      /**
30       * /kr-krad/uicomponents?viewId=RichMessagesView&methodToCall=start
31       */
32      public static final String BOOKMARK_URL = "/kr-krad/uicomponents?viewId=RichMessagesView&methodToCall=start";
33              
34      /**
35       * Nav tests start at {@link edu.samplu.common.ITUtil#PORTAL}.  Bookmark Tests should override and return {@link RichMessagesAbstractSmokeTestBase#BOOKMARK_URL}
36       * {@inheritDoc}
37       * @return
38       */    
39      @Override
40      public String getTestUrl() {
41          return ITUtil.PORTAL;
42      }
43  
44      protected void navigation() throws Exception {
45          waitAndClickKRAD();
46          waitAndClickByXpath("(//a[contains(text(),'Rich Messages')])[2]");
47          switchToWindow(RICH_MESSAGES_WINDOW_TITLE);        
48          checkForIncidentReport(RICH_MESSAGES_WINDOW_TITLE);
49          Thread.sleep(9000);
50      }
51  
52      protected void testRichMessagesNav(Failable failable) throws Exception {
53          navigation();
54          //Verify Basic Functionality Section
55          super.verifyRichMessagesValidationBasicFunctionality();
56                  
57          //Verify Advanced Functionality Section
58          super.verifyRichMessagesValidationAdvancedFunctionality();
59                  
60          //Verify Letters and Numbers Validation
61          super.verifyRichMessagesValidationLettersNumbersValidation();
62                  
63          //Verify Radio and Checkbox groups rich messages Section
64          super.verifyRichMessagesValidationRadioAndCheckBoxGroupFunctionality();
65                  
66          //Verify Link Declarations Section
67          super.verifyRichMessagesValidationLinkDeclarationsFunctionality();
68          passed();
69      }
70  
71      protected void testRichMessagesBookmark(Failable failable) throws Exception {
72          checkForIncidentReport(getTestUrl());
73          Thread.sleep(9000);
74          
75          //Verify Basic Functionality Section
76          super.verifyRichMessagesValidationBasicFunctionality();
77                  
78          //Verify Advanced Functionality Section
79          super.verifyRichMessagesValidationAdvancedFunctionality();
80                  
81          //Verify Letters and Numbers Validation
82          super.verifyRichMessagesValidationLettersNumbersValidation();
83                  
84          //Verify Radio and Checkbox groups rich messages Section
85          super.verifyRichMessagesValidationRadioAndCheckBoxGroupFunctionality();
86                  
87          //Verify Link Declarations Section
88          super.verifyRichMessagesValidationLinkDeclarationsFunctionality();
89          passed();
90      }
91    
92  }