001/**
002 * Copyright 2005-2015 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.admin.servicebus;
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 SecurityManagementAft extends WebDriverLegacyITBase {
027
028    /**
029     * AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Security%20Management&channelUrl="+WebDriverUtils
030     * .getBaseUrlString()+"/ksb/JavaSecurityManagement.do";
031     */
032    public static final String BOOKMARK_URL =AutomatedFunctionalTestUtils.PORTAL+"?channelTitle=Security%20Management&channelUrl="+WebDriverUtils
033            .getBaseUrlString()+"/ksb/JavaSecurityManagement.do";
034  
035    @Override
036    protected String getBookmarkUrl() {
037        return BOOKMARK_URL;
038    }
039
040    @Override
041    protected void navigate() throws InterruptedException {
042        waitAndClickAdministration();
043        waitAndClickByLinkText("Security Management");
044    }
045    
046    private void testSecurityManagement() throws Exception{
047        selectFrameIframePortlet();
048        waitAndClickByName("methodToCall.generateClientKeyStore");
049        waitForTextPresent("Alias must have a valid value.");
050        waitForTextPresent("Password must have a valid value in both fields.");
051        String [] assertText={"Alias","Create Date","Type","Actions","rice","Private Key"};
052        assertTextPresent(assertText);
053    }
054    
055    @Test
056    public void testSecurityManagementBookmark() throws Exception {
057        testSecurityManagement();
058        passed();
059    }
060
061    @Test
062    public void testSecurityManagementNav() throws Exception {
063        testSecurityManagement();
064        passed();
065    }
066    
067}