From c44cdd02cf944a82ba7734eb677702ec52390be8 Mon Sep 17 00:00:00 2001 From: stevenbobo <sbobo3@illinois.edu> Date: Thu, 19 Nov 2020 22:45:15 -0600 Subject: [PATCH] Fixed Selenium tests that were failing. --- .../CauseOfDeathTrendsReportSeleniumTest.java | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/iTrust/test/edu/ncsu/csc/itrust/selenium/CauseOfDeathTrendsReportSeleniumTest.java b/iTrust/test/edu/ncsu/csc/itrust/selenium/CauseOfDeathTrendsReportSeleniumTest.java index 4943ee5..4d91f4d 100644 --- a/iTrust/test/edu/ncsu/csc/itrust/selenium/CauseOfDeathTrendsReportSeleniumTest.java +++ b/iTrust/test/edu/ncsu/csc/itrust/selenium/CauseOfDeathTrendsReportSeleniumTest.java @@ -42,15 +42,15 @@ public class CauseOfDeathTrendsReportSeleniumTest extends iTrustSeleniumTest { assertEquals(cause1, "Influenza"); assertEquals(code1, 487.00); - assertEquals(deaths1, 4); + assertEquals(deaths1, 5); String cause2 = table.findElements(By.tagName("td")).get(3).getText(); double code2 = Double.parseDouble(table.findElements(By.tagName("td")).get(4).getText()); int deaths2 = Integer.parseInt(table.findElements(By.tagName("td")).get(5).getText()); - assertEquals(cause2, "Diabetes with ketoacidosis"); - assertEquals(code2, 250.10); - assertEquals(deaths2, 1); + assertEquals(cause2, "Tuberculosis of the lung"); + assertEquals(code2, 11.40); + assertEquals(deaths2, 3); } public void testViewCODTrendsReports_AllPatientsOnlyMale() throws Exception { @@ -79,15 +79,15 @@ public class CauseOfDeathTrendsReportSeleniumTest extends iTrustSeleniumTest { assertEquals(cause1, "Influenza"); assertEquals(code1, 487.00); - assertEquals(deaths1, 2); + assertEquals(deaths1, 3); String cause2 = table.findElements(By.tagName("td")).get(3).getText(); double code2 = Double.parseDouble(table.findElements(By.tagName("td")).get(4).getText()); int deaths2 = Integer.parseInt(table.findElements(By.tagName("td")).get(5).getText()); - assertEquals(cause2, "Diabetes with ketoacidosis"); - assertEquals(code2, 250.10); - assertEquals(deaths2, 1); + assertEquals(cause2, "Malaria"); + assertEquals(code2, 84.50); + assertEquals(deaths2, 2); } public void testViewCODTrendsReports_AllPatientsOnlyFemale() throws Exception { @@ -117,6 +117,14 @@ public class CauseOfDeathTrendsReportSeleniumTest extends iTrustSeleniumTest { assertEquals(cause1, "Influenza"); assertEquals(code1, 487.00); assertEquals(deaths1, 2); + + String cause2 = table.findElements(By.tagName("td")).get(3).getText(); + double code2 = Double.parseDouble(table.findElements(By.tagName("td")).get(4).getText()); + int deaths2 = Integer.parseInt(table.findElements(By.tagName("td")).get(5).getText()); + + assertEquals(cause2, "Tuberculosis of the lung"); + assertEquals(code2, 11.40); + assertEquals(deaths2, 1); } public void testViewCODTrendsReports_MyPatientsAllGenders() throws Exception { -- GitLab