1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.demo.travel.account;
17
18 import org.junit.Ignore;
19 import org.kuali.rice.testtools.selenium.WebDriverLegacyITBase;
20 import org.junit.Test;
21
22
23
24
25 public class DemoTravelAccountBulkUpdateEditAft extends WebDriverLegacyITBase {
26
27
28
29
30 public static final String BOOKMARK_URL = "/kr-krad/maintenance?viewTypeName=MAINTENANCE&methodToCall=start&docTypeName=TravelAccountBulkUpdateMaintenanceDocument";
31
32
33
34
35 public static final String SEARCH = "Search";
36
37 @Override
38 public String getBookmarkUrl() {
39 return BOOKMARK_URL;
40 }
41
42 public void navigate() throws Exception {
43 waitAndClickDemoLink();
44 waitAndClickByLinkText("Travel Account Bulk Update (Edit)");
45 }
46
47 protected void testTravelAccountBulkUpdateEdit() throws Exception {
48 waitAndTypeByName("document.documentHeader.documentDescription","Dummy Description");
49 waitAndClickByXpath("//input[@name='document.newMaintainableObject.dataObject.updateFieldValues[accountTypeCode]' and @value='IAT']");
50 waitAndClickByXpath("//div[@data-label='Travel Account Number']/div/div/button");
51 gotoLightBox();
52 waitAndTypeLabeledInput("Travel Account Number:", "a*");
53 waitAndClickButtonByExactText(SEARCH);
54 String assertContent [] = {"a11","EAT - Expense","a12","EAT - Expense","a13","CAT - Clearing"};
55 assertTextPresent(assertContent);
56 waitAndClickByXpath("//button[contains(text(),'Close')]");
57 selectTopFrame();
58 waitAndTypeByXpath("//div[@data-label='Travel Account Number']/div/input","a11");
59 waitAndClickByXpath("//button[contains(text(),'Add')]");
60 waitAndTypeByXpath("//div[@data-label='Travel Account Number']/div/input","a13");
61 waitAndClickByXpath("//button[contains(text(),'Add')]");
62 waitAndClickByXpath("//button[contains(text(),'Submit')]");
63 waitAndClickConfirmSubmitOk();
64 }
65
66 @Test
67 public void testTravelAccountBulkUpdateEditNav() throws Exception {
68 testTravelAccountBulkUpdateEdit();
69 passed();
70 }
71
72 @Test
73 @Ignore("https://jira.kuali.org/browse/KULRICE-13357 AFT Failures Dialogs on CI")
74 public void testTravelAccountBulkUpdateEditBookmark() throws Exception {
75 testTravelAccountBulkUpdateEdit();
76 passed();
77 }
78 }