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 edu.sampleu.main.notification; 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 ChannelSubscriptionAft extends WebDriverLegacyITBase { 027 028 /** 029 * AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Channel%20Subscriptions&channelUrl=" + WebDriverUtils 030 * .getBaseUrlString() + "/ken/DisplayUserPreferences.form"; 031 */ 032 public static final String BOOKMARK_URL = 033 AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Channel%20Subscriptions&channelUrl=" + WebDriverUtils 034 .getBaseUrlString() + "/ken/DisplayUserPreferences.form"; 035 036 @Override 037 protected String getBookmarkUrl() { 038 return BOOKMARK_URL; 039 } 040 041 @Override 042 protected void navigate() throws InterruptedException { 043 waitAndClickByLinkText("Channel Subscriptions"); 044 } 045 046 private void testChannelSubscription() throws Exception{ 047 selectFrameIframePortlet(); 048 waitAndClickByXpath("//a[@href='SubscribeToChannel.form?channelid=4']"); 049 waitAndClickByXpath("//a[@href='UnsubscribeFromChannel.form?channelid=4']"); 050 } 051 052 @Test 053 public void testChannelSubscriptionBookmark() throws Exception { 054 testChannelSubscription(); 055 passed(); 056 } 057 058 @Test 059 public void testChannelSubscriptionNav() throws Exception { 060 testChannelSubscription(); 061 passed(); 062 } 063 064}