001/** 002 * Copyright 2005-2014 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package edu.sampleu.krad.screenelement; 017 018import org.junit.Test; 019import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils; 020import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase; 021import org.kuali.rice.testtools.selenium.WebDriverUtils; 022 023/** 024 * @author Kuali Rice Team (rice.collab@kuali.org) 025 */ 026public class RowDetailsAft extends WebDriverLegacyITBase { 027 028 /** 029 * /kr-krad/uicomponents?viewId=Demo-RowDetails&methodToCall=start 030 */ 031 public static final String BOOKMARK_URL ="/kr-krad/uicomponents?viewId=Demo-RowDetails&methodToCall=start"; 032 033 @Override 034 protected String getBookmarkUrl() { 035 return BOOKMARK_URL; 036 } 037 038 @Override 039 protected void navigate() throws InterruptedException { 040 waitAndClickKRAD(); 041 waitAndClickByLinkText("Row Details Demo"); 042 switchToWindow("Kuali :: Row Details Demo"); 043 } 044 045 private void testRowDetails() throws Exception{ 046 waitAndClickByXpath("//a[@id='Demo-RowDetails-Section6_detLink_line0']"); 047 waitForElementPresentByXpath("//input[@name='field4']"); 048 waitAndClickByXpath("//a[@id='Demo-RowDetails-Section1_detLink_line0']"); 049 waitForElementPresentByXpath("//input[@name='list2[0].field4']"); 050 waitAndClickByXpath("//a[@id='Demo-RowDetails-Section2_detLink_line0']"); 051 waitForElementPresentByXpath("//tr/td/div/div[@data-label='Field 3']"); 052 jGrowl("Expand TableCollection inside the details itself SubCollection"); 053 waitAndClickByXpath("//a[@id='Demo-RowDetails-Section3_detLink_line0']"); 054 waitForTextPresent("SubField 2"); 055 waitAndClickByXpath("//a[@id='Demo-RowDetails-Section4_detLink_line0']"); 056 waitForTextPresent("SubCollection Title"); 057 waitAndClickByXpath("//a[@id='Demo-RowDetails-Section5_detLink_line0']"); 058 waitForTextPresent("SubCollection"); 059 waitAndClickByXpath("//a[@id='Demo-RowDetails-Section7_detLink_line0']"); 060 waitForElementPresentByXpath("//table[@class='uif-lightTable']"); 061 } 062 063 @Test 064 public void testRowDetailsBookmark() throws Exception { 065 testRowDetails(); 066 passed(); 067 } 068 069 @Test 070 public void testRowDetailsNav() throws Exception { 071 testRowDetails(); 072 passed(); 073 } 074 075}