1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package edu.sampleu.admin;
17
18 import org.kuali.rice.testtools.selenium.AutomatedFunctionalTestUtils;
19 import org.kuali.rice.testtools.selenium.WebDriverUtils;
20
21
22
23
24 public class WorkFlowDocTypeAft extends AdminTmplMthdAftNavBlanketAppBase {
25
26
27
28
29
30
31 public static final String BOOKMARK_URL = AutomatedFunctionalTestUtils.PORTAL + "?channelTitle=Document%20Type&channelUrl="
32 + WebDriverUtils.getBaseUrlString() + AutomatedFunctionalTestUtils.KNS_LOOKUP_METHOD +
33 "org.kuali.rice.kew.doctype.bo.DocumentType&returnLocation=" +
34 AutomatedFunctionalTestUtils.PORTAL_URL + AutomatedFunctionalTestUtils.HIDE_RETURN_LINK + AutomatedFunctionalTestUtils.DOC_FORM_KEY+ "88888888";
35
36 @Override
37 protected String getBookmarkUrl() {
38 return BOOKMARK_URL;
39 }
40
41
42
43
44
45
46 @Override
47 protected String getLinkLocator() {
48 return "Document Type";
49 }
50
51 @Override
52 protected void createNewEnterDetails() throws InterruptedException {
53 inputDetails();
54 }
55
56 private void inputDetails() throws InterruptedException {
57 waitAndTypeByName("document.documentHeader.documentDescription", getDescriptionUnique());
58 jiraAwareTypeByName("document.newMaintainableObject.name", "name" + uniqueString);
59 waitAndTypeByName("document.newMaintainableObject.unresolvedHelpDefinitionUrl",
60 "${kr.url}/maintenance.do?methodToCall=docHandler");
61 jiraAwareTypeByName("document.newMaintainableObject.label", "label" + uniqueString);
62 jiraAwareTypeByName("document.newMaintainableObject.unresolvedHelpDefinitionUrl",
63 "default.htm?turl=WordDocuments%2Fdocumenttype.htm");
64 }
65
66 @Override
67 protected void createNewLookupDetails() throws InterruptedException {
68 inputDetails();
69
70 String parentDocType = "//input[@name='methodToCall.performLookup.(!!org.kuali.rice.kew.doctype.bo.DocumentType!!).(((name:document.newMaintainableObject.parentDocType.name,documentTypeId:document.newMaintainableObject.docTypeParentId,))).((`document.newMaintainableObject.parentDocType.name:name,`)).((<>)).(([])).((**)).((^^)).((&&)).((//)).((~~)).(::::;"
71 + getBaseUrlString() + "/kr/lookup.do;::::).anchor4']";
72 waitAndClickByXpath(parentDocType);
73 waitAndClickSearch();
74 waitAndClickReturnValue();
75 }
76 }