1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.samplu.travel.test;
17
18 import edu.samplu.common.ITUtil;
19 import edu.samplu.common.UpgradedSeleniumITBase;
20 import org.junit.Test;
21
22 import static org.junit.Assert.assertEquals;
23
24
25
26
27
28
29 public class FiscalOfficerInfoMaintenanceNewIT extends UpgradedSeleniumITBase {
30 @Override
31 public String getTestUrl() {
32 return ITUtil.PORTAL;
33 }
34
35 @Test
36 public void testUntitled() throws Exception {
37 waitAndClick("link=KRAD");
38 waitForPageToLoad50000();
39 waitAndClick("//a[@title='FiscalOfficerInfo Maintenance (New)']");
40 waitForPageToLoad50000();
41 selectFrame("iframeportlet");
42
43 checkForIncidentReport("", "https://jira.kuali.org/browse/KULRICE-7723 FiscalOfficerInfoMaintenanceNewIT.testUntitled need a better name and user permission error");
44 String docId = getText("//div[@id='headerarea']/div/table/tbody/tr[1]/td[1]");
45 waitAndType("//input[@name='document.documentHeader.documentDescription']", "New FO Doc");
46 waitAndType("//input[@name='document.newMaintainableObject.dataObject.id']", "5");
47 waitAndType("//input[@name='document.newMaintainableObject.dataObject.userName']", "Jigar");
48
49
50
51
52
53
54
55
56
57
58
59
60 waitAndClick("//button[@value='save']");
61
62 int docIdInt = Integer.valueOf(docId).intValue();
63
64 waitForPageToLoad50000();
65 selectFrame("relative=up");
66 waitAndClick("//img[@alt='action list']");
67 waitForPageToLoad50000();
68 selectFrame("iframeportlet");
69 if(isElementPresent("link=Last")){
70 waitAndClick("link=Last");
71 waitForPageToLoad50000();
72 waitAndClick("link="+docIdInt);
73 } else {
74 waitAndClick("link="+docIdInt);
75 }
76
77 Thread.sleep(5000);
78 String[] windowTitles = getAllWindowTitles();
79 selectWindow(windowTitles[1]);
80 windowFocus();
81 assertEquals(windowTitles[1], getTitle());
82
83
84 selectFrame("relative=up");
85 waitAndClick("//button[@value='submit']");
86 waitForPageToLoad50000();
87 close();
88
89
90
91 selectWindow("null");
92 windowFocus();
93 waitAndClick("//img[@alt='doc search']");
94 waitForPageToLoad50000();
95 assertEquals(windowTitles[0], getTitle());
96 selectFrame("iframeportlet");
97 waitAndClick("//input[@name='methodToCall.search' and @value='search']");
98 waitForPageToLoad50000();
99
100
101
102 assertEquals("FINAL", getText("//table[@id='row']/tbody/tr[1]/td[4]"));
103 selectFrame("relative=up");
104 waitAndClick("link=Main Menu");
105 waitForPageToLoad50000();
106 assertEquals(windowTitles[0], getTitle());
107 System.out.println("---------------------- :: Test complete :: ----------------------");
108
109
110 }
111 }