001 /*
002 * Copyright 2005-2013 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 */
016 package org.kuali.rice.krad.demo.uif.library.validation;
017
018 import org.junit.Test;
019 import org.kuali.rice.krad.demo.uif.library.DemoLibraryBase;
020
021 public class DemoValidationSimpleConstraintsRequiredAft extends DemoLibraryBase {
022
023 /**
024 * /kr-krad/kradsampleapp?viewId=Demo-SimpleConstraintView&methodToCall=start
025 */
026 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=Demo-SimpleConstraintView&methodToCall=start";
027
028 /**
029 * //div[@id='Demo-SimpleConstraint-Example1_tab']
030 */
031 public static final String SIMPLE_CONSTRAINT_REQUIRED_TAB = "//div[@id='Demo-SimpleConstraint-Example1_tab']";
032
033 @Override
034 protected String getBookmarkUrl() {
035 return BOOKMARK_URL;
036 }
037
038 @Override
039 protected void navigate() throws Exception {
040 waitAndClickById("Demo-LibraryLink");
041 waitAndClickByLinkText("Validation");
042 waitAndClickByLinkText("Simple Constraints");
043 }
044
045 protected void testRequired() throws Exception {
046 waitAndClickByLinkText("Required");
047 assertIsVisibleByXpath(SIMPLE_CONSTRAINT_REQUIRED_TAB, "Simple Constraint Required Tab");
048 passed();
049 }
050
051 @Test
052 public void testRequiredBookmark() throws Exception {
053 testRequired();
054 }
055
056 @Test
057 public void testRequiredNav() throws Exception {
058 testRequired();
059 }
060 }