View Javadoc

1   /*
2    * Copyright 2011 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/ecl1.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  
17  package edu.samplu.mainmenu.test;
18  
19  import org.junit.Test;
20  import org.openqa.selenium.By;
21  
22  import edu.samplu.common.ITUtil;
23  import edu.samplu.common.WebDriverLegacyITBase;
24  
25  
26  /**
27   * tests whether the Attribute Definition Look UP is working ok 
28   * 
29   * @author Kuali Rice Team (rice.collab@kuali.org)
30   */
31  public class AttributeDefinitionLookUpLegacyIT extends WebDriverLegacyITBase{
32      @Override
33      public String getTestUrl() {
34          return ITUtil.PORTAL;
35      }
36      
37      @Test
38      public void testAttributeDefinitionLookUp() throws Exception {
39          waitAndClickByLinkText("Attribute Definition Lookup");
40          waitForPageToLoad();
41          selectFrame("iframeportlet");
42          waitAndClickByXpath("//button[contains(.,'earch')]");
43          Thread.sleep(3000);
44          waitForPageToLoad();
45          driver.findElement(By.tagName("body")).getText().contains("Actions"); // there are no actions, but the header is the only unique text from searching
46          waitAndClickByLinkText("1000");
47          waitForPageToLoad();
48  
49          driver.findElement(By.tagName("body")).getText().contains("Attribute Inquiry");
50          driver.findElement(By.tagName("body")).getText().contains("KRMS Attributes");
51          driver.findElement(By.tagName("body")).getText().contains("Attribute Label");
52          driver.findElement(By.tagName("body")).getText().contains("1000");
53          driver.findElement(By.tagName("body")).getText().contains("peopleFlowId");
54          driver.findElement(By.tagName("body")).getText().contains("KR-RULE");
55          driver.findElement(By.tagName("body")).getText().contains("PeopleFlow");
56  //        selectFrame("name=fancybox-frame1343151577256"); // TODO parse source to get name
57  //        waitAndClick("css=button:contains(Close)"); // looks lower case, but is upper
58  //        Thread.sleep(500);
59  //        waitAndClick("css=button:contains(cancel)");
60  
61  // AttributeDefinition's don't have actions (yet)
62  //        waitAndClick("id=u80");
63  //        waitForPageToLoad();
64  //        waitAndClick("id=u86");
65  //        waitForPageToLoad();
66  //        selectWindow("null");
67  //        waitAndClick("xpath=(//input[@name='imageField'])[2]");
68  //        waitForPageToLoad();
69          passed();
70      }
71  }