public void estShouldEditAnEnquiry() throws JSONException { Enquiry enquiry = new Enquiry( "CREATEDBY", "Enq2Reportername", new JSONObject("{enquirer_name:Enq2Enquirername}")); EnquiryRepository repository = RapidFtrApplication.getApplicationInstance() .getInjector() .getInstance(EnquiryRepository.class); List<String> updatedEnquirerDetails = asList("Nile"); repository.createOrUpdate(enquiry); enquiry = repository.get(enquiry.getUniqueId()); enquiryPage.navigateToEditPageOf(enquiry.getEnquirerName()); enquiryPage.enterEnquirerDetails(updatedEnquirerDetails); enquiryPage.save(); }
public void testShowEnquiry() throws Exception { String enquiryJSON = "{ " + "\"enquirer_name\":\"Tom Cruise\", " + "\"name\":\"Matthew\"," + String.format("\"created_by\":\"%s\",", application.getCurrentUser().getUserName()) + "\"synced\" : \"false\"}"; Enquiry enquiry = new Enquiry(enquiryJSON); repository.createOrUpdate(enquiry); viewEnquiryPage.navigateToPage(enquiry.getEnquirerName()); viewEnquiryPage.validateData(enquiry); }