[Ignore] // TODO decide if we should move this test to an API level / integration level test in another solution public void FCIntegration_ApplicantData_Sent_to_FC() { // page objects var applicantProfile = new ApplicantProfilePages(_driver); var hireWizard = new HireWizardPage(_driver); // api setup const int orgId = 20014; var startDateTime = DateTime.UtcNow; try //Contains Contents of Test { // Finish the wizard hireWizard.ClickNext(); _test.Log(LogStatus.Info, "Click 'Next'"); hireWizard.ConfirmationPage.ClickFinish(); _test.Log(LogStatus.Info, "Click 'Finish'"); // wait for the data to be transferred Thread.Sleep(TimeSpan.FromSeconds(20)); var parameters = new Dictionary <string, object> { { "filter[fullName]", _applicantData.RealName }, { "sort[CreatedUtc]", "ASC" }, { "include", "PhoneNumbers,Emails,Addresses" } }; var employeeApiContent = ApiHelpers.GetOrgEmployees(orgId, parameters); // name Assert.AreEqual(_applicantData.FirstName, (string)employeeApiContent["data"][0]["attributes"]["firstName"], "The first name was not transferred correctly"); Assert.AreEqual(_applicantData.LastName, (string)employeeApiContent["data"][0]["attributes"]["lastName"], "The last name was not transferred correctly"); _test.Log(LogStatus.Pass, "The applicants first and last name were transferred"); // email Assert.AreEqual(_applicantData.Email, (string)employeeApiContent["included"][0]["attributes"]["emailAddress"], "The email was not transferred correctly"); Assert.AreEqual(true, (bool)employeeApiContent["included"][0]["attributes"]["isPrimary"], "The email was not marked as primary"); _test.Log(LogStatus.Pass, "The applicants email address was transferred and marked as primary"); // phone Assert.AreEqual(_applicantData.Address.DaytimePhone, (string)employeeApiContent["included"][2]["attributes"]["number"], "The phone number was not transferred correctly"); Assert.AreEqual(true, (bool)employeeApiContent["included"][2]["attributes"]["isPrimary"], "The phone number was not marked as primary"); _test.Log(LogStatus.Pass, "The applicants phone number was transferred and marked as primary"); // address Assert.AreEqual(true, (bool)employeeApiContent["included"][1]["attributes"]["isPrimary"], "The address was not marked as primary"); Assert.AreEqual(_applicantData.Address.NumberAndStreet, (string)employeeApiContent["included"][1]["attributes"]["street1"], "The address was not transferred correctly"); Assert.AreEqual(_applicantData.Address.AptNumber, (string)employeeApiContent["included"][1]["attributes"]["street2"], "The apartment number/street2 was not transferred correctly"); Assert.AreEqual(_applicantData.Address.City, (string)employeeApiContent["included"][1]["attributes"]["city"], "The city was not transferred correctly"); Assert.AreEqual(_applicantData.Address.State, (string)employeeApiContent["included"][1]["attributes"]["state"], "The state was not transferred correctly"); Assert.AreEqual(_applicantData.Address.Zip, (string)employeeApiContent["included"][1]["attributes"]["zip"], "The zip code was not transferred correctly"); _test.Log(LogStatus.Pass, "The applicants address was transferred and marked as primary"); // cleanup - delete applicant from FC var toDate = startDateTime.AddHours(1); // set employee to terminated by changing 'statusId' to 2 var employeeStatus = new { data = new { attributes = new { statusId = 2, from = startDateTime.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"), to = toDate.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"), statusChangeReason = "for deletion", statusChangeReasonId = "" } } }; var newStatus = ApiHelpers.PostEmployeeStatus((string)employeeApiContent["data"][0]["id"], JsonConvert.SerializeObject(employeeStatus)); ApiHelpers.DeleteEmployee((string)employeeApiContent["data"][0]["id"], (int)newStatus["data"]["attributes"]["ownerVersionNumber"]); } catch (Exception e) //On Error Do { HandleException(e, _driver); throw; } }