Пример #1
0
    def test_iab_ela_only(self):
        self.drill_down_navigation("228", "ui-jqgrid-ftable")
        # Click on 'Sunset - Central High- Grade 11' school link from list of districts
        self.drill_down_navigation("248", "ui-jqgrid-ftable")
        self.drill_down_navigation("11", "jqgfirstrow")
        self.select_academic_year_los(6, "2014 - 2015")
        # Click on 'Verna Patterson' student link from list of students
        self.drill_down_navigation("jqg41", "overallScoreSection")

        breadcrumb_list = ["North Carolina", "Sunset School District", "Sunset Central High", "Grade 11"]
        self.check_breadcrumb_hierarchy_links(breadcrumb_list)
        self.check_breadcrumb_trail("Verna Patterson's Results")

        print("Validate the IAB results")
        self.select_opportunity_isr("2014 - 2015 · Interim Assessment Blocks")
        self.check_selected_asmt_type_isr("2014 - 2015 · Interim Assessment Blocks")
        self.validate_interim_disclaimer()
        no_results_iab_header = str(
            browser().find_element_by_id("individualStudentContent").find_element_by_class_name(
                "isrInterimBlockHeader").text)
        self.assertEqual("There is no data available for your request.", no_results_iab_header,
                         "No results message not displayed correctly for Math")

        self.select_iab_subject("ELA/Literacy")
        iab_header = str(browser().find_element_by_id("individualStudentContent").find_element_by_class_name(
            "ELA").find_element_by_class_name("isrInterimBlockHeader").find_element_by_class_name("info").text)
        self.assertEqual("Interim Assessment Blocks 2014 - 2015", iab_header, "IAB header incorrectly displayed.")
        ela_iab_blocks = browser().find_element_by_id("individualStudentContent").find_element_by_class_name(
            "ELA").find_element_by_class_name("blocksSection").find_elements_by_class_name('blocks')
        self.assertEqual(3, len(ela_iab_blocks), "Invalid number of IAB's found")
        # Validate an IAB with 5 assessment results
        self.verify_iab_title_score(ela_iab_blocks[0], "Grade 11:", "Brief Writes", "2015.02.10", "Below Standard")
        self.verify_iab_previous_results(ela_iab_blocks[0], 1, [{"2015.01.31": "Below Standard"}])
    def test_HPZ_integration_for_assessment_completion_statistics(self):
        # Select the academic year for Student Assessment Completion extract
        export_popup = self.open_file_download_popup()
        self.check_export_options(export_popup, ['State Downloads'])
        self.select_extract_option(export_popup, 'State Downloads')
        self.select_state_downloads_options(['Student Registration Statistics', 'Assessment Completion Statistics'],
                                            'Assessment Completion Statistics')
        self.select_state_download_academic_yr('Assessment Completion Statistics', '2000')

        url = self.submit_extract_download_option()
        sleep(3)
        browser().get(url)
        sleep(3)

        for file in os.listdir(DOWNLOAD_FILE_PATH):
            if file.endswith(".zip"):
                file_name = file
        downloaded_file = DOWNLOAD_FILE_PATH + file_name
        self.files_to_cleanup_at_end.append(downloaded_file)
        self.unzip_file_to_directory(downloaded_file, UNZIPPED_FILE_PATH)
        file_names = self.get_file_names(UNZIPPED_FILE_PATH)
        print(file_names)
        print(len(file_names))
        csv_file_names = file_names[0]
        self.assertEqual(len(csv_file_names), 1, 'Unexpected number of csv files found')
        return csv_file_names
Пример #3
0
 def test_sad_path_invalid_parameters_state(self):
     print("Sad_Path: Invalid parameters in the state view URL")
     # State View - Incorrect state code
     browser().get(self.get_url() +
                   "/assets/html/comparingPopulations.html?stateCode=XX")
     self.enter_login_credentials("cdavis", "cdavis1234")
     self.check_error_msg()
Пример #4
0
 def test_list_of_grades_login_redirect_school_ed_admin_PII(self):
     save_message('TC: Open a CPOP-School View page and validate login redirect as a School Education'
                  ' Admin (cdavis) to view the list of grades')
     browser().get(
         self.get_url() + "/assets/html/comparingPopulations.html?stateCode=NC&schoolGuid=936&districtGuid=229")
     self.enter_login_credentials("cdavis", "cdavis1234")
     self.check_redirected_requested_page("school_view")
Пример #5
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")))
 def test_post_raw_data_xml(self):
     self.set_request_cookie('gman')
     self.set_payload({
         "stateCode": "NC",
         "asmtYear": "2015",
         "asmtType": "SUMMATIVE",
         "asmtSubject": "ELA",
         "asmtGrade": "04"
     })
     self.send_request("POST", "/services/extract/raw_data")
     self.check_response_code(200)
     self.check_not_error_page()
     self.open_requested_page_redirects_login_page("state_view_sds")
     self.enter_login_credentials('gman', 'gman1234')
     elements = self._response.json()['files']
     for each in elements:
         url = (each['web_download_url'])
         file_name = (each['fileName'])
         print(url)
         print(file_name)
         browser().get(url)
         save_screen('/tmp/screenshot_rawdata1.png')
         downloaded_xml_file = DOWNLOAD_DIRECTORY + file_name
         self.files_to_cleanup_at_end.append(downloaded_xml_file)
         self.unzip_file_to_directory(downloaded_xml_file,
                                      UNZIPPED_XML_FILE)
     # ToDo: 0 is incorrect expectation according to logic
     self.assertEqual(
         len(fnmatch.filter(os.listdir(UNZIPPED_XML_FILE), '*.xml')), 0,
         "Raw data XML file count is wrong")
Пример #7
0
    def test_grade_8_individual_student_report(self):
        # Click on 'Sunset - Western Middle - Grade 8' school link from list of districts
        self.drill_down_navigation("228", "ui-jqgrid-ftable")
        self.drill_down_navigation("245", "ui-jqgrid-ftable")
        self.drill_down_navigation("08", "jqgfirstrow")
        self.select_academic_year_los(6, "2014 - 2015")
        self.total_los_records(3)
        # Click on 'Wall E. Bass'' student link from list of students
        self.drill_down_navigation("jqg40", "overallScoreSection")

        self.check_page_header("Wall E. Bass | Grade 08")
        self.check_isr_overall_score_summary(0, 'Mathematics', '1967', "Adequate Understanding")
        self.check_isr_overall_score_summary(1, 'ELA/Literacy', '1373', "Minimal Understanding")

        math_section = browser().find_element_by_id("individualStudentContent").find_element_by_id(
            "assessmentSection0")
        math_overall_score_content = "The student has met the achievement standard and demonstrates progress toward mastery of the knowledge and skills in mathematics needed for likely success in entry-level credit-bearing college coursework after high school."
        math_left_pane_content = {
            "psychometric": "Achievement Levels illustrate how students scored on the assessment and student's strengths and areas of improvement. Test results are one of many measures of a student's academic achievement."}
        self.check_content_areas(math_section, math_overall_score_content, math_left_pane_content)

        self.select_subject_view("ELA/Literacy")
        self.check_current_subject_view("ELA/Literacy")
        ela_section = browser().find_element_by_id("individualStudentContent").find_element_by_id(
            "assessmentSection1")
        ela_overall_score_content = "The student has not met the achievement standard and needs substantial improvement to demonstrate the knowledge and skills in English language arts/literacy needed for likely success in entry-level credit-bearing college coursework after high school."
        ela_left_pane_content = {
            "psychometric": "Achievement Levels illustrate how students scored on the assessment and student's strengths and areas of improvement. Test results are one of many measures of a student's academic achievement."}
        self.check_content_areas(ela_section, ela_overall_score_content, ela_left_pane_content)
Пример #8
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()
Пример #9
0
    def component_check_in_page(self, math_alignment, ela_alignment):
        self.assertTrue(self.find_element(self.locators['globe_icon']), "Globe icon should present")
        self.assertTrue(self.find_element(self.locators['language']), "Language as English should present")
        element = self.find_element(self.locators['language'])
        self.assertEqual(element.text, self.texts['language'], "Language text is not correct")
        self.assertFalse(self.find_element(self.locators['hi']), "Hi text should not present")
        self.assertTrue(self.find_element(self.locators['help']).text == 'Info', "Help menu should not present")
        self.assertTrue(self.find_element(self.locators['download']), "Download option should present")
        self.check_cpop_legend_popup(False)
        self.check_alignment(math_alignment, ela_alignment)

        expected_grade_filters = ['Grade 3', 'Grade 4', 'Grade 5', 'Grade 6', 'Grade 7', 'Grade 8', 'Grade 11']
        filter_popup = self.open_filter_menu()
        self.check_grade_filter_menu(filter_popup, expected_grade_filters)
        self.select_grade_filter(filter_popup, ["Grade 6"])
        self.close_filter_menu(filter_popup, "apply")
        self.check_filter_bar(["Grades: 6"])
        time.sleep(7)
        expected_error_msg = 'There is no data available for your request.'
        self.assertEqual(expected_error_msg,
                         str(browser().find_element_by_id("content").find_element_by_id("errorMessage").text),
                         "Error message not found")
        # clear the filter selection
        browser().find_element_by_class_name('selectedFilterGroup').find_element_by_tag_name('a').click()

        # dowload popup checking
        self.check_download_popup()
Пример #10
0
 def test_multi_tenancy(self):
     print("Multi Tenancy: Unable to access a student from another tenancy")
     # Try to access a student from the TX state - DifferentTenancy
     browser().get(
         self.get_url() + "/assets/html/indivStudentReport.html?studentId=e47db0b0-cd26-11e2-8b8b-0800200c9a66")
     self.enter_login_credentials("cdavis", "cdavis1234")
     self.check_error_msg()
    def check_csv_extract_matches_file(self, url, file_name, id,
                                       expected_file):
        print(expected_file)
        expected_csv = list(csv.reader(open(expected_file)))

        # self.open_requested_page_redirects_login_page("state_view_vt_tenant")
        # self.enter_login_credentials('jmacey', 'jmacey1234')
        # self.check_redirected_requested_page("state_view_sds")
        self.open_requested_page_redirects_login_page("state_view_sds")
        self.enter_login_credentials('gman', 'gman1234')
        self.check_redirected_requested_page("state_view_sds")
        browser().get(url)
        downloaded_file = DOWNLOAD_DIRECTORY + file_name
        print(downloaded_file)
        self.files_to_cleanup_at_end.append(downloaded_file)
        self.check_downloaded_zipfile_present(file_name)
        self.unzip_file_to_directory(downloaded_file,
                                     UNZIPPED_STU_REG_FILE_PATH)

        csv_file_names = self.get_csv_file_name(UNZIPPED_STU_REG_FILE_PATH)
        self.assertEqual(len(csv_file_names), 1,
                         'expected number of pdf files NOT found')
        for each in csv_file_names:
            csv_file_path = os.path.join(UNZIPPED_STU_REG_FILE_PATH, each)
            csv_file_size = os.path.getsize(csv_file_path)
            print(
                "test_post_student_reg: Student registration csv file size = ",
                csv_file_size)
            self.assertNotEqual(0, csv_file_size, "Empty file")
            actual_csv = list(csv.reader(open(csv_file_path)))
            self.assertEqual(expected_csv, actual_csv)
Пример #12
0
 def select_assessment_dropdown(self, exam):
     browser().find_element_by_id("selectedAsmtType").click()
     dropdown_menu = browser().find_element_by_class_name(
         "asmtDropdownMenu").find_elements_by_tag_name("li")
     for each in dropdown_menu:
         if each.text == exam:
             each.find_element_by_tag_name("span").click()
Пример #13
0
 def test_ql_lables(self):
     self.open_requested_page_redirects_login_page("state_view_sds")
     self.enter_login_credentials("jbrown", "jbrown1234")
     self.check_redirected_requested_page("state_view_sds")
     ql_elements = browser().find_element_by_id("quickLinks_data").find_elements_by_class_name("row-fluid")
     ql_expected_headings = ['Your Districts', 'Your Schools']
     ql_headings = []
     for each in ql_elements:
         ql_headings.append(each.find_element_by_class_name("span2").text)
     self.assertEqual(ql_headings, ql_expected_headings, "quick link headings are not present")
     ql_distric_names = browser().find_element_by_id("districts_0").find_element_by_tag_name(
         "ul").find_elements_by_tag_name("li")
     expected_district_name = ['Dealfish Pademelon SD', 'Ropefish Lynx Public Schools']
     actual_district_name = []
     for each in ql_distric_names:
         actual_district_name.append(each.find_element_by_tag_name('a').text)
     self.assertEqual(expected_district_name, actual_district_name, "quick link districts are not present")
     ql_schools_names = browser().find_element_by_id("schools_0").find_element_by_tag_name(
         "ul").find_elements_by_tag_name("li")
     expected_school_name = ['Dolphin Razorfish Sch', 'Hickory Cornetfish Jr Middle',
                             'Sandpiper Peccary Elementary', 'Serotine Planetree Elementary School']
     actual_school_name = []
     for each in ql_schools_names:
         actual_school_name.append(each.find_element_by_tag_name('a').text)
     self.assertEqual(expected_school_name, actual_school_name, "quick link schools are not present")
Пример #14
0
 def test_print_css_cpop_state_view(self):
     with open(PRINT_JS_FILE) as f:
         src = f.read()
     browser().execute_script(src)
     cpop = browser().find_element_by_class_name("cpop").find_element_by_css_selector("div[role='main']")
     self.check_print_header(cpop)
     self.check_print_actionbar(cpop)
Пример #15
0
 def test_individual_student_report_standard_and_partial_ica(self):
     # Click on 'Sunset - Eastern Elementary - Grade 3' school link from list of schools
     self.drill_down_navigation("228", "ui-jqgrid-ftable")
     self.drill_down_navigation("242", "ui-jqgrid-ftable")
     self.drill_down_navigation("03", "jqgfirstrow")
     self.select_academic_year_los(5, "2014 - 2015")
     self.select_exam("Interim Comprehensive")
     time.sleep(5)
     self.drill_down_navigation("jqg65", "overallScoreSection")
     breadcrumb_list = ["North Carolina", "Sunset School District", "Sunset - Eastern Elementary", "Grade 03"]
     self.check_breadcrumb_hierarchy_links(breadcrumb_list)
     self.check_breadcrumb_trail("Richard Mccarty's Results")
     self.check_headers("Guy Man", "Log Out")
     self.check_page_header("Richard Mccarty | Grade 03")
     self.check_isr_overall_score_summary(0, 'Mathematics', '1560', "Level 2")
     self.check_isr_overall_score_summary(1, 'ELA/Literacy', '1239', "Level 1")
     self.check_current_subject_view("Mathematics")
     math_content_area = browser().find_element_by_id("individualStudentContent").find_element_by_id(
         "assessmentSection0")
     warnings = math_content_area.find_element_by_class_name("contentWrapper").find_elements_by_class_name("warning")
     self.check_warning_message(warnings[0], "edware-icon-standardized edware-icon-large", STANDARD_TEST_MESSAGE)
     self.check_warning_message(warnings[1], "edware-icon-partial edware-icon-large", PARTIAL_TEST_MESSAGE)
     self.select_subject_view("ELA/Literacy")
     self.check_current_subject_view("ELA/Literacy")
     ela_content_area = browser().find_element_by_id("individualStudentContent").find_element_by_id(
         "assessmentSection1")
     contens = ela_content_area.find_element_by_class_name("warning")
     self.check_warning_message(contens, "edware-icon-partial edware-icon-large", PARTIAL_TEST_MESSAGE)
Пример #16
0
 def test_landing_page_contents(self):
     url = self.get_url() + "/assets/public/landing.html"
     browser().get(url)
     assert not self.is_help_present()
     self.login_in_header()
     self.login_in_content()
     self.about_section()
Пример #17
0
 def test_sad_path_invalid_field_name_state(self):
     """ Invalid field names in the URLs """
     print("Sad_Path: Invalid field name in the state view URL")
     # State View - Incorrect state code
     browser().get(self.get_url() + "/assets/html/comparingPopulations.html?stateId=NC")
     self.enter_login_credentials("cdavis", "cdavis1234")
     self.check_error_msg()
Пример #18
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'])
Пример #19
0
 def test_sad_path_invalid_parameters_isr(self):
     print("Sad_Path: Invalid student id in the individual student report URL")
     # Incorrect student id
     browser().get(
         self.get_url() + "/assets/html/indivStudentReport.html?studentId=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx")
     self.enter_login_credentials("cdavis", "cdavis1234")
     self.check_error_msg()
Пример #20
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.")
    def test_post_item_level_extract(self):
        self.set_request_cookie('shall')
        self.set_payload({
            "stateCode": "NC",
            "asmtYear": "2016",
            "asmtType": "SUMMATIVE",
            "asmtSubject": "Math",
            "asmtGrade": "03"
        })
        self.send_request("POST", "/services/extract/assessment_item_level")
        self.check_response_code(200)
        self.check_not_error_page()
        self.open_requested_page_redirects_login_page("state_view_sds")
        self.enter_login_credentials('shall', 'shall1234')
        elements = self._response.json()['files']
        for each in elements:
            url = (each['web_download_url'])
            file_name = (each['fileName'])
            browser().get(url)
            downloaded_file = DOWNLOAD_DIRECTORY + file_name
            self.files_to_cleanup_at_end.append(downloaded_file)
            self.unzip_file_to_directory(downloaded_file, UNZIPPED_FILE_PATH)
            csv_file_names, _ = self.get_file_names(UNZIPPED_FILE_PATH)
        for each in csv_file_names:
            csv_file_path = os.path.join(UNZIPPED_FILE_PATH, each)
            self.validate_item_level_csv_headers(csv_file_path)
            with (open(csv_file_path)) as f:
                row_count = sum(1 for row in csv.reader(f))
                self.assertEqual(row_count, 946)
            f.close()

        self.assertEqual(len(csv_file_names), 3,
                         'expected number of csv files NOT found')
    def check_cpop_report_info_school_view(self):
        """
        Validates the Report Info text displayed on the mouseover overlay in cpop-school view report
        """
        element_to_click = browser(
        ).find_element_by_id("infoBar").find_element_by_class_name(
            "edware-vertical-bar").find_element_by_class_name("reportInfoIcon")
        hover_mouse = ActionChains(browser()).move_to_element(element_to_click)
        hover_mouse.perform()
        time.sleep(3)
        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 view of student performance on the most recent summative " + \
                       "assessment for each grade in a selected school. For each grade, the report displays the percentage " + \
                       "of students in each achievement level and the number of students assessed."
        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 compare overall achievement between grades in a school."
        use2 = "Filter the view to analyze sub-groups within a grade."
        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.")

        features_bullet_points = bullet_point_sections[
            1].find_elements_by_tag_name("li")
        feature1 = "Align the visual display by the percentage of students in each achievement level or along the line between Level 2 and Level 3, for example."
        self.assertEqual(feature1, 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(
            "Filter results by attributes (e.g., Gender, IEP, Economic Disadvantage)",
            str(features_bullet_points[2].text),
            "Third features bullet point not found.")
        self.assertEqual(
            "Download student assessment results for further analysis",
            str(features_bullet_points[3].text),
            "Fourth features bullet point not found.")
        self.assertEqual(
            "Print Individual Student Reports (PDF) for all students in the school",
            str(features_bullet_points[4].text),
            "Fifth features bullet point not found.")
Пример #23
0
    def test_post_item_level_extract(self):
        self.set_request_cookie('shall')
        self.set_payload(
            {"stateCode": "NC", "asmtYear": "2016", "asmtType": "SUMMATIVE", "asmtSubject": "Math",
             "asmtGrade": "03"})
        self.send_request("POST", "/services/extract/assessment_item_level")
        self.check_response_code(200)
        self.check_not_error_page()
        self.open_requested_page_redirects_login_page("state_view_sds")
        self.enter_login_credentials('shall', 'shall1234')
        elements = self._response.json()['files']
        for each in elements:
            url = (each['web_download_url'])
            file_name = (each['fileName'])
            browser().get(url)
            downloaded_file = DOWNLOAD_DIRECTORY + file_name
            self.files_to_cleanup_at_end.append(downloaded_file)
            self.unzip_file_to_directory(downloaded_file, UNZIPPED_FILE_PATH)
            csv_file_names, _ = self.get_file_names(UNZIPPED_FILE_PATH)
        for each in csv_file_names:
            csv_file_path = os.path.join(UNZIPPED_FILE_PATH, each)
            self.validate_item_level_csv_headers(csv_file_path)
            with(open(csv_file_path)) as f:
                row_count = sum(1 for row in csv.reader(f))
                self.assertEqual(row_count, 946)
            f.close()

        self.assertEqual(len(csv_file_names), 3, 'expected number of csv files NOT found')
Пример #24
0
    def check_csv_extract_matches_file(self, url, file_name, id, expected_file):
        print(expected_file)
        expected_csv = list(csv.reader(open(expected_file)))

        # self.open_requested_page_redirects_login_page("state_view_vt_tenant")
        # self.enter_login_credentials('jmacey', 'jmacey1234')
        # self.check_redirected_requested_page("state_view_sds")
        self.open_requested_page_redirects_login_page("state_view_sds")
        self.enter_login_credentials('gman', 'gman1234')
        self.check_redirected_requested_page("state_view_sds")
        browser().get(url)
        downloaded_file = DOWNLOAD_DIRECTORY + file_name
        print(downloaded_file)
        self.files_to_cleanup_at_end.append(downloaded_file)
        self.check_downloaded_zipfile_present(file_name)
        self.unzip_file_to_directory(downloaded_file, UNZIPPED_STU_REG_FILE_PATH)

        csv_file_names = self.get_csv_file_name(UNZIPPED_STU_REG_FILE_PATH)
        self.assertEqual(len(csv_file_names), 1, 'expected number of pdf files NOT found')
        for each in csv_file_names:
            csv_file_path = os.path.join(UNZIPPED_STU_REG_FILE_PATH, each)
            csv_file_size = os.path.getsize(csv_file_path)
            print("test_post_student_reg: Student registration csv file size = ", csv_file_size)
            self.assertNotEqual(0, csv_file_size, "Empty file")
            actual_csv = list(csv.reader(open(csv_file_path)))
            self.assertEqual(expected_csv, actual_csv)
Пример #25
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")
Пример #26
0
 def test_sad_path_invalid_field_name_state(self):
     """ Invalid field names in the URLs """
     print("Sad_Path: Invalid field name in the state view URL")
     # State View - Incorrect state code
     browser().get(self.get_url() +
                   "/assets/html/comparingPopulations.html?stateId=NC")
     self.enter_login_credentials("cdavis", "cdavis1234")
     self.check_error_msg()
 def test_print_css_cpop_state_view(self):
     with open(PRINT_JS_FILE) as f:
         src = f.read()
     browser().execute_script(src)
     cpop = browser().find_element_by_class_name(
         "cpop").find_element_by_css_selector("div[role='main']")
     self.check_print_header(cpop)
     self.check_print_actionbar(cpop)
Пример #28
0
 def assessment_dropdown_text_isr(self):
     browser().find_element_by_id("selectedAsmtType").click()
     dropdown_text = []
     dropdown_menu = browser().find_element_by_class_name("asmtDropdownMenu").find_elements_by_tag_name("li")
     for each in dropdown_menu:
         dropdown_text.append(each.text)
     browser().find_element_by_id("selectedAsmtType").click()
     return dropdown_text
Пример #29
0
 def sort_by_entity_name(self, sorted_value):
     """
     Sorts by the first column in the comparing populations grid.
     :param sorted_value: topmost row name in the grid
     :type sorted_value: string
     """
     browser().find_element_by_id("jqgh_gridTable_name").find_element_by_class_name("s-ico").click()
     self.check_topmost_row(sorted_value)
    def test_consortium_pii_all(self):
        save_message(
            'Login as consortium user with SAS and SRS permission and PII permissions for CA, NC and VT'
        )
        self.enter_login_credentials("radams", "radams1234")
        # Click on the CA from state map
        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_tenant_logo('smarterHeader_logo')
        self.select_state_from_map("57.6", "California")
        self.drill_down_navigation("228", "ui-jqgrid-ftable")
        self.drill_down_navigation("242", "ui-jqgrid-ftable")
        self.drill_down_navigation("03", "jqgfirstrow")
        export_popup = self.open_file_download_popup()
        self.check_export_options(
            export_popup, ['Current view', 'Student assessment results'])
        self.close_file_download_popup(export_popup)
        self.check_selected_asmt_type_los("Summative")
        self.drill_down_navigation("jqg22", "overallScoreSection")
        self.check_page_header("Marie Donohue | Grade 03")

        # Click on the NC from state map
        browser().find_element_by_partial_link_text("Home").click()
        self.check_redirected_requested_page("state_selection_map")
        self.select_state_from_map("765.6", "North Carolina")
        self.drill_down_navigation("0513ba44-e8ec-4186-9a0e-8481e9c16206",
                                   "ui-jqgrid-ftable")
        self.drill_down_navigation("52a84cfa-4cc6-46db-8b59-5938fd1daf12",
                                   "ui-jqgrid-ftable")
        self.drill_down_navigation("05", "jqgfirstrow")
        export_popup = self.open_file_download_popup()
        self.check_export_options(export_popup, ['Current view'])
        self.close_file_download_popup(export_popup)
        self.check_selected_asmt_type_los("Summative")
        self.drill_down_navigation("jqg24", "overallScoreSection")
        self.check_page_header("Victor P. Daniels | Grade 05")

        # Click on the VT from state map
        browser().find_element_by_partial_link_text("Home").click()
        self.check_redirected_requested_page("state_selection_map")
        self.select_state_from_map("800", "Vermont")
        self.drill_down_navigation("2ce72d77-1de2-4137-a083-77935831b817",
                                   "ui-jqgrid-ftable")
        self.drill_down_navigation("0eab62f5-6c97-4302-abff-7bfdc61f527c",
                                   "ui-jqgrid-ftable")
        self.drill_down_navigation("05", "jqgfirstrow")
        export_popup = self.open_file_download_popup()
        self.check_export_options(
            export_popup, ['Current view', 'Student assessment results'])
        self.close_file_download_popup(export_popup)
        self.check_selected_asmt_type_los("Summative")
        # self.drill_down_navigation("jqg23", "overallScoreSection")
        # self.check_page_header("Barbara M. Babineaux | Grade 11")
        self.drill_down_navigation("jqg20", "overallScoreSection")
        self.check_page_header("Diane Baine | Grade 05")
Пример #31
0
 def test_multi_tenancy(self):
     print("Multi Tenancy: Unable to access a student from another tenancy")
     # Try to access a student from the TX state - DifferentTenancy
     browser().get(
         self.get_url() +
         "/assets/html/indivStudentReport.html?studentId=e47db0b0-cd26-11e2-8b8b-0800200c9a66"
     )
     self.enter_login_credentials("cdavis", "cdavis1234")
     self.check_error_msg()
Пример #32
0
 def assessment_dropdown_text_isr(self):
     browser().find_element_by_id("selectedAsmtType").click()
     dropdown_text = []
     dropdown_menu = browser().find_element_by_class_name(
         "asmtDropdownMenu").find_elements_by_tag_name("li")
     for each in dropdown_menu:
         dropdown_text.append(each.text)
     browser().find_element_by_id("selectedAsmtType").click()
     return dropdown_text
Пример #33
0
    def test_extract_csv_file_download(self):
        # Select a summative math test extract
        export_popup = self.open_file_download_popup()
        self.check_export_options(
            export_popup,
            ['Current view', 'Student assessment results', 'State Downloads'])
        self.select_extract_option(export_popup, 'Student assessment results')
        # Validate the success message and get the download url
        url = self.get_download_url(300)
        time.sleep(3)
        browser().get(url)
        time.sleep(15)
        if os.listdir(DOWNLOAD_FILE_PATH):
            for file in os.listdir(DOWNLOAD_FILE_PATH):
                if file.endswith(".zip"):
                    file_name = file
        # Download the file and unzip it.
        downloaded_file = DOWNLOAD_FILE_PATH + file_name
        self.files_to_cleanup_at_end.append(downloaded_file)
        self.unzip_file_to_directory(downloaded_file, UNZIPPED_FILE_PATH)
        filenames = self.get_file_names(UNZIPPED_FILE_PATH)
        csv_filenames = filenames[0]
        json_filenames = filenames[1]

        # Validate the csv files existence and content of the files
        grade3 = self.check_csv_file_exists(
            csv_filenames, 'ASMT_2016_NC_GRADE_03_MATH_SUMMATIVE',
            '7d10d26b-b013-4cdd-a916-5d577e895cff')
        self.validate_csv_file(UNZIPPED_FILE_PATH, grade3, 22)
        grade4 = self.check_csv_file_exists(
            csv_filenames, 'ASMT_2016_NC_GRADE_04_MATH_SUMMATIVE',
            '2f20d955-5e60-4c8d-95ee-375678500f0a')
        self.validate_csv_file(UNZIPPED_FILE_PATH, grade4, 15)
        grade4_1 = self.check_csv_file_exists(
            csv_filenames, 'ASMT_2016_NC_GRADE_04_MATH_SUMMATIVE',
            '7d10d26b-b013-4cdd-a916-5d577e895cff')
        self.validate_csv_file(UNZIPPED_FILE_PATH, grade4_1, 3)
        grade5 = self.check_csv_file_exists(
            csv_filenames, 'ASMT_2016_NC_GRADE_05_MATH_SUMMATIVE',
            '2f20d955-5e60-4c8d-95ee-375678500f0a')
        self.validate_csv_file(UNZIPPED_FILE_PATH, grade5, 27)
        grade7 = self.check_csv_file_exists(
            csv_filenames, 'ASMT_2016_NC_GRADE_07_MATH_SUMMATIVE',
            '7d10d26b-b013-4cdd-a916-5d577e895cff')
        self.validate_csv_file(UNZIPPED_FILE_PATH, grade7, 11)
        grade8_1 = self.check_csv_file_exists(
            csv_filenames, 'ASMT_2016_NC_GRADE_08_MATH_SUMMATIVE',
            '7d10d26b-b013-4cdd-a916-5d577e895cff')
        self.validate_csv_file(UNZIPPED_FILE_PATH, grade8_1, 8)
        grade11 = self.check_csv_file_exists(
            csv_filenames, 'ASMT_2016_NC_GRADE_11_MATH_SUMMATIVE',
            '7d10d26b-b013-4cdd-a916-5d577e895cff')
        self.validate_csv_file(UNZIPPED_FILE_PATH, grade11, 5)
        grade12 = self.check_csv_file_exists(
            csv_filenames, 'ASMT_2016_NC_GRADE_12_MATH_SUMMATIVE',
            '7d10d26b-b013-4cdd-a916-5d577e895cff')
        self.validate_csv_file(UNZIPPED_FILE_PATH, grade12, 9)
Пример #34
0
 def test_sad_path_invalid_report_name(self):
     print("Sad_Path: Invalid report name in the state view URL")
     # LOS - All parameters incorrect
     browser().get(
         self.get_url() + "/assets/html/XXXXXXX.html?school_Id=242&state_Code=NC&district_Id=228&asmt_Grade=3")
     self.check_error_msg()
     # LOS - schoolId and districtId invalid; other parameters valid
     browser().get(self.get_url() + "/assets/html/comparingPopulations000000.html?stateCode=NC&districtId=999")
     self.check_error_msg()
Пример #35
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')
Пример #36
0
 def test_qunit_results_page(self):
     print("Qunit Tests: Running all Qunit tests.")
     browser().get(self.get_url() + EDWARE_QUNIT_URL)
     # wait for 15 seconds for the tests to run completely
     time.sleep(15)
     print("TC_test_qunit_results_page: Validate that there are no qunit failures")
     fail_span = browser().find_element_by_id("qunit-testresult")
     num_failures = fail_span.find_element_by_class_name("failed")
     assert num_failures.text == '0', "Found %s Qunit test failures" % num_failures.text
     print("Qunit Tests: Passed all Qunit tests.")
Пример #37
0
    def test_grade_11_individual_student_report(self):
        # Click on 'Sunset - Central High - Grade 11' link from list of states
        self.drill_down_navigation("228", "ui-jqgrid-ftable")
        self.drill_down_navigation("248", "ui-jqgrid-ftable")
        self.drill_down_navigation("11", "jqgfirstrow")
        self.drill_down_navigation("jqg21", "overallScoreSection")

        self.check_page_header("Henry Clauson | Grado 11")
        self.check_isr_overall_score_summary(0, 'Mathematics', '2399', "Nivel 4")
        self.check_isr_overall_score_summary(1, 'ELA/Literacy', '1428', "Nivel 2")

        math_section = browser().find_element_by_id("individualStudentContent").find_element_by_id(
            "assessmentSection0")
        math_overall_score_content = "El estudiante ha excedido el estándar de rendimiento y demuestra el " \
                                     "conocimiento y las destrezas en matemáticas necesarios para el éxito " \
                                     "en cursos universitarios acreditados de nivel básico después de la " \
                                     "escuela secundaria."
        math_left_pane_content = {
            "psychometric": "Los niveles de rendimiento representan las calificaciones de los estudiantes "
                            "en la evaluación y las fortalezas y las áreas de oportunidad de los estudiantes. "
                            "Los resultados del examen son una de muchas medidas del rendimiento académico de "
                            "un estudiante.",
            "policy": "Los colegios y las universidades pueden usar las puntuaciones de Smarter Balanced como "
                      "evidencia de la preparación del estudiante para los cursos de nivel de entrada que "
                      "tienen crédito. Para mayor información, visite http://www.ncgov.com/"}
        self.check_content_areas(math_section, math_overall_score_content, math_left_pane_content)

        self.select_subject_view("ELA/Literacy")
        self.check_current_subject_view("ELA/Literacy")
        ela_section = browser().find_element_by_id("individualStudentContent").find_element_by_id(
            "assessmentSection1")
        ela_overall_score_content = "El estudiante casi alcanza el estándar de rendimiento y tal vez requiera " \
                                    "un mayor desarrollo para demostrar el conocimiento y las destrezas en artes " \
                                    "del lenguaje/alfabetización necesarios para el éxito en cursos universitarios " \
                                    "acreditados de nivel básico después de la escuela secundaria."
        ela_left_pane_content = {
            "psychometric": "Los niveles de rendimiento representan las calificaciones de los estudiantes en la "
                            "evaluación y las fortalezas y las áreas de oportunidad de los estudiantes. "
                            "Los resultados del examen son una de muchas medidas del rendimiento académico "
                            "de un estudiante.",
            "policy": "Los colegios y las universidades pueden usar las puntuaciones de Smarter Balanced como "
                      "evidencia de la preparación del estudiante para los cursos de nivel de entrada que "
                      "tienen crédito. Para mayor información, visite http://www.ncgov.com/"}
        self.check_content_areas(ela_section, ela_overall_score_content, ela_left_pane_content)
        print_popup_text = {'head': 'Imprimir',
                            'message_1': 'Escala de grises (usar para imprimir en blanco y negro)',
                            'message_2': 'Color', 'button': 'Imprimir'}
        self.language_check_isr_print_pdf_options(print_popup_text)

        # Check any random CA 11th grader gets the default higher ed link
        print("Grade 11 Individual Student Report: Testing higher ed link for CA")
        current_url = browser().current_url
        domain = current_url.split("/assets/")
        california_url = domain[0] + "/assets/html/comparingPopulations.html?stateCode=CA"
        browser().get(california_url)
Пример #38
0
    def test_ql_more_option(self):
        self.open_requested_page_redirects_login_page("state_view_sds")
        self.enter_login_credentials("mkgandhi", "mkgandhi1234")
        self.check_redirected_requested_page("state_view_sds")
        more_text = browser().find_element_by_id("quickLinks_expand_schools_0").find_element_by_class_name(
            "copy").text

        if more_text == 'more':
            browser().find_element_by_id("quickLinks_expand_schools_0").click()
            self.assertEqual(
                browser().find_element_by_id("quickLinks_expand_schools_0").find_element_by_class_name(
                    "copy").text,
                'less', 'After clicking more did not change to less')
            ql_school_names = browser().find_element_by_id("schools_1").find_element_by_class_name(
                "span9").find_elements_by_tag_name("li")
            actual_school_names = []
            for each in ql_school_names:
                actual_school_names.append(each.find_element_by_tag_name('a').text)
            expected_school_name = ['Sunset - Eastern Elementary']
            self.assertEqual(expected_school_name, actual_school_names,
                             "Actual schoold: {0} are not equal to Expected Schools: {1}".format(expected_school_name,
                                                                                                 actual_school_names))

        district_more_text = browser().find_element_by_id("quickLinks_expand_districts_0").find_element_by_class_name(
            "copy").text

        if district_more_text == 'more':
            browser().find_element_by_id("quickLinks_expand_districts_0").click()
            self.assertEqual(
                browser().find_element_by_id("quickLinks_expand_districts_0").find_element_by_class_name(
                    "copy").text,
                'less', 'After clicking more did not change to less')
Пример #39
0
 def test_invalid_credentials(self):
     save_message('TC: Enter invalid username and password and validate the invalid credentials functionality')
     self.open_requested_page_redirects_login_page("state_view_sds")
     login_page = browser().find_element_by_class_name("box-content")
     login_page.find_element_by_id("IDToken1").send_keys("invalid")
     login_page.find_element_by_id("IDToken2").send_keys("1234")
     login_page.find_element_by_name("Login.Submit").click()
     incorrect_login_msg = browser().find_element_by_class_name("clear-float").text
     expected_msg = "Invalid username/password combination. Please re-enter your credentials."
     self.assertIn(expected_msg,
                   incorrect_login_msg), "Invalid user/password redirect page displaying incorrect text"
Пример #40
0
 def find_element(self, locator):
     locator_type, locator = locator.split('=')
     try:
         if locator_type == 'class':
             return browser().find_element_by_class_name(locator)
         elif locator_type == 'id':
             return browser().find_element_by_id(locator)
         else:
             self.assertRaises("Provide correct element type")
     except NoSuchElementException:
         return False
 def get_cpop_columns(self, row_type, list_id, link_text):
     if row_type is "grid":
         all_columns = browser().find_element_by_class_name(
             "ui-jqgrid-bdiv").find_element_by_id(
                 list_id).find_elements_by_tag_name("td")
     elif row_type is "overall":
         all_columns = browser().find_element_by_class_name(
             "ui-jqgrid-ftable").find_elements_by_tag_name("td")
     self.assertIn(link_text,
                   str(all_columns[0].text)), "Incorrect Name displayed."
     return all_columns
Пример #42
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")
Пример #43
0
 def find_element(self, locator):
     locator_type, locator = locator.split('=')
     try:
         if locator_type == 'class':
             return browser().find_element_by_class_name(locator)
         elif locator_type == 'id':
             return browser().find_element_by_id(locator)
         else:
             self.assertRaises("Provide correct element type")
     except NoSuchElementException:
         return False
Пример #44
0
 def test_sad_path_invalid_parameters_isr(self):
     print(
         "Sad_Path: Invalid student id in the individual student report URL"
     )
     # Incorrect student id
     browser().get(
         self.get_url() +
         "/assets/html/indivStudentReport.html?studentId=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx"
     )
     self.enter_login_credentials("cdavis", "cdavis1234")
     self.check_error_msg()
    def test_grade_8_individual_student_report_Spanish(self):
        # Click on 'Sunset - Western Middle - Grade 8' school link from list of districts
        self.drill_down_navigation("228", "ui-jqgrid-ftable")
        self.drill_down_navigation("245", "ui-jqgrid-ftable")
        self.drill_down_navigation("08", "jqgfirstrow")
        self.select_academic_year_los_language(
            1,
            "Usted está viendo un año académico anterior. Regrese al 2015 - 2016.",
            "2014 - 2015")
        self.total_los_records(3)
        # Click on 'Wall E. Bass'' student link from list of students
        self.drill_down_navigation("jqg40", "overallScoreSection")

        self.check_page_header("Wall E. Bass | Grado 08")
        self.check_isr_overall_score_summary(0, 'Mathematics', '1967',
                                             "Nivel 3")
        self.check_isr_overall_score_summary(1, 'ELA/Literacy', '1373',
                                             "Nivel 1")

        math_section = browser().find_element_by_id(
            "individualStudentContent").find_element_by_id(
                "assessmentSection0")
        math_overall_score_content = "El estudiante ha cumplido con el estándar de rendimiento y demuestra un " \
                                     "progreso hacia el dominio del conocimiento y las destrezas en matemáticas " \
                                     "necesarios para el éxito en cursos universitarios acreditados de nivel " \
                                     "básico después de la escuela secundaria."
        math_left_pane_content = {
            "psychometric":
            "Los niveles de rendimiento representan las calificaciones de los estudiantes en "
            "la evaluación y las fortalezas y las áreas de oportunidad de los estudiantes. "
            "Los resultados del examen son una de muchas medidas del rendimiento académico "
            "de un estudiante."
        }
        self.check_content_areas(math_section, math_overall_score_content,
                                 math_left_pane_content)

        self.select_subject_view("ELA/Literacy")
        self.check_current_subject_view("ELA/Literacy")
        ela_section = browser().find_element_by_id(
            "individualStudentContent").find_element_by_id(
                "assessmentSection1")
        ela_overall_score_content = "El estudiante no ha alcanzado el estándar de rendimiento y necesita una " \
                                    "mejora sustancial para demostrar el conocimiento y las destrezas en artes " \
                                    "del lenguaje/alfabetización necesarios para el éxito en cursos universitarios " \
                                    "acreditados de nivel básico después de la escuela secundaria."
        ela_left_pane_content = {
            "psychometric":
            "Los niveles de rendimiento representan las calificaciones de los estudiantes en la "
            "evaluación y las fortalezas y las áreas de oportunidad de los estudiantes. "
            "Los resultados del examen son una de muchas medidas del rendimiento académico "
            "de un estudiante."
        }
        self.check_content_areas(ela_section, ela_overall_score_content,
                                 ela_left_pane_content)
Пример #46
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')
Пример #47
0
 def test_qunit_results_page(self):
     print("Qunit Tests: Running all Qunit tests.")
     browser().get(self.get_url() + EDWARE_QUNIT_URL)
     # wait for 15 seconds for the tests to run completely
     time.sleep(15)
     print(
         "TC_test_qunit_results_page: Validate that there are no qunit failures"
     )
     fail_span = browser().find_element_by_id("qunit-testresult")
     num_failures = fail_span.find_element_by_class_name("failed")
     assert num_failures.text == '0', "Found %s Qunit test failures" % num_failures.text
     print("Qunit Tests: Passed all Qunit tests.")
Пример #48
0
 def about_section(self):
     self.assertEqual("Learn More About Smarter Balanced Reporting:",
                      str(browser().find_element_by_id('about').find_element_by_tag_name("h3").text),
                      "About section header not found on landing page")
     aboutItems = browser().find_element_by_id('about').find_elements_by_tag_name('li')
     self.assertEqual(len(aboutItems), 3, "About section should contain 4 items")
     self.validate_each_about_section(aboutItems[0], "Annotated Reports",
                                      "How to use and interpret the Smarter Balanced Reports")
     self.validate_each_about_section(aboutItems[1], "Reporting Help",
                                      "Videos that illustrate how to use the reports")
     self.validate_each_about_section(aboutItems[2], "FAQ",
                                      "Frequently asked questions about the Smarter Balanced Reporting System")
Пример #49
0
 def check_headers(self, header1, header2):
     header_bar = browser().find_element_by_id("header")
     Help = header_bar.find_element_by_id('help')
     self.assertEqual(Help.find_element_by_class_name("text_help").text, 'Help', "Help not found in the header")
     print("Passed Scenario: Found 'Help' in the page header.")
     self.assertEqual(header_bar.find_element_by_id("username").text, header1, "Username not found in the header")
     print("Passed Scenario: Found 'User' in the page header.")
     time.sleep(1)
     browser().find_element_by_id('user-settings').click()
     self.assertEqual(header_bar.find_element_by_class_name("text_logout").text, header2,
                      "Logout not found in the header")
     print("Passed Scenario: Found 'Log Out' link in the page header.")
Пример #50
0
 def test_sad_path_invalid_field_name_los(self):
     print("Sad_Path: Invalid field name in the state view URL")
     # LOS - All parameters incorrect
     browser().get(
         self.get_url() + "/assets/html/studentList.html?school_Id=242&state_Code=NC&district_Id=228&asmt_Grade=3")
     self.enter_login_credentials("cdavis", "cdavis1234")
     self.check_error_msg()
     # LOS - schoolId and districtId invalid; other parameters valid
     browser().get(
         self.get_url() + "/assets/html/studentList.html?school_Id=242&stateCode=NC&district_Id=228&asmtGrade=3"
     )
     self.check_error_msg()
Пример #51
0
    def test_isr_switch_views(self):
        # Click on 'Sunset - Eastern Elementary - Grade 3' link from list of states
        self.drill_down_navigation("228", "ui-jqgrid-ftable")
        self.drill_down_navigation("242", "ui-jqgrid-ftable")
        self.drill_down_navigation("03", "jqgfirstrow")
        # Click on 'Lettie L Hose' student link from list of students
        self.drill_down_navigation("jqg26", "overallScoreSection")

        breadcrumb_list = ["North Carolina", "Sunset School District", "Sunset - Eastern Elementary", "Grade 03"]
        self.check_breadcrumb_hierarchy_links(breadcrumb_list)
        self.check_breadcrumb_trail("Lettie L. Hose's Results")

        print("Validate the default ISR view for Summative assessment type")
        self.check_current_selected_opportunity_isr("2016.04.10 · Grade 03 · Summative")
        self.check_page_header("Lettie L. Hose | Grade 03")
        self.check_isr_overall_score_summary(0, 'Mathematics', '1800', "Adequate Understanding")
        self.check_isr_overall_score_summary(1, 'ELA/Literacy', '2200', "Thorough Understanding")

        self.check_headers("Guy Man", "Log Out")
        math_info = browser().find_element_by_id("individualStudentContent").find_element_by_id(
            "assessmentSection0").find_element_by_class_name("sidebar")
        self.assertIn('Mathematics', math_info.text)
        self.assertIn('Summative 2015 - 2016', math_info.text)
        self.assertIn('Date Taken: 4/10/2016', math_info.text)

        self.select_subject_view("ELA/Literacy")
        self.check_current_subject_view("ELA/Literacy")
        ela_info = browser().find_element_by_id("individualStudentContent").find_element_by_id(
            "assessmentSection1").find_element_by_class_name("sidebar")
        self.assertIn('ELA/Literacy', ela_info.text)
        self.assertIn('Summative 2015 - 2016', ela_info.text)
        self.assertIn('Date Taken: 4/10/2016', ela_info.text)
        time.sleep(3)
        print("Switch to Interim Comprehensive View")
        self.select_opportunity_isr("2015.12.13 · Grade 03 · Interim Comprehensive")
        self.check_selected_asmt_type_isr("2015.12.13 · Grade 03 · Interim Comprehensive")
        self.validate_interim_disclaimer()
        no_results_msg = str(
            browser().find_element_by_id("individualStudentContent").find_element_by_class_name("no_data").text)
        self.assertEqual("There is no data available for your request.", no_results_msg,
                         "No results message not displayed correctly for the selected subject.")

        self.select_subject_view("Mathematics")
        self.check_current_subject_view("Mathematics")
        # Math and ELA assessment sections should always appear in the same order
        math_info = browser().find_element_by_id("individualStudentContent").find_element_by_id(
            "assessmentSection0").find_element_by_class_name("sidebar")
        self.assertIn('Mathematics', math_info.text)
        self.assertIn('Interim Comprehensive 2015 - 2016', math_info.text)
        self.assertIn('Date Taken: 12/13/2015', math_info.text)
        self.validate_interim_disclaimer()
Пример #52
0
 def test_sad_path_invalid_report_name(self):
     print("Sad_Path: Invalid report name in the state view URL")
     # LOS - All parameters incorrect
     browser().get(
         self.get_url() +
         "/assets/html/XXXXXXX.html?school_Id=242&state_Code=NC&district_Id=228&asmt_Grade=3"
     )
     self.check_error_msg()
     # LOS - schoolId and districtId invalid; other parameters valid
     browser().get(
         self.get_url() +
         "/assets/html/comparingPopulations000000.html?stateCode=NC&districtId=999"
     )
     self.check_error_msg()
    def test_iab_ela_only(self):
        self.drill_down_navigation("228", "ui-jqgrid-ftable")
        # Click on 'Sunset - Central High- Grade 11' school link from list of districts
        self.drill_down_navigation("248", "ui-jqgrid-ftable")
        self.drill_down_navigation("11", "jqgfirstrow")
        self.select_academic_year_los(6, "2014 - 2015")
        # Click on 'Verna Patterson' student link from list of students
        self.drill_down_navigation("jqg41", "overallScoreSection")

        breadcrumb_list = [
            "North Carolina", "Sunset School District", "Sunset Central High",
            "Grade 11"
        ]
        self.check_breadcrumb_hierarchy_links(breadcrumb_list)
        self.check_breadcrumb_trail("Verna Patterson's Results")

        print("Validate the IAB results")
        self.select_opportunity_isr("2014 - 2015 · Interim Assessment Blocks")
        self.check_selected_asmt_type_isr(
            "2014 - 2015 · Interim Assessment Blocks")
        self.validate_interim_disclaimer()
        no_results_iab_header = str(
            browser().find_element_by_id("individualStudentContent").
            find_element_by_class_name("isrInterimBlockHeader").text)
        self.assertEqual(
            "There is no data available for your request.",
            no_results_iab_header,
            "No results message not displayed correctly for Math")

        self.select_iab_subject("ELA/Literacy")
        iab_header = str(browser().find_element_by_id(
            "individualStudentContent").find_element_by_class_name(
                "ELA").find_element_by_class_name("isrInterimBlockHeader").
                         find_element_by_class_name("info").text)
        self.assertEqual("Interim Assessment Blocks 2014 - 2015", iab_header,
                         "IAB header incorrectly displayed.")
        ela_iab_blocks = browser().find_element_by_id(
            "individualStudentContent").find_element_by_class_name(
                "ELA").find_element_by_class_name(
                    "blocksSection").find_elements_by_class_name('blocks')
        self.assertEqual(3, len(ela_iab_blocks),
                         "Invalid number of IAB's found")
        # Validate an IAB with 5 assessment results
        self.verify_iab_title_score(ela_iab_blocks[0], "Grade 11:",
                                    "Brief Writes", "2015.02.10",
                                    "Below Standard")
        self.verify_iab_previous_results(ela_iab_blocks[0], 1,
                                         [{
                                             "2015.01.31": "Below Standard"
                                         }])
Пример #54
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"))