001/**
002 * Copyright 2005-2016 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 org.kuali.rice.krad.labs;
017
018import org.junit.Test;
019import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
020
021/**
022 * Like LabsEnterKey test for this screen, but testing that the UI adds as well.
023 *
024 * @author Kuali Rice Team (rice.collab@kuali.org)
025 */
026public class LabsEntryKeySupportStackedAft extends WebDriverLegacyITBase {
027
028    /**
029     * /kr-krad/labs?viewId=Lab-LayoutTest-EnterKeyStacked
030     */
031    public static final String BOOKMARK_URL = "/kr-krad/labs?viewId=Lab-LayoutTest-EnterKeyStacked";
032  
033    @Override
034    protected String getBookmarkUrl() {
035        return BOOKMARK_URL;
036    }
037
038    @Override
039    protected void navigate() throws Exception {
040        waitAndClickByLinkText("Enter Key Support - Stacked");
041    }
042
043    protected void testDemoEntryKeySupportStacked() throws InterruptedException {
044        waitAndTypeByXpath("//table/tbody/tr/td/div/input","1");
045        waitAndTypeByXpath("//table/tbody/tr[2]/td/div/input","1");
046        waitAndTypeByXpath("//table/tbody/tr[3]/td/div/input","1");
047        waitAndTypeByXpath("//table/tbody/tr[4]/td/div/input","1");
048        waitAndClickButtonByText("Add");
049    }
050
051    @Test
052    public void testDemoEntryKeySupportStackedBookmark() throws Exception {
053        testDemoEntryKeySupportStacked();
054        passed();
055    }
056
057    @Test
058    public void testDemoEntryKeySupportStackedNav() throws Exception {
059        testDemoEntryKeySupportStacked();
060        passed();
061    }
062}