1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.labs.transactional;
17
18 import org.junit.Test;
19 import org.openqa.selenium.By;
20 import org.openqa.selenium.WebElement;
21
22 import java.util.List;
23
24
25
26
27
28
29 public class LabsLookupTravelAuthorizationDocumentCopyActionAft extends LabsTransactionalBase {
30 public static final String BOOKMARK_URL = "/kr-krad/lookup?methodToCall=start&viewId=TravelAuthorization-LookupView";
31 public static final String COPIED_FROM_DOCUMENT_ID = "3034";
32
33 @Override
34 protected String getBookmarkUrl() {
35 return BOOKMARK_URL;
36 }
37
38 @Override
39 protected void navigate() throws Exception {
40 navigateToTransactional("Transactional Sample - Lookup With Copy Actions");
41 }
42
43 @Test
44 public void testTransactionalLookupAndCopyBookmark() throws Exception {
45 testTransactionalLookupAndCopy();
46 passed();
47 }
48
49 @Test
50 public void testTransactionalLookupAndCopyNav() throws Exception {
51 testTransactionalLookupAndCopy();
52 passed();
53 }
54
55 public void testTransactionalLookupAndCopy() throws Exception {
56 waitAndClickButtonByExactText("Search");
57 waitForElementPresent(By.id("uLookupResults_layout"));
58 jGrowl("Click on 2nd View Link");
59 waitAndClick(By.xpath("(//a[contains(text(),'View')])[2]"));
60 waitForPageToLoad();
61 waitAndClickButtonByExactText("Copy");
62 waitForPageToLoad();
63 waitAndClickByLinkText("Notes and Attachments (1)");
64 }
65
66 public String getCopiedFromDocumentId() {
67 return COPIED_FROM_DOCUMENT_ID;
68 }
69 }