1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.labs.maintenance;
17
18 import org.junit.Test;
19
20
21
22
23 public class LabsMaintenanceSampleBasicAft extends LabsMaintenanceBase {
24
25
26
27
28 public static final String BOOKMARK_URL = "/kr-krad/kradsampleapp?viewId=KradMaintenanceSample-PageR1C1";
29
30 @Override
31 protected String getBookmarkUrl() {
32 return BOOKMARK_URL;
33 }
34
35 @Override
36 protected void navigate() throws Exception {
37 navigateToMaintenance("Maintenance Sample - Basic");
38 }
39
40 protected void testMaintenanceSampleBasicNew() throws InterruptedException {
41 waitAndClickByLinkText("Travel Company Maintenance Sample - Basic New");
42 waitAndTypeByName("document.documentHeader.documentDescription","Test Maintenance Sample Basic Desc");
43 waitAndTypeByName("document.newMaintainableObject.dataObject.travelCompanyName","Kuali");
44 waitAndClickSubmitByText();
45 waitAndClickConfirmationOk();
46 waitForTextPresent(" Document was successfully submitted.");
47 }
48
49 protected void testMaintenanceSampleBasicEdit() throws InterruptedException {
50 waitAndClickByLinkText("Travel Company Maintenance Sample - Basic Edit");
51 waitAndTypeByName("document.documentHeader.documentDescription","Test Maintenance Sample Basic Edit");
52 waitAndTypeByName("document.newMaintainableObject.dataObject.travelCompanyName","Kuali");
53 waitAndClickSubmitByText();
54 waitAndClickConfirmationOk();
55 waitForTextPresent(" Document was successfully submitted.");
56 }
57
58 protected void testMaintenanceSampleBasicCopy() throws InterruptedException {
59 waitAndClickByLinkText("Travel Company Maintenance Sample - Basic Copy");
60 String companyName=getTextByXpath("//div[@data-label='Company Name']");
61 assertElementPresentByXpath("//input[@value='"+companyName+"']");
62 }
63
64 @Test
65 public void testMaintenanceSampleBasicNewBookmark() throws Exception {
66 testMaintenanceSampleBasicNew();
67 passed();
68 }
69
70 @Test
71 public void testMaintenanceSampleBasicNewNav() throws Exception {
72 testMaintenanceSampleBasicNew();
73 passed();
74 }
75
76 @Test
77 public void testMaintenanceSampleBasicEditBookmark() throws Exception {
78 testMaintenanceSampleBasicEdit();
79 passed();
80 }
81
82 @Test
83 public void testMaintenanceSampleBasicEditNav() throws Exception {
84 testMaintenanceSampleBasicEdit();
85 passed();
86 }
87
88 @Test
89 public void testMaintenanceSampleBasicCopyBookmark() throws Exception {
90 testMaintenanceSampleBasicCopy();
91 passed();
92 }
93
94 @Test
95 public void testMaintenanceSampleBasicCopyNav() throws Exception {
96 testMaintenanceSampleBasicCopy();
97 passed();
98 }
99 }