Skip to content

Commit

Permalink
#7443 added locators and methods for Dashboard Contacs page, added te…
Browse files Browse the repository at this point in the history
…st to Validate Contacts Dashboard layout
  • Loading branch information
popadriangeo committed Oct 10, 2022
1 parent 8d2219d commit 5fa4618
Show file tree
Hide file tree
Showing 3 changed files with 388 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,79 +38,113 @@ public class ContactsDashboardPage {
public static final By ALL_CONTACTS_COUNTER =
By.xpath("//div[text()='All Contacts']/parent::div/following-sibling::div//child::div");
public static final By UNDER_FOLLOWUP_COUNTER =
By.cssSelector("//div[text()='Under Follow-up']/parent::div/following-sibling::div//child::div");
By.xpath("//div[text()='Under Follow-up']/parent::div/following-sibling::div//child::div");
public static final By STOPPED_FOLLOWUP_COUNTER =
By.cssSelector("//div[text()='Stopped Follow-up']/parent::div/following-sibling::div//child::div");
By.xpath("//div[text()='Stopped Follow-up']/parent::div/following-sibling::div//child::div");
public static final By VISITS_COUNTER =
By.cssSelector("//div[text()='Visits']/parent::div/following-sibling::div//child::div");
By.xpath("//div[text()='Visits']/parent::div/following-sibling::div//child::div");
public static final By UNCONFIRMED_CONTACT_COUNTER =
By.cssSelector("//div[text()='Unconfirmed contact']/parent::div/preceding-sibling::div");
By.xpath("//div[text()='Unconfirmed contact']/parent::div/preceding-sibling::div");
public static final By CONFIRMED_CONTACT_COUNTER =
By.cssSelector("//div[text()='Confirmed contact']/parent::div/preceding-sibling::div");
By.xpath("//div[text()='Confirmed contact']/parent::div/preceding-sibling::div");
public static final By NOT_A_CONTACT_COUNTER =
By.cssSelector("//div[text()='Not a contact']/parent::div/preceding-sibling::div");
By.xpath("//div[text()='Not a contact']/parent::div/preceding-sibling::div");
public static final By NEW_COUNTER =
By.cssSelector("//div[text()='New']/parent::div/preceding-sibling::div");
By.xpath("//div[text()='New']/parent::div/preceding-sibling::div");
public static final By SYMPTOMATIC_COUNTER =
By.cssSelector("//div[text()='Symptomatic']/parent::div/preceding-sibling::div");
By.xpath("//div[text()='Symptomatic']/parent::div/preceding-sibling::div");
public static final By COOPERATIVE_COUNTER =
By.cssSelector("//div[text()='Cooperative']/parent::div/preceding-sibling::div");
By.xpath("//div[text()='Cooperative']/parent::div/preceding-sibling::div");
public static final By UNCOOPERATIVE_COUNTER =
By.cssSelector("//div[text()='Uncooperative']/parent::div/preceding-sibling::div");
By.xpath("//div[text()='Uncooperative']/parent::div/preceding-sibling::div");
public static final By UNAVAILABLE_COUNTER =
By.cssSelector("//div[text()='Unavailable']/parent::div/preceding-sibling::div");
By.xpath("//div[text()='Unavailable']/parent::div/preceding-sibling::div");
public static final By NEVER_VISITED_COUNTER =
By.cssSelector("//div[text()='Never visited']/parent::div/preceding-sibling::div");
By.xpath("//div[text()='Never visited']/parent::div/preceding-sibling::div");
public static final By COMPLETED_FOLLOW_UP_COUNTER =
By.cssSelector("//div[text()='Completed follow-up']/parent::div/following-sibling::div[2]");
By.xpath("//div[text()='Completed follow-up']/parent::div/following-sibling::div[2]");
public static final By CANCELLED_FOLLOW_UP_COUNTER =
By.cssSelector("//div[text()='Canceled follow-up']/parent::div/following-sibling::div[2]");
By.xpath("//div[text()='Canceled follow-up']/parent::div/following-sibling::div[2]");
public static final By LOST_TO_FOLLOW_UP_COUNTER =
By.cssSelector("//div[text()='Lost to follow-up']/parent::div/following-sibling::div[2]");
By.xpath("//div[text()='Lost to follow-up']/parent::div/following-sibling::div[2]");
public static final By CONVERTED_TO_CASE_COUNTER =
By.cssSelector("//div[text()='Converted to case']/parent::div/following-sibling::div[2]");
By.xpath("//div[text()='Converted to case']/parent::div/following-sibling::div[2]");
public static final By UNAVAILABLE_VISITS_COUNTER =
By.cssSelector("//div[text()='Unavailable']/parent::div/following-sibling::div[1]");
By.xpath("//div[text()='Unavailable']/parent::div/following-sibling::div[1]");
public static final By UNCOOPERATIVE_VISITS_COUNTER =
By.cssSelector("//div[text()='Uncooperative']/parent::div/following-sibling::div[1]");
By.xpath("//div[text()='Uncooperative']/parent::div/following-sibling::div[1]");
public static final By COOPERATIVE_VISITS_COUNTER =
By.cssSelector("//div[text()='Cooperative']/parent::div/following-sibling::div[1]");
By.xpath("//div[text()='Cooperative']/parent::div/following-sibling::div[1]");
public static final By MISSED_VISITS_COUNTER =
By.cssSelector("//div[text()='Missed']/parent::div/following-sibling::div[1]");
By.xpath("//div[text()='Missed']/parent::div/following-sibling::div[1]");
public static final By CONTACTS_COVID19_COUNTER =
By.xpath("//div[contains(text(),'COVID-19')]/parent::div/following-sibling::div[4]/div");
public static final By CONTACTS_CHOLERA_COUNTER =
By.xpath("//div[contains(text(),'Cholera')]/parent::div/following-sibling::div[4]/div");
public static final By CONTACTS_CONGENITAL_RUBELLA_COUNTER =
By.xpath("//div[contains(text(),'Congenital Rubella')]/parent::div/following-sibling::div[4]/div");
By.xpath(
"//div[contains(text(),'Congenital Rubella')]/parent::div/following-sibling::div[4]/div");
public static final By CONTACTS_EBOLA_VIRUS_DISEASE_COUNTER =
By.xpath("//div[contains(text(),'Ebola Virus Disease')]/parent::div/following-sibling::div[4]/div");
By.xpath(
"//div[contains(text(),'Ebola Virus Disease')]/parent::div/following-sibling::div[4]/div");
public static final By CONTACTS_LASSA_COUNTER =
By.xpath("//div[contains(text(),'Lassa')]/parent::div/following-sibling::div[4]/div");
public static final By CONTACTS_MONKEYPOX_COUNTER =
By.xpath("//div[contains(text(),'Monkeypox')]/parent::div/following-sibling::div[4]/div");
public static final By CONTACTS_INFLUENZA_NEW_SUBTYPE_COUNTER =
By.xpath("//div[contains(text(),'Influenza (New subtype)')]/parent::div/following-sibling::div[4]/div");
By.xpath(
"//div[contains(text(),'Influenza (New subtype)')]/parent::div/following-sibling::div[4]/div");
public static final By CONTACTS_PLAGUE_COUNTER =
By.xpath("//div[contains(text(),'Plague')]/parent::div/following-sibling::div[4]/div");
public static final By CONTACTS_UNSPECIFIED_WHF_COUNTER =
By.xpath("//div[contains(text(),'Unspecified VHF')]/parent::div/following-sibling::div[4]/div");
By.xpath(
"//div[contains(text(),'Unspecified VHF')]/parent::div/following-sibling::div[4]/div");
public static final By CONTACTS_HUMAN_RABIES_COUNTER =
By.xpath("//div[contains(text(),'Human Rabies')]/parent::div/following-sibling::div[4]/div");
public static final By CONTACTS_OTHER_EPIDEMIC_DISEASE_COUNTER =
By.xpath("//div[contains(text(),'Other Epidemic Disease')]/parent::div/following-sibling::div[4]/div");
By.xpath(
"//div[contains(text(),'Other Epidemic Disease')]/parent::div/following-sibling::div[4]/div");
public static final By CONTACTS_NOT_YET_DEFINED_COUNTER =
By.xpath("//div[contains(text(),'Not Yet Defined')]/parent::div/following-sibling::div[4]/div");
By.xpath(
"//div[contains(text(),'Not Yet Defined')]/parent::div/following-sibling::div[4]/div");
public static final By CONTACTS_PER_CASE_MIN_COUNTER =
By.xpath("//div[contains(text(),'Contacts per Case')]/parent::div/following-sibling::div[1]");
public static final By CONTACTS_PER_CASE_MAX_COUNTER =
By.xpath("//div[contains(text(),'Contacts per Case')]/parent::div/following-sibling::div[2]");
public static final By CONTACTS_PER_CASE_AVERAGE_COUNTER =
By.xpath("//div[contains(text(),'Contacts per Case')]/parent::div/following-sibling::div[3]");
public static final By CONTACTS_IN_QUARANTINE_COUNTER =
By.xpath("//div[contains(text(),'Contacts in Quarantine')]/parent::div/following-sibling::div");
By.xpath(
"//div[contains(text(),'Contacts in Quarantine')]/parent::div/following-sibling::div");
public static final By CONTACTS_PLACED_IN_QUARANTINE_COUNTER =
By.xpath("//div[contains(text(),'Contacts placed in Quarantine')]/parent::div/following-sibling::div");
By.xpath(
"//div[contains(text(),'Contacts placed in Quarantine')]/parent::div/following-sibling::div");
public static final By CONTACTS_NEW_CASES_NOT_PREVIOUSLY_KNOWN_TO_BE_CONTACTS_COUNTER =
By.xpath("//div[contains(text(),'New Cases not Previously Known to Be Contacts')]/parent::div/following-sibling::div");
By.xpath(
"//div[contains(text(),'New Cases not Previously Known to Be Contacts')]/parent::div/following-sibling::div");
public static final By FOLLOWUP_STATUS_CHART_UNDER_FU = By.xpath("//*[text()='Under F/U']");
public static final By FOLLOWUP_STATUS_CHART_LOST_TO_FU = By.xpath("//*[text()='Lost To F/U']");
public static final By FOLLOWUP_STATUS_CHART_COMPLETED_FU =
By.xpath("//*[text()='Completed F/U']");
public static final By FOLLOWUP_STATUS_CHART_CANCELED_FU = By.xpath("//*[text()='Canceled F/U']");

public static final By CHART_CONTEXT_MENU = By.cssSelector("[class='highcharts-button-symbol']");
public static final By PRINT_CHART_OPTION = By.xpath("//li[text()='Print chart']");
public static final By DOWNLOAD_PNG_IMAGE_OPTION = By.xpath("//li[text()='Download PNG image']");
public static final By DOWNLOAD_JPEG_IMAGE_OPTION =
By.xpath("//li[text()='Download JPEG image']");
public static final By DOWNLOAD_PDF_DOCUMENT_OPTION =
By.xpath("//li[text()='Download PDF document']");
public static final By DOWNLOAD_SVG_VECTOR_IMAGE_OPTION =
By.xpath("//li[text()='Download SVG vector image']");
public static final By DOWNLOAD_CSV_OPTION = By.xpath("//li[text()='Download CSV']");
public static final By DOWNLOAD_XLS_OPTION = By.xpath("//li[text()='Download XLS']");
public static final By ENLARGE_FOLLOWUP_STATUS_CHART_BUTTON = By.id("expandEpiCurve");
public static final By COLLAPSE_FOLLOWUP_STATUS_CHART_BUTTON = By.id("collapseEpiCurve");
public static final By EXPAND_MAP_BUTTON = By.id("expandMap");
public static final By COLLAPSE_MAP_BUTTON = By.id("collapseMap");
public static final By DASHBOARD_GROUPING_DROPDOWN = By.id("dashboardGrouping");
public static final By DASHBOARD_DATA_DROPDOWN = By.id("dashboardGrouping");
public static final By DASHBOARD_MAP_KEYS = By.id("dashboardMapKey");
public static final By DASHBOARD_MAP_LAYERS = By.id("dashboardMapLayers");
}
Loading

0 comments on commit 5fa4618

Please sign in to comment.