View Javadoc
1   /**
2    * Copyright 2005-2015 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.krad.labs;
17  
18  import java.io.File;
19  import java.util.List;
20  import org.junit.Test;
21  import org.kuali.rice.testtools.selenium.WebDriverFileResourceAftBase;
22  import org.openqa.selenium.By;
23  
24  /**
25   * @author Kuali Rice Team (rice.collab@kuali.org)
26   */
27  public class LabsMultiFileUploadBasic1Aft extends WebDriverFileResourceAftBase {
28  
29      /**
30       * /kr-krad/labs?viewId=Lab-MultiFileUpload1
31       */
32      public static final String BOOKMARK_URL = "/kr-krad/labs?viewId=Lab-MultiFileUpload1";
33      
34      // values set by default for repeatable testing; left as configurable for load tests
35      protected List<File> fileUploadList;
36      
37      @Override
38      protected String getBookmarkUrl() {
39          return BOOKMARK_URL;
40      }
41  
42      @Override
43      protected void navigate() throws Exception {
44      	waitAndClickByLinkText("MultiFile Upload - Basic");
45      }
46  
47      protected void testMultiFileUploadBasic1() throws Exception {
48      	fileUploadSetUp();
49      	fileIngesterByName("files");
50          waitForElementVisibleBy(By.linkText("test.txt"));
51          waitForElementVisibleBy(By.linkText("test1.txt"));
52      }
53      
54      private void fileUploadSetUp() throws Exception {
55      	setUpResourceDir("general");
56      }
57      
58      @Test
59      public void testMultiFileUploadBasic1Bookmark() throws Exception {
60      	testMultiFileUploadBasic1();
61          passed();
62      }
63  
64      @Test
65      public void testMultiFileUploadBasic1Nav() throws Exception {
66      	testMultiFileUploadBasic1();
67          passed();
68      }
69  }