Пример #1
0
    def check_progress_bar_tooltip_is_found(self, section, expected_legend):
        """
        Validates the progress bar tool tip displayed on mouse over over the progress bar in comparing populations report
        :param expected_legend: list of lists of each ALD section. Expected data format for math/ela_progress bar:
        [[bar section index(int type), bar section background hexadecimal color code(string type with preceding #), section % (string type)]]
        :type expected_legend: list
        :param section: section where you need to validate the progress bar
        :type section: string
        """
        element_to_click = browser().find_element_by_class_name("ui-jqgrid-ftable").find_element_by_class_name(
            "progress").find_element_by_class_name("bar")
        hover_mouse = ActionChains(browser()).move_to_element(element_to_click)
        hover_mouse.perform()
        wait_for(lambda driver: driver.find_element_by_class_name("popover"))

        popover_legend = browser().find_element_by_class_name("popover-content").find_elements_by_tag_name("li")
        for each in expected_legend:
            save_screen('/tmp/screenshot_tooltip.png')
            rgb_color = self.get_rgb_equivalent(each[1])
            self.assertIn(rgb_color, str(popover_legend[each[0]].find_element_by_tag_name("div").get_attribute(
                "style"))), "Tooltip legend color does not match."
            time.sleep(3)
            self.assertEqual(each[2], str(popover_legend[each[0]].text)), "Tooltip legend score and % does not match."
        temp = browser().find_element_by_class_name("ui-jqgrid-ftable").find_element_by_class_name("summaryTitle")
        hover_mouse_out = ActionChains(browser()).move_to_element(temp)
        hover_mouse_out.perform()
Пример #2
0
 def select_academic_year_los_language(self, num_yrs, reminder_text, selection):
     """
     Select an option from the "Other Academic Years" section
     """
     dropdown = browser().find_element_by_class_name("asmtDropdown")
     dropdown.find_element_by_tag_name("button").click()
     # self.assertEqual("OTHER ACADEMIC YEARS", str(dropdown.find_element_by_class_name("asmtDropdownMenu").find_element_by_class_name('otherAcadmicYears').text), "OTHER ACADEMIC YEARS section not found in the dropdown")
     all_academic_year_options = dropdown.find_element_by_class_name("asmtDropdownMenu").find_elements_by_class_name(
         'asmtYearButton')
     self.assertEqual(num_yrs, len(all_academic_year_options), "Number of academic years do not match")
     found = False
     for each in all_academic_year_options:
         if selection == str(each.find_element_by_class_name("asmtTypeText").text):
             found = True
             element_to_click = each
             break
     if found is False:
         self.assertTrue(False, "Error in find the academic year for selection.")
     element_to_click.click()
     if selection == '2014 - 2015':
         # reminder_text = "You are viewing a previous academic year. Return to 2015 - 2016."
         # wait_for(lambda driver: browser().find_element_by_class_name("reminderMessage"))
         wait_for(expected_conditions.visibility_of_element_located((By.CLASS_NAME, "reminderMessage")))
         self.assertIn(reminder_text, browser().find_element_by_class_name("reminderMessage").text,
                       "Reminder text incorrectly displayed.")
         print("Switched to academic year 2015")
     elif selection == '2015 - 2016':
         wait_for(expected_conditions.invisibility_of_element_located((By.CLASS_NAME, "reminderMessage")))
Пример #3
0
 def select_iep_filter(self, filter_popup, selection,
                       not_stated_percentage):
     """
     Validates the IEP filter dropdown options and selects the desired filter.
     :param filter_popup: Filter popup window
     :type filter_popup: Webdriver element
     :param selection: list of strings where each string is the filter selection. Can select one or more filtering options.
     :type selection: list
     :param not_stated_percentage: Not stated percentage text for the IEP filter
     :type not_stated_percentage: string
     """
     iep_filter = self.get_filter_dropdown(filter_popup, "iep")
     wait_for(
         lambda driver: iep_filter.find_element_by_class_name("display"))
     self.assertEqual(
         "IEP",
         str(
             iep_filter.find_element_by_class_name("display").get_attribute(
                 "innerHTML")),
         "IEP filter static text incorrectly displayed.")
     expected_iep_options = [
         'Yes', 'No', 'Not Stated',
         "*IEP categorization does not include students with a GIEP (i.e., 'gifted' students)",
         not_stated_percentage
     ]
     self.check_filter_dropdown_menu(iep_filter, expected_iep_options)
     self.select_desired_filter(filter_popup, iep_filter, selection)
Пример #4
0
    def select_tab_los_view(self, examtype, tabname):
        if examtype == "Summative":
            if tabname == "Mathematics":
                headers = ["Students", "Mathematics Overall", "Status", "Concepts & Procedures",
                           "Problem Solving and Modeling & Data Analysis", "Communicating Reasoning"]
            elif tabname == "ELA/Literacy":
                headers = ["Students", "ELA/Literacy Overall", "Status", "Reading", "Writing", "Listening",
                           "Research & Inquiry"]
            elif tabname == "Overview":
                headers = ["Students", "Mathematics Overall", "Status", "ELA/Literacy Overall", "Status"]
        elif examtype == "Interim Comprehensive":
            if tabname == "Mathematics":
                headers = ["Students", "Date taken", "Mathematics Overall", "Status", "Concepts & Procedures",
                           "Problem Solving and Modeling & Data Analysis", "Communicating Reasoning"]
            elif tabname == "ELA/Literacy":
                headers = ["Students", "Date taken", "ELA/Literacy Overall", "Status", "Reading", "Writing",
                           "Listening", "Research & Inquiry"]
            elif tabname == "Overview":
                headers = ["Students", "Most Recent Mathematics", "Mathematics Overall", "Status",
                           "Most Recent ELA/Literacy", "ELA/Literacy Overall", "Status"]

        wait_for(expected_conditions.visibility_of_element_located((By.CLASS_NAME, "detailsItem")))
        los_views = browser().find_element_by_class_name("detailsItem").find_elements_by_tag_name("button")
        view_dict = {}
        for each in los_views:
            view_dict[each.text] = each
        self.assertEqual(3, len(view_dict), "3 LOS views not found")
        view_dict[tabname].click()
        time.sleep(5)

        self.check_subject_headers(headers)
Пример #5
0
 def select_lep_filter(self, filter_popup, selection,
                       not_stated_percentage):
     """
     Validates the LEP filter dropdown options and selects the desired filter.
     :param filter_popup: Filter popup window
     :type filter_popup: Webdriver element
     :param selection: list of strings where each string is the filter selection. Can select one or more filtering options.
     :type selection: list
     :param not_stated_percentage: Not stated percentage text for the LEP filter
     :type not_stated_percentage: string
     """
     lep_filter = self.get_filter_dropdown(filter_popup, "lep")
     wait_for(
         lambda driver: lep_filter.find_element_by_class_name("display"))
     self.assertEqual(
         "Limited English Proficient (LEP)*",
         str(
             lep_filter.find_element_by_class_name("display").get_attribute(
                 "innerHTML")),
         "LEP filter static text incorrectly displayed.")
     expected_lep_options = [
         'Yes', 'No', 'Not Stated',
         '*This category includes English Language Learners(ELL) if your state identifies students as ELL',
         not_stated_percentage
     ]
     self.check_filter_dropdown_menu(lep_filter, expected_lep_options)
     self.select_desired_filter(filter_popup, lep_filter, selection)
Пример #6
0
 def test_state_map_page(self):
     url = self.get_url() + "/assets/public/landing.html"
     browser().get(url)
     headerLoginBtn = browser().find_element_by_id("header").find_element_by_class_name(
         "action").find_element_by_class_name("btn-login")
     self.assertIsNotNone(headerLoginBtn, "Content body should contain a login button")
     headerLoginBtn.click()
     wait_for(lambda driver: driver.find_element_by_id("IDToken1"))
     self.enter_login_credentials("cdegraw", "cdegraw1234")
     self.check_redirected_requested_page("state_selection_map")
     self.assertEqual(str(browser().find_element_by_id("titleString").text),
                      "Select state to start exploring Smarter Balanced test results",
                      "State selection page title not found")
     self.check_breadcrumb_hierarchy_links([])
     self.check_headers("Clinton Degraw", "Log Out")
     all_states = browser().find_element_by_id("map").find_elements_by_tag_name("rect")
     ca_element = None
     ca_attribute_rect_x = "765.6"
     for each in all_states:
         if each.get_attribute("x") == ca_attribute_rect_x:
             ca_element = each
             break
     ca_element.click()
     self.check_redirected_requested_page("state_view_sds")
     self.check_breadcrumb_hierarchy_links(['Home', 'North Carolina'])
Пример #7
0
 def open_filter_menu(self):
     """
     Verifies that the filter option is available and clicks on it to open the filtering menu
     :return filter_popup: returns the filter popup window back to the calling method
     :type filter_popup: webdriver element
     """
     self.assertEqual(
         "Filter",
         str(browser().find_element_by_id(
             "actionBar").find_element_by_class_name("filterItem").
             find_element_by_class_name("filterLabel").text),
         "Filter label not found on the actions bar")
     try:
         browser().find_element_by_id(
             "actionBar").find_element_by_class_name("filterItem").click()
         wait_for(lambda driver: driver.find_element_by_id("content").
                  find_element_by_class_name("filter"))
         self.assertEqual(
             "Student Filters",
             str(browser().find_element_by_class_name(
                 "filter").find_element_by_class_name("section").text),
             "Student Filters label not displayed on the filter popup.")
         time.sleep(5)
         filter_popup = browser().find_element_by_class_name("filter")
         return filter_popup
     except:
         self.assertTrue(False, "Error in opening the filter menu.")
Пример #8
0
 def select_504_filter(self, filter_popup, selection,
                       not_stated_percentage):
     """
     Validates the 504 filter dropdown options and selects the desired filter.
     :param filter_popup: Filter popup window
     :type filter_popup: Webdriver element
     :param selection: list of strings where each string is the filter selection. Can select one or more filtering options.
     :type selection: list
     :param not_stated_percentage: Not stated percentage text for the 504 filter
     :type not_stated_percentage: string
     """
     disability_filter = self.get_filter_dropdown(filter_popup, "504")
     wait_for(lambda driver: disability_filter.find_element_by_class_name(
         "display"))
     self.assertEqual(
         "504",
         str(
             disability_filter.find_element_by_class_name(
                 "display").get_attribute("innerHTML")),
         "504 filter static text incorrectly displayed.")
     expected_504_options = [
         'Yes', 'No', 'Not Stated', not_stated_percentage
     ]
     self.check_filter_dropdown_menu(disability_filter,
                                     expected_504_options)
     self.select_desired_filter(filter_popup, disability_filter, selection)
Пример #9
0
 def select_ethnicity_filter(self, filter_popup, selection,
                             not_stated_percentage):
     """
     Validates the ethnicity filter dropdown options and selects the desired filter.
     :param filter_popup: Filter popup window
     :type filter_popup: Webdriver element
     :param selection: list of strings where each string is the filter selection. Can select one or more filtering options.
     :type selection: list
     :param not_stated_percentage: Not stated percentage text for the ethnicity filter
     :type not_stated_percentage: string
     """
     ethnicity_filter = self.get_filter_dropdown(filter_popup, "ethnicity")
     wait_for(lambda driver: ethnicity_filter.find_element_by_class_name(
         "display"))
     self.assertEqual(
         "Race/Ethnicity",
         str(
             ethnicity_filter.find_element_by_class_name(
                 "display").get_attribute("innerHTML")),
         "Ethnicity filter static text incorrectly displayed.")
     expected_eth_options = [
         'Hispanic/Latino of any race', 'American Indian or Alaska Native*',
         'Asian*', 'Black or African American*',
         'Native Hawaiian or Pacific Islander*', 'White*',
         'Two or more races*', 'Not Stated', '*Not Hispanic or Latino',
         not_stated_percentage
     ]
     self.check_filter_dropdown_menu(ethnicity_filter, expected_eth_options)
     self.select_desired_filter(filter_popup, ethnicity_filter, selection)
Пример #10
0
 def check_print_popover_contents(self, print_popover, pdf_type):
     self.assertEqual(
         str(
             print_popover.find_element_by_id("myModalLabel").get_attribute(
                 "innerHTML")), "Print",
         "Pdf print popup header incorrectly displayed")
     print_option = print_popover.find_element_by_class_name(
         "modal-body").find_elements_by_tag_name("input")
     wait_for(
         expected_conditions.element_to_be_clickable(
             (By.XPATH, "//div[@id='PrintModal']//input[@name='print']")))
     wait_for(
         expected_conditions.element_to_be_clickable(
             (By.XPATH, "//div[@id='PrintModal']//button")))
     if pdf_type == "grayscale":
         option = print_option[0]
     elif pdf_type == "color":
         option = print_option[1]
     else:
         raise Exception("incorrect pdf color specified")
     option.click()
     save_screen('/tmp/pdf_debug.png')
     print_button = print_popover.find_element_by_class_name(
         "modal-footer").find_element_by_class_name("btn")
     print_button.click()
Пример #11
0
    def check_cpop_report_info(self):
        """
        Validates the Report Info text displayed on the mouseover overlay in comparing populations report
        """
        element_to_click = browser().find_element_by_id("infoBar").find_element_by_class_name("reportInfoIcon")
        hover_mouse = ActionChains(browser()).move_to_element(element_to_click)
        hover_mouse.perform()
        wait_for(expected_conditions.visibility_of_element_located((By.CLASS_NAME, "reportInfoPopover")))

        popover_content = browser().find_element_by_class_name("reportInfoPopover").find_element_by_class_name(
            "popover-content")
        # Validate the section headers in the report info layover
        report_info_sections = popover_content.find_elements_by_tag_name("h4")
        self.assertEqual("Purpose:", report_info_sections[0].text,
                         "Purpose section not displayed in the Report info popover")
        self.assertEqual("Uses:", report_info_sections[1].text, "Uses section not displayed in the Report info popover")
        self.assertEqual("Features:", report_info_sections[2].text,
                         "Features section not displayed in the Report info popover")
        # Validate the contents of the report info sections
        self.assertIn("his report compares large aggregations of students across organizational boundaries.",
                      popover_content.text, "Purpose description incorrectly displayed in Report Info popover.")
        self.assertIn("Use this view to compare summary performance of a large aggregation", popover_content.text,
                      "Uses description incorrectly displayed in report info popover")
        self.assertIn("Keep in mind that the number of students assessed is an important part of any analysis.",
                      popover_content.text, "Uses description incorrectly displayed in report info popover")
        self.assertIn(
            "Achievement Level proportion bars can be either commonly aligned or centered on the Level 3 cut-score.",
            popover_content.text, "Features info incorrectly displayed in the report info popover.")
        self.assertIn("Sort aggregations by any column", popover_content.text,
                      "Features info incorrectly displayed in the report info popover.")
        self.assertIn("Filter aggregations by student attributes", popover_content.text,
                      "Features info incorrectly displayed in the report info popover.")
        # Close the mouseover
        browser().find_element_by_id('user-settings').click()
        browser().implicitly_wait(1)
Пример #12
0
 def test_state_map_invalid_login(self):
     url = self.get_url() + "/assets/public/landing.html"
     browser().get(url)
     browser().find_element_by_id("content").find_element_by_class_name("intro").find_element_by_class_name(
         "btn-login").click()
     wait_for(lambda driver: driver.find_element_by_id("IDToken1"))
     self.enter_login_credentials("shall", "shall1234")
     self.check_redirected_requested_page("state_view_sds")
Пример #13
0
 def validate_iab_disclaimer(self, grade):
     """
     Validates the IAB disclaimer message.
     """
     wait_for(expected_conditions.visibility_of_element_located((By.CLASS_NAME, "IABMessage")))
     message = str(browser().find_element_by_class_name("IABMessage").text)
     iab_text = "The results below are " + grade + " Interim Assessment Blocks administered during the selected academic year."
     self.assertIn(iab_text, message, "IAB Reminder text incorrectly displayed.")
Пример #14
0
 def select_completeness_filter(self, filter_popup, selection):
     completeness_filter = self.get_filter_dropdown(filter_popup, "completeness")
     wait_for(lambda driver: completeness_filter.find_element_by_class_name("display"))
     self.assertEqual("Completeness",
                      str(completeness_filter.find_element_by_class_name("display").get_attribute("innerHTML")),
                      "Completeness filter static text incorrectly displayed.")
     expected_validity_options = ['Complete', 'Incomplete', '']
     self.check_filter_dropdown_menu(completeness_filter, expected_validity_options)
     self.select_desired_filter(filter_popup, completeness_filter, selection)
Пример #15
0
 def select_validity_filter(self, filter_popup, selection):
     validity_filter = self.get_filter_dropdown(filter_popup, "validity")
     wait_for(lambda driver: validity_filter.find_element_by_class_name("display"))
     self.assertEqual("Validity",
                      str(validity_filter.find_element_by_class_name("display").get_attribute("innerHTML")),
                      "Validity filter static text incorrectly displayed.")
     expected_validity_options = ['Valid', 'Invalid', '']
     self.check_filter_dropdown_menu(validity_filter, expected_validity_options)
     self.select_desired_filter(filter_popup, validity_filter, selection)
Пример #16
0
 def check_iab_column_headers(self, expected_cols):
     wait_for(expected_conditions.visibility_of_element_located((By.CLASS_NAME, "detailsItem")))
     grid_heading_element = browser().find_element_by_class_name("ui-jqgrid-htable").find_element_by_class_name(
         "jqg-second-row-header")
     grid_heading = grid_heading_element.get_attribute('textContent')
     expected_text = ''.join(str(each) for each in expected_cols)
     self.assertEqual(expected_text, grid_heading, "The grid headings are not listed")
     # grid_headers = [elem.text for elem in browser().find_elements_by_css_selector(".ui-jqgrid-htable .jqg-second-row-header th[role='columnheader'] div") if elem.text]
     # self.assertEqual(len(expected_cols), len(grid_headers), "Invalid number of IAB columns found.")
     save_screen('/tmp/check_iab_column_headers.png')
Пример #17
0
 def test_multiple_opp_gray_pdf(self):
     self.select_ica()
     self.select_los_view("Overview")
     self.drill_down_navigation("jqg84", "overallScoreSection")
     browser().find_element_by_class_name("printLabel").click()
     wait_for(expected_conditions.visibility_of_element_located((By.CLASS_NAME, "modal-backdrop")))
     print_popup = browser().find_element_by_id("PrintModal")
     self.check_print_popover_contents(print_popup, "grayscale")
     file_path = full_reports_path + "/72d8248d-0e8f-404b-8763-a5b7bcdaf535.20141213.en.g.pdf"
     self._check_pdf_file(file_path, 'PDF: Grayscale pdf test was failed')
Пример #18
0
    def check_overall_filtered_count(self, math_total_students,
                                     math_unfiltered_text, ela_total_students,
                                     ela_unfiltered_text):
        """
        Validates the filtered count and filtered/unfiltered text in the overall row.
        :param math_total_students: Filtered Math student count
        :type math_total_students: string
        :param math_unfiltered_text: unfiltered text
        :type math_unfiltered_text: string
        :param ela_total_students: Filtered ELA student count
        :type ela_total_students: string
        :param ela_unfiltered_text: unfiltered text
        :type ela_unfiltered_text: string
        """
        math_static_text = math_unfiltered_text.rsplit(' ', 1)[0]
        ela_static_text = ela_unfiltered_text.rsplit(' ', 1)[0]
        wait_for(
            expected_conditions.invisibility_of_element_located(
                (By.CLASS_NAME, "loader")))
        wait_for(lambda driver: driver.find_element_by_class_name(
            "unfilteredTotal"))

        overall_summary_sections = browser().find_element_by_class_name(
            "ui-jqgrid-ftable").find_elements_by_tag_name("td")
        self.assertIn(
            math_total_students,
            str(overall_summary_sections[2].find_element_by_class_name(
                "studentsTotal").text)
        ), "Total # of students for Math assessment incorrectly displayed as {%s}" % format(
            overall_summary_sections[1].text)
        self.assertIn(
            math_static_text,
            str(overall_summary_sections[2].find_element_by_class_name(
                "unfilteredTotal").text)
        ), "Unfiltered count text incorrectly displayed."
        self.assertIn(
            "students",
            str(overall_summary_sections[2].find_element_by_class_name(
                "unfilteredTotal").find_element_by_class_name("studentText").
                text)), "Unfiltered count text incorrectly displayed."

        self.assertIn(
            ela_total_students, str(overall_summary_sections[4].text)
        ), "Total # of students for ELA assessment incorrectly displayed as {%s}" % format(
            overall_summary_sections[2].text)
        self.assertIn(
            ela_static_text,
            str(overall_summary_sections[4].find_element_by_class_name(
                "unfilteredTotal").text)
        ), "Unfiltered count text incorrectly displayed."
        self.assertIn(
            "students",
            str(overall_summary_sections[4].find_element_by_class_name(
                "unfilteredTotal").find_element_by_class_name("studentText").
                text)), "Unfiltered count text incorrectly displayed."
Пример #19
0
 def check_filter_bar(self, expected_filters):
     actual_filters = []
     try:
         wait_for(lambda driver: driver.find_element_by_class_name("selectedFilter_panel"))
     except:
         self.assertTrue(False, "Error in viewing the selected filters bar.")
     selected_panels = browser().find_element_by_class_name("selectedFilter_panel").find_elements_by_class_name(
         "selectedFilterGroup")
     for each in selected_panels:
         actual_filters.append(str(each.text))
     self.assertEqual(expected_filters, actual_filters, "Selected filters incorrectly displayed on the bar.")
Пример #20
0
 def test_forgot_password(self):
     save_message('TC: Validate the \'Forgot password\' feature and redirect to the login page '
                  'from the forgot password page')
     self.open_requested_page_redirects_login_page("individual_student_report")
     browser().find_element_by_class_name("controls").find_element_by_link_text("Forgot Password?").click()
     wait_for(lambda driver: driver.find_element_by_id("content"))
     forgot_password_page_msg = browser().find_element_by_id("content").text
     expected_msg = "If you have forgotten your username or password, please send an email to the System Administrator, and be sure to include your username in the body of the email. You should receive a response within 2 business days."
     self.assertIn(expected_msg, forgot_password_page_msg), "Forgot password page displaying incorrect text"
     browser().find_element_by_link_text("Return to login page").click();
     wait_for(lambda driver: driver.find_element_by_id("IDToken1"), message="Error in redirecting to the login page")
Пример #21
0
 def select_los_view_iab(self, selection, headers):
     """
     Select the IAB subject view in LOS
     """
     wait_for(expected_conditions.visibility_of_element_located((By.CLASS_NAME, "detailsItem")))
     los_views = browser().find_element_by_class_name("detailsItem").find_elements_by_tag_name("button")
     view_dict = {}
     for each in los_views:
         view_dict[each.text] = each
     self.assertEqual(2, len(view_dict), "2 LOS views not found")
     view_dict[selection].click()
     self.check_subject_headers(headers)
Пример #22
0
 def test_multiple_opp_gray_pdf(self):
     self.select_ica()
     self.select_los_view("Overview")
     self.drill_down_navigation("jqg84", "overallScoreSection")
     browser().find_element_by_class_name("printLabel").click()
     wait_for(
         expected_conditions.visibility_of_element_located(
             (By.CLASS_NAME, "modal-backdrop")))
     print_popup = browser().find_element_by_id("PrintModal")
     self.check_print_popover_contents(print_popup, "grayscale")
     file_path = full_reports_path + "/72d8248d-0e8f-404b-8763-a5b7bcdaf535.20141213.en.g.pdf"
     self._check_pdf_file(file_path, 'PDF: Grayscale pdf test was failed')
Пример #23
0
    def check_los_report_info(self):
        """
        Validates the Report Info text displayed on the mouseover overlay in LOS report
        """
        element_to_click = browser().find_element_by_id("infoBar").find_element_by_class_name("reportInfoIcon")
        hover_mouse = ActionChains(browser()).move_to_element(element_to_click)
        hover_mouse.perform()
        wait_for(lambda driver: driver.find_element_by_class_name("reportInfoPopover"))
        popover_content = browser().find_element_by_class_name("reportInfoPopover").find_element_by_class_name(
            "popover-content")
        # Validate the headers
        report_info_headers = popover_content.find_elements_by_tag_name("h4")
        self.assertEqual("Purpose:", str(report_info_headers[0].text),
                         "Purpose header not found in report info pop over")
        self.assertEqual("Uses:", str(report_info_headers[1].text), "Uses header not found in report info pop over")
        self.assertEqual("Features:", str(report_info_headers[2].text),
                         "Features: header not found in report info pop over")
        # Validate the purpose description
        purpose_desc = "This report presents a list of individual student scores for a selected assessment."
        self.assertEqual(purpose_desc, str(popover_content.find_element_by_tag_name("p").text),
                         "Purpose section description incorrectly displayed")

        bullet_point_sections = popover_content.find_elements_by_tag_name("ul")

        use_bullet_points = bullet_point_sections[0].find_elements_by_tag_name("li")
        use1 = "Use this report to view the assessment results for a class or other sub-group of students, filtered or sorted for your specific needs."
        use2 = "Review scale scores and error bands for overall student performance on a specific assessment."
        use3 = "View claim score icons to understand students’ performance for each claim."
        self.assertEqual(use1, str(use_bullet_points[0].text), "First use bullet point not found.")
        self.assertEqual(use2, str(use_bullet_points[1].text), "Second use bullet point not found.")
        self.assertEqual(use3, (use_bullet_points[2].text), "Third use bullet point not found.")

        features_bullet_points = bullet_point_sections[1].find_elements_by_tag_name("li")
        self.assertEqual("Select assessment and content area(s) to view", str(features_bullet_points[0].text),
                         "First features bullet point not found.")
        self.assertEqual("Sort results by any column", str(features_bullet_points[1].text),
                         "Second features bullet point not found.")
        self.assertEqual("Select specific students to focus your review", str(features_bullet_points[2].text),
                         "Third features bullet point not found.")
        self.assertEqual("Search for particular students", str(features_bullet_points[3].text),
                         "Fourth features bullet point not found.")
        self.assertEqual("Filter students by attributes (e.g., Gender, IEP, Race/Ethnicity)",
                         str(features_bullet_points[4].text), "Fifth features bullet point not found.")
        self.assertEqual("Download student assessment results for further analysis",
                         str(features_bullet_points[5].text), "Sixth features bullet point not found.")
        self.assertEqual("Print Individual Student Reports (PDF) for a selected group of students",
                         str(features_bullet_points[6].text), "Seventh features bullet point not found.")

        # Close the mouseover
        browser().find_element_by_id('user-settings').click()
        browser().implicitly_wait(1)
Пример #24
0
    def select_language(self, language):
        if language == 'en':
            xpath = "//*[@id='languageSelector']/div[2]/li[1]/input"  # English Language selection
        elif language == "es":
            xpath = "//*[@id='languageSelector']/div[2]/li[2]/input"  # Spanish Language selection
        elif language == "vi":
            xpath = "//*[@id='languageSelector']/div[2]/li[3]/input"  # Vietnamess Language selection
        else:
            xpath = None
            print("Please provide valid Language option")

        browser().find_element_by_id("user-settings").click()
        browser().find_element_by_xpath(xpath).click()
        wait_for(lambda driver: driver.find_element_by_id("username"))
Пример #25
0
 def select_validity_filter(self, filter_popup, selection):
     validity_filter = self.get_filter_dropdown(filter_popup, "validity")
     wait_for(lambda driver: validity_filter.find_element_by_class_name(
         "display"))
     self.assertEqual(
         "Validity",
         str(
             validity_filter.find_element_by_class_name(
                 "display").get_attribute("innerHTML")),
         "Validity filter static text incorrectly displayed.")
     expected_validity_options = ['Valid', 'Invalid', '']
     self.check_filter_dropdown_menu(validity_filter,
                                     expected_validity_options)
     self.select_desired_filter(filter_popup, validity_filter, selection)
Пример #26
0
 def check_filter_bar(self, expected_filters):
     actual_filters = []
     try:
         wait_for(lambda driver: driver.find_element_by_class_name(
             "selectedFilter_panel"))
     except:
         self.assertTrue(False,
                         "Error in viewing the selected filters bar.")
     selected_panels = browser().find_element_by_class_name(
         "selectedFilter_panel").find_elements_by_class_name(
             "selectedFilterGroup")
     for each in selected_panels:
         actual_filters.append(str(each.text))
     self.assertEqual(expected_filters, actual_filters,
                      "Selected filters incorrectly displayed on the bar.")
Пример #27
0
 def select_grouping_filter(self, filter_popup, selection, expected_grouping_options):
     """
     Validates the Student Group filter dropdown options and selects the desired filter.
     :param filter_popup: Filter popup window
     :type filter_popup: Webdriver element
     :param selection: list of strings where each string is the filter selection. Can select one or more filtering options.
     :type selection: list
     """
     grouping_filter = self.get_filter_dropdown(filter_popup, "grouping")
     wait_for(lambda driver: grouping_filter.find_element_by_class_name("display"))
     self.assertEqual("Student Group",
                      str(grouping_filter.find_element_by_class_name("display").get_attribute("innerHTML")),
                      "Student Group 1 filter static text incorrectly displayed.")
     self.check_filter_dropdown_menu(grouping_filter, expected_grouping_options)
     self.select_desired_filter(filter_popup, grouping_filter, selection)
Пример #28
0
 def test_ethnicity_filter(self):
     self.drill_down_navigation("228", "ui-jqgrid-ftable")
     self.drill_down_navigation("242", "ui-jqgrid-ftable")
     filter_popup = self.open_filter_menu()
     self.select_ethnicity_filter(filter_popup, ["Asian*"], '9% reported "not stated"')
     self.close_filter_menu(filter_popup, "apply")
     self.check_overall_filtered_count("4", "Out of 35 students", "4", "Out of 35 students")
     self.check_filter_bar(["Race/Ethnicity: Asian"])
     browser().find_element_by_link_text("North Carolina").click()
     try:
         wait_for(expected_conditions.visibility_of_element_located((By.CLASS_NAME, "ui-jqgrid-view")))
     except:
         save_screen('/tmp/screenshot.png')
     self.check_filter_bar(["Race/Ethnicity: Asian"])
     self.check_overall_filtered_count("11", "Out of 89 students", "8", "Out of 77 students")
Пример #29
0
 def select_migrant_filter(self, filter_popup, selection):
     """
     Validates the Migrant status filter dropdown options and selects the desired filter.
     :param filter_popup: Filter popup window
     :type filter_popup: Webdriver element
     :param selection: list of strings where each string is the filter selection. Can select one or more filtering options.
     :type selection: list
     """
     migrant_status_filter = self.get_filter_dropdown(filter_popup, "mig")
     wait_for(lambda driver: migrant_status_filter.find_element_by_class_name("display"))
     self.assertEqual("Migrant Status",
                      str(migrant_status_filter.find_element_by_class_name("display").get_attribute("innerHTML")),
                      "Migrant Status filter static text incorrectly displayed.")
     expected_mig_options = ['Yes', 'No', 'Not Stated', '']
     self.check_filter_dropdown_menu(migrant_status_filter, expected_mig_options)
     self.select_desired_filter(filter_popup, migrant_status_filter, selection)
Пример #30
0
 def select_gender_filter(self, filter_popup, selection):
     """
     Validates the gender filter dropdown options and selects the desired filter.
     :param filter_popup: Filter popup window
     :type filter_popup: Webdriver element
     :param selection: list of strings where each string is the filter selection. Can select one or more filtering options.
     :type selection: list
     :type not_stated_percentage: string
     """
     gender_filter = self.get_filter_dropdown(filter_popup, "sex")
     wait_for(lambda driver: gender_filter.find_element_by_class_name("display"))
     self.assertEqual("Gender", str(gender_filter.find_element_by_class_name("display").get_attribute("innerHTML")),
                      "Gender filter static text incorrectly displayed.")
     expected_gender_options = ['Male', 'Female', 'Not Stated', '']
     self.check_filter_dropdown_menu(gender_filter, expected_gender_options)
     self.select_desired_filter(filter_popup, gender_filter, selection)
Пример #31
0
 def select_completeness_filter(self, filter_popup, selection):
     completeness_filter = self.get_filter_dropdown(filter_popup,
                                                    "completeness")
     wait_for(lambda driver: completeness_filter.find_element_by_class_name(
         "display"))
     self.assertEqual(
         "Completeness",
         str(
             completeness_filter.find_element_by_class_name(
                 "display").get_attribute("innerHTML")),
         "Completeness filter static text incorrectly displayed.")
     expected_validity_options = ['Complete', 'Incomplete', '']
     self.check_filter_dropdown_menu(completeness_filter,
                                     expected_validity_options)
     self.select_desired_filter(filter_popup, completeness_filter,
                                selection)
Пример #32
0
 def test_logout(self):
     save_message('TC: Validate logout functionality.')
     self.open_requested_page_redirects_login_page("state_view_sds")
     self.enter_login_credentials("eseinfeld", "eseinfeld1234")
     self.check_redirected_requested_page("state_view_sds")
     header_bar = browser().find_element_by_id("header")
     header_bar.find_element_by_id('user-settings').click()
     browser().implicitly_wait(1)
     logout = header_bar.find_element_by_id("log_out_button")
     logout.click()
     try:
         alert = browser().switch_to_alert()
         alert.accept()
         wait_for(lambda driver: driver.find_element_by_id("IDToken1"))
     except:
         wait_for(lambda driver: driver.find_element_by_id("IDToken1"))
         print("No security alert found.")
Пример #33
0
 def select_504_filter(self, filter_popup, selection, not_stated_percentage):
     """
     Validates the 504 filter dropdown options and selects the desired filter.
     :param filter_popup: Filter popup window
     :type filter_popup: Webdriver element
     :param selection: list of strings where each string is the filter selection. Can select one or more filtering options.
     :type selection: list
     :param not_stated_percentage: Not stated percentage text for the 504 filter
     :type not_stated_percentage: string
     """
     disability_filter = self.get_filter_dropdown(filter_popup, "504")
     wait_for(lambda driver: disability_filter.find_element_by_class_name("display"))
     self.assertEqual("504", str(disability_filter.find_element_by_class_name("display").get_attribute("innerHTML")),
                      "504 filter static text incorrectly displayed.")
     expected_504_options = ['Yes', 'No', 'Not Stated', not_stated_percentage]
     self.check_filter_dropdown_menu(disability_filter, expected_504_options)
     self.select_desired_filter(filter_popup, disability_filter, selection)
Пример #34
0
 def check_print_popover_contents(self, print_popover, pdf_type):
     self.assertEqual(str(print_popover.find_element_by_id("myModalLabel").get_attribute("innerHTML")), "Print",
                      "Pdf print popup header incorrectly displayed")
     print_option = print_popover.find_element_by_class_name("modal-body").find_elements_by_tag_name("input")
     wait_for(
         expected_conditions.element_to_be_clickable((By.XPATH, "//div[@id='PrintModal']//input[@name='print']")))
     wait_for(expected_conditions.element_to_be_clickable((By.XPATH, "//div[@id='PrintModal']//button")))
     if pdf_type == "grayscale":
         option = print_option[0]
     elif pdf_type == "color":
         option = print_option[1]
     else:
         raise Exception("incorrect pdf color specified")
     option.click()
     save_screen('/tmp/pdf_debug.png')
     print_button = print_popover.find_element_by_class_name("modal-footer").find_element_by_class_name("btn")
     print_button.click()
Пример #35
0
    def check_overall_score_tooltip(self, student_name, subject, popup_header, claim_score, ald_name, error_band):
        # Find the student row in the grid
        student_row = self.find_student_row(student_name)
        element_to_mouseover = student_row.find_element_by_class_name("asmtScore")
        loc = element_to_mouseover.location
        script = "window.scrollTo(%s, %s);" % (loc['x'], loc['y'])
        browser().execute_script(script)
        hover_mouse = ActionChains(browser()).move_to_element(element_to_mouseover)
        hover_mouse.click().perform()

        ## Validate the pop up header
        wait_for(expected_conditions.visibility_of_element_located((By.CLASS_NAME, "losPopover")))
        self.assertEqual(popup_header, str(
            browser().find_element_by_class_name("popover-inner").find_element_by_class_name(
                "popover-title").text)), "Claim tooltip header incorrectly displayed"
        ## Validate the Overall Score title
        assert ("Overall Score" in str(
            browser().find_element_by_class_name("popover-inner").find_element_by_class_name(
                "summary").find_element_by_class_name(
                "title").text)), "Overall Score title not displayed n the tooltip summary"
        ## Validate the claim score displayed in the header
        assert (claim_score in str(
            browser().find_element_by_class_name("popover-inner").find_element_by_class_name(
                "summary").find_element_by_class_name(
                "score").text)), "Claim Score incorrectly displayed on the tooltip summary"
        ## Validate the ALD Level Name
        assert (ald_name in str(browser().find_element_by_class_name("popover-inner").find_element_by_class_name(
            "summary").find_element_by_class_name(
            "description").text)), "ALD Name incorrectly displayed on the tooltip summary"
        ## Validate the claim score displayed on the progress bar
        assert (claim_score in str(
            browser().find_element_by_class_name("popover-inner").find_element_by_class_name(
                "losPerfBar").find_element_by_class_name(
                "scoreWrapper").text)), "Claim score incorrectly displayed on the tooltip progress bar"
        ## Validate the cut points on the progress bar
        expected_cutpoints = [1200, 1400, 1800, 2100, 2400]
        actual_cutpoints = []
        for each in browser().find_element_by_class_name("popover-inner").find_element_by_class_name(
                "losPerfBar").find_elements_by_class_name("cutPoints"):
            actual_cutpoints.append(int(each.text))
        self.assertEqual(actual_cutpoints,
                         expected_cutpoints), "Incorrect cut points displayed on the tooltip progress bar."
        ## Validate the Error Band displayed on the tooltip
        assert (error_band in str(
            browser().find_element_by_class_name("popover-inner").find_element_by_class_name(
                "errorBand").text)), "Error Band incorrectly displayed on the tooltip"
Пример #36
0
 def select_iep_filter(self, filter_popup, selection, not_stated_percentage):
     """
     Validates the IEP filter dropdown options and selects the desired filter.
     :param filter_popup: Filter popup window
     :type filter_popup: Webdriver element
     :param selection: list of strings where each string is the filter selection. Can select one or more filtering options.
     :type selection: list
     :param not_stated_percentage: Not stated percentage text for the IEP filter
     :type not_stated_percentage: string
     """
     iep_filter = self.get_filter_dropdown(filter_popup, "iep")
     wait_for(lambda driver: iep_filter.find_element_by_class_name("display"))
     self.assertEqual("IEP", str(iep_filter.find_element_by_class_name("display").get_attribute("innerHTML")),
                      "IEP filter static text incorrectly displayed.")
     expected_iep_options = ['Yes', 'No', 'Not Stated',
                             "*IEP categorization does not include students with a GIEP (i.e., 'gifted' students)",
                             not_stated_percentage]
     self.check_filter_dropdown_menu(iep_filter, expected_iep_options)
     self.select_desired_filter(filter_popup, iep_filter, selection)
Пример #37
0
 def test_ethnicity_filter(self):
     self.drill_down_navigation("228", "ui-jqgrid-ftable")
     self.drill_down_navigation("242", "ui-jqgrid-ftable")
     filter_popup = self.open_filter_menu()
     self.select_ethnicity_filter(filter_popup, ["Asian*"],
                                  '9% reported "not stated"')
     self.close_filter_menu(filter_popup, "apply")
     self.check_overall_filtered_count("4", "Out of 35 students", "4",
                                       "Out of 35 students")
     self.check_filter_bar(["Race/Ethnicity: Asian"])
     browser().find_element_by_link_text("North Carolina").click()
     try:
         wait_for(
             expected_conditions.visibility_of_element_located(
                 (By.CLASS_NAME, "ui-jqgrid-view")))
     except:
         save_screen('/tmp/screenshot.png')
     self.check_filter_bar(["Race/Ethnicity: Asian"])
     self.check_overall_filtered_count("11", "Out of 89 students", "8",
                                       "Out of 77 students")
Пример #38
0
 def open_filter_menu(self):
     """
     Verifies that the filter option is available and clicks on it to open the filtering menu
     :return filter_popup: returns the filter popup window back to the calling method
     :type filter_popup: webdriver element
     """
     self.assertEqual("Filter", str(browser().find_element_by_id("actionBar").find_element_by_class_name(
         "filterItem").find_element_by_class_name("filterLabel").text),
                      "Filter label not found on the actions bar")
     try:
         browser().find_element_by_id("actionBar").find_element_by_class_name("filterItem").click()
         wait_for(lambda driver: driver.find_element_by_id("content").find_element_by_class_name("filter"))
         self.assertEqual("Student Filters", str(
             browser().find_element_by_class_name("filter").find_element_by_class_name("section").text),
                          "Student Filters label not displayed on the filter popup.")
         time.sleep(5)
         filter_popup = browser().find_element_by_class_name("filter")
         return filter_popup
     except:
         self.assertTrue(False, "Error in opening the filter menu.")
Пример #39
0
 def select_lep_filter(self, filter_popup, selection, not_stated_percentage):
     """
     Validates the LEP filter dropdown options and selects the desired filter.
     :param filter_popup: Filter popup window
     :type filter_popup: Webdriver element
     :param selection: list of strings where each string is the filter selection. Can select one or more filtering options.
     :type selection: list
     :param not_stated_percentage: Not stated percentage text for the LEP filter
     :type not_stated_percentage: string
     """
     lep_filter = self.get_filter_dropdown(filter_popup, "lep")
     wait_for(lambda driver: lep_filter.find_element_by_class_name("display"))
     self.assertEqual("Limited English Proficient (LEP)*",
                      str(lep_filter.find_element_by_class_name("display").get_attribute("innerHTML")),
                      "LEP filter static text incorrectly displayed.")
     expected_lep_options = ['Yes', 'No', 'Not Stated',
                             '*This category includes English Language Learners(ELL) if your state identifies students as ELL',
                             not_stated_percentage]
     self.check_filter_dropdown_menu(lep_filter, expected_lep_options)
     self.select_desired_filter(filter_popup, lep_filter, selection)
Пример #40
0
 def select_ethnicity_filter(self, filter_popup, selection, not_stated_percentage):
     """
     Validates the ethnicity filter dropdown options and selects the desired filter.
     :param filter_popup: Filter popup window
     :type filter_popup: Webdriver element
     :param selection: list of strings where each string is the filter selection. Can select one or more filtering options.
     :type selection: list
     :param not_stated_percentage: Not stated percentage text for the ethnicity filter
     :type not_stated_percentage: string
     """
     ethnicity_filter = self.get_filter_dropdown(filter_popup, "ethnicity")
     wait_for(lambda driver: ethnicity_filter.find_element_by_class_name("display"))
     self.assertEqual("Race/Ethnicity",
                      str(ethnicity_filter.find_element_by_class_name("display").get_attribute("innerHTML")),
                      "Ethnicity filter static text incorrectly displayed.")
     expected_eth_options = ['Hispanic/Latino of any race', 'American Indian or Alaska Native*', 'Asian*',
                             'Black or African American*', 'Native Hawaiian or Pacific Islander*', 'White*',
                             'Two or more races*', 'Not Stated', '*Not Hispanic or Latino', not_stated_percentage]
     self.check_filter_dropdown_menu(ethnicity_filter, expected_eth_options)
     self.select_desired_filter(filter_popup, ethnicity_filter, selection)
Пример #41
0
 def select_opportunity_los(self, selection):
     """
     Select o view from the opportunity selector dropdown from LOS report
     :param selection: Expected selection of assessment view from LOS report
     :type selection: String
     """
     wait_for(expected_conditions.visibility_of_element_located((By.CLASS_NAME, "detailsItem")))
     dropdown = browser().find_element_by_class_name("asmtDropdown")
     dropdown.find_element_by_tag_name("button").click()
     all_options = dropdown.find_element_by_class_name("asmtDropdownMenu").find_elements_by_class_name(
         'asmtSelection')
     for each in all_options:
         """
         Another way to handle the unicode encode error is to encode the expected result and then compare it with the actual text
         for eg: Replace . with · in the expected text like "2016.01.01 · Grade 3 · Interim Comprehensive" and then
         if selection in each.text.encode('ascii', 'xmlcharrefreplace'):
         """
         if selection in each.text:
             section = each
     section.click()
     save_screen('/tmp/select_opportunity_los2.png')
Пример #42
0
    def test_grayscale_pdf(self):
        print("TC_GRAYSCALE_PDF: Validate that the pdf is printed from the UI and a directory structure is available.")
        self.drill_down_navigation("228", "ui-jqgrid-ftable")
        self.drill_down_navigation("242", "ui-jqgrid-ftable")
        self.drill_down_navigation("03", "jqgfirstrow")
        self.drill_down_navigation("jqg26", "overallScoreSection")

        print("PDF: Click on the print button to generate a pdf.")
        browser().find_element_by_class_name("printLabel").click()
        wait_for(expected_conditions.visibility_of_element_located((By.CLASS_NAME, "modal-backdrop")))
        print("PDF: Verify the contents of the pdf popover and generate a grayscale pdf printout")
        print_popup = browser().find_element_by_id("PrintModal")
        self.check_print_popover_contents(print_popup, "grayscale")
        time.sleep(20)
        print("PDF: Validate if the directory structure is available.")
        assert (os.path.isdir(_pdfs + "/NC/2016/228/242/03/isr/SUMMATIVE"))

        print("PDF: Validate if the pdf file is stored inside the directory structure.")
        assert os.path.isfile(
            _pdfs + "/NC/2016/228/242/03/isr/SUMMATIVE/dae1acf4-afb0-4013-90ba-9dcde4b25621.20160410.en.g.pdf")
        print("PDF: Grayscale pdf tests passed.")
Пример #43
0
 def select_grouping_filter(self, filter_popup, selection,
                            expected_grouping_options):
     """
     Validates the Student Group filter dropdown options and selects the desired filter.
     :param filter_popup: Filter popup window
     :type filter_popup: Webdriver element
     :param selection: list of strings where each string is the filter selection. Can select one or more filtering options.
     :type selection: list
     """
     grouping_filter = self.get_filter_dropdown(filter_popup, "grouping")
     wait_for(lambda driver: grouping_filter.find_element_by_class_name(
         "display"))
     self.assertEqual(
         "Student Group",
         str(
             grouping_filter.find_element_by_class_name(
                 "display").get_attribute("innerHTML")),
         "Student Group 1 filter static text incorrectly displayed.")
     self.check_filter_dropdown_menu(grouping_filter,
                                     expected_grouping_options)
     self.select_desired_filter(filter_popup, grouping_filter, selection)
Пример #44
0
 def select_academic_year_los(self, options, selection):
     """
     Select an option from the "Other Academic Years" section
     """
     dropdown = browser().find_element_by_class_name("asmtDropdown")
     dropdown.find_element_by_tag_name("button").click()
     dropdown_menu = dropdown.find_element_by_tag_name("ul")
     year_divider = dropdown_menu.find_elements_by_tag_name("li")
     self.assertEqual(len(year_divider), options, "drop down menu does not have proper list")
     for option in dropdown_menu.find_elements_by_tag_name("li"):
         if option.text == selection:
             option.click()
     if selection == '2014 - 2015':
         reminder_text = "You are viewing a previous academic year. Return to 2015 - 2016."
         # wait_for(lambda driver: browser().find_element_by_class_name("reminderMessage"))
         wait_for(expected_conditions.visibility_of_element_located((By.CLASS_NAME, "reminderMessage")))
         self.assertIn(reminder_text, str(browser().find_element_by_class_name("reminderMessage").text),
                       "Reminder text incorrectly displayed.")
         # browser().find_element_by_class_name("reminderMessage").find_element_by_tag_name("a").click()
     elif selection == '2015 - 2016':
         wait_for(expected_conditions.invisibility_of_element_located((By.CLASS_NAME, "reminderMessage")))
Пример #45
0
 def select_gender_filter(self, filter_popup, selection):
     """
     Validates the gender filter dropdown options and selects the desired filter.
     :param filter_popup: Filter popup window
     :type filter_popup: Webdriver element
     :param selection: list of strings where each string is the filter selection. Can select one or more filtering options.
     :type selection: list
     :type not_stated_percentage: string
     """
     gender_filter = self.get_filter_dropdown(filter_popup, "sex")
     wait_for(
         lambda driver: gender_filter.find_element_by_class_name("display"))
     self.assertEqual(
         "Gender",
         str(
             gender_filter.find_element_by_class_name(
                 "display").get_attribute("innerHTML")),
         "Gender filter static text incorrectly displayed.")
     expected_gender_options = ['Male', 'Female', 'Not Stated', '']
     self.check_filter_dropdown_menu(gender_filter, expected_gender_options)
     self.select_desired_filter(filter_popup, gender_filter, selection)
Пример #46
0
 def select_migrant_filter(self, filter_popup, selection):
     """
     Validates the Migrant status filter dropdown options and selects the desired filter.
     :param filter_popup: Filter popup window
     :type filter_popup: Webdriver element
     :param selection: list of strings where each string is the filter selection. Can select one or more filtering options.
     :type selection: list
     """
     migrant_status_filter = self.get_filter_dropdown(filter_popup, "mig")
     wait_for(lambda driver: migrant_status_filter.
              find_element_by_class_name("display"))
     self.assertEqual(
         "Migrant Status",
         str(
             migrant_status_filter.find_element_by_class_name(
                 "display").get_attribute("innerHTML")),
         "Migrant Status filter static text incorrectly displayed.")
     expected_mig_options = ['Yes', 'No', 'Not Stated', '']
     self.check_filter_dropdown_menu(migrant_status_filter,
                                     expected_mig_options)
     self.select_desired_filter(filter_popup, migrant_status_filter,
                                selection)
Пример #47
0
    def check_overall_filtered_count(self, math_total_students, math_unfiltered_text, ela_total_students,
                                     ela_unfiltered_text):
        """
        Validates the filtered count and filtered/unfiltered text in the overall row.
        :param math_total_students: Filtered Math student count
        :type math_total_students: string
        :param math_unfiltered_text: unfiltered text
        :type math_unfiltered_text: string
        :param ela_total_students: Filtered ELA student count
        :type ela_total_students: string
        :param ela_unfiltered_text: unfiltered text
        :type ela_unfiltered_text: string
        """
        math_static_text = math_unfiltered_text.rsplit(' ', 1)[0]
        ela_static_text = ela_unfiltered_text.rsplit(' ', 1)[0]
        wait_for(expected_conditions.invisibility_of_element_located((By.CLASS_NAME, "loader")))
        wait_for(lambda driver: driver.find_element_by_class_name("unfilteredTotal"))

        overall_summary_sections = browser().find_element_by_class_name("ui-jqgrid-ftable").find_elements_by_tag_name(
            "td")
        self.assertIn(math_total_students, str(overall_summary_sections[2].find_element_by_class_name(
            "studentsTotal").text)), "Total # of students for Math assessment incorrectly displayed as {%s}" % format(
            overall_summary_sections[1].text)
        self.assertIn(math_static_text, str(overall_summary_sections[2].find_element_by_class_name(
            "unfilteredTotal").text)), "Unfiltered count text incorrectly displayed."
        self.assertIn("students", str(
            overall_summary_sections[2].find_element_by_class_name("unfilteredTotal").find_element_by_class_name(
                "studentText").text)), "Unfiltered count text incorrectly displayed."

        self.assertIn(ela_total_students, str(overall_summary_sections[
                                                  4].text)), "Total # of students for ELA assessment incorrectly displayed as {%s}" % format(
            overall_summary_sections[2].text)
        self.assertIn(ela_static_text, str(overall_summary_sections[4].find_element_by_class_name(
            "unfilteredTotal").text)), "Unfiltered count text incorrectly displayed."
        self.assertIn("students", str(
            overall_summary_sections[4].find_element_by_class_name("unfilteredTotal").find_element_by_class_name(
                "studentText").text)), "Unfiltered count text incorrectly displayed."
Пример #48
0
 def click_latest_year_reminder_msg(self):
     """
     Click on the latest year link from the previous year reminder message
     """
     browser().find_element_by_class_name("reminderMessage").find_element_by_tag_name("a").click()
     wait_for(expected_conditions.invisibility_of_element_located((By.CLASS_NAME, "reminderMessage")))