def test_that_only_plugin_reports_have_plugin_icon(self, mozwebqa): csp = CrashStatsHomePage(mozwebqa) reports_page = csp.click_last_product_top_crashers_link() type, days, os = 'Plugin', '28', 'Windows' reports_page.click_filter_by(type) reports_page.click_filter_days_by(days) reports_page.click_filter_os_by(os) Assert.equal( (type, days, os), (reports_page.current_filter_type, reports_page.current_days_filter, reports_page.current_os_filter)) signature_list_items = reports_page.signature_items Assert.true( len(signature_list_items) > 0, "Signature list items not found") for signature_item in signature_list_items[:min( signature_list_items, 24)]: Assert.true( signature_item.is_plugin_icon_visible, "Signature %s did not have a plugin icon" % signature_item.title) Assert.false( signature_item.is_browser_icon_visible, "Signature %s unexpectedly had a browser icon" % signature_item.title)
def test_search_for_valid_signature(self, base_url, selenium): csp = CrashStatsHomePage(base_url, selenium) report_list = csp.click_last_product_top_crashers_link() signature = report_list.first_signature_title result = csp.header.search_for_crash(signature) assert result.are_search_results_found
def test_top_crasher_reports_tab_has_uuid_report(self, mozwebqa): csp = CrashStatsHomePage(mozwebqa) top_crashers = csp.click_last_product_top_crashers_link() crash_signature = top_crashers.click_first_signature() crash_signature.click_reports_tab() reports_table_count = len(crash_signature.reports) # verify crash reports table is populated Assert.greater(crash_signature.results_count_total, 0) Assert.greater(reports_table_count, 0, "No reports found") most_recent_report = crash_signature.reports[0] uuid_report = most_recent_report.click_report_date() # verify the uuid report page Assert.not_equal(uuid_report.uuid_in_body, "", "UUID not found in body") Assert.not_equal(uuid_report.uuid_in_table, "", "UUID not found in table") Assert.not_equal(uuid_report.signature_in_body, "", "Signature not found in body") Assert.not_equal(uuid_report.signature_in_table, "", "Signature not found in table") Assert.equal(uuid_report.uuid_in_body, uuid_report.uuid_in_table, 'UUID in body did not match the UUID in the table: ' 'body "%s", table "%s"' % (uuid_report.uuid_in_body, uuid_report.uuid_in_table)) Assert.contains(uuid_report.signature_in_body, uuid_report.signature_in_table, 'Signature in body did not match the signature in the ' 'table: body "%s", table "%s"' % (uuid_report.signature_in_body, uuid_report.signature_in_table))
def test_that_search_for_valid_signature(self, mozwebqa): csp = CrashStatsHomePage(mozwebqa) report_list = csp.click_last_product_top_crashers_link() signature = report_list.first_signature_title result = csp.header.search_for_crash(signature) Assert.true(result.are_results_found)
def test_that_only_browser_reports_have_browser_icon(self, mozwebqa): """ https://www.pivotaltracker.com/story/show/17099455 """ csp = CrashStatsHomePage(mozwebqa) reports_page = csp.click_last_product_top_crashers_link() type, days, os = 'Browser', '7', 'Windows' Assert.equal(reports_page.current_filter_type, type) reports_page.click_filter_days_by(days) reports_page.click_filter_os_by(os) Assert.equal( (type, days, os), (reports_page.current_filter_type, reports_page.current_days_filter, reports_page.current_os_filter)) signature_list_items = reports_page.random_signature_items(19) Assert.true( len(signature_list_items) > 0, "Signature list items not found") for signature_item in signature_list_items: Assert.true( signature_item.is_browser_icon_visible, "Signature %s did not have a browser icon" % signature_item.title) Assert.false( signature_item.is_plugin_icon_visible, "Signature %s unexpectedly had a plugin icon" % signature_item.title)
def test_search_for_valid_signature(self, mozwebqa): csp = CrashStatsHomePage(mozwebqa) report_list = csp.click_last_product_top_crashers_link() signature = report_list.first_signature_title result = csp.header.search_for_crash(signature) Assert.true(result.are_search_results_found)
def test_that_only_plugin_reports_have_plugin_icon(self, mozwebqa): """ https://www.pivotaltracker.com/story/show/17099455 """ csp = CrashStatsHomePage(mozwebqa) reports_page = csp.click_last_product_top_crashers_link() type, days, os = "Plugin", "28", "Mac OS X" reports_page.click_filter_by(type) reports_page.click_filter_days_by(days) reports_page.click_filter_os_by(os) Assert.equal( (type, days, os), (reports_page.current_filter_type, reports_page.current_days_filter, reports_page.current_os_filter), ) signature_list_items = reports_page.signature_items Assert.true(len(signature_list_items) > 0, "Signature list items not found") for signature_item in signature_list_items: Assert.true( signature_item.is_plugin_icon_visible, "Signature %s did not have a plugin icon" % signature_item.title ) Assert.false( signature_item.is_browser_icon_visible, "Signature %s unexpectedly had a browser icon" % signature_item.title, )
def test_that_search_for_valid_signature(self, mozwebqa): """ This is a test for https://bugzilla.mozilla.org/show_bug.cgi?id=609070 """ csp = CrashStatsHomePage(mozwebqa) report_list = csp.click_last_product_top_crashers_link() signature = report_list.first_signature_title result = csp.header.search_for_crash(signature) Assert.true(result.are_results_found)
def test_that_only_plugin_reports_have_plugin_icon(self, mozwebqa): csp = CrashStatsHomePage(mozwebqa) reports_page = csp.click_last_product_top_crashers_link() type, days, os = 'Plugin', '28', 'Windows' reports_page.click_filter_by(type) reports_page.click_filter_days_by(days) reports_page.click_filter_os_by(os) Assert.equal((type, days, os), (reports_page.current_filter_type, reports_page.current_days_filter, reports_page.current_os_filter)) signature_list_items = reports_page.signature_items Assert.true(len(signature_list_items) > 0, "Signature list items not found") for signature_item in signature_list_items[:min(signature_list_items, 24)]: Assert.true(signature_item.is_plugin_icon_visible, "Signature %s did not have a plugin icon" % signature_item.title) Assert.false(signature_item.is_browser_icon_visible, "Signature %s unexpectedly had a browser icon" % signature_item.title)
def test_selecting_one_version_doesnt_show_other_versions(self, mozwebqa): maximum_checks = 20 # limits the number of reports to check csp = CrashStatsHomePage(mozwebqa) product = csp.header.current_product versions = csp.header.current_versions version = str(versions[1]) csp.header.select_version(version) report_list = csp.click_last_product_top_crashers_link() crash_report_page = report_list.click_first_signature() crash_report_page.click_reports_tab() reports = crash_report_page.reports Assert.true(len(reports) > 0, "reports not found for signature") random_indexes = csp.get_random_indexes(reports, maximum_checks) for index in random_indexes: report = reports[index] Assert.equal(report.product, product)
def test_selecting_one_version_doesnt_show_other_versions(self, base_url, selenium): maximum_checks = 20 # limits the number of reports to check csp = CrashStatsHomePage(base_url, selenium) product = csp.header.current_product versions = csp.header.current_versions version = str(versions[1]) csp.header.select_version(version) report_list = csp.click_last_product_top_crashers_link() crash_report_page = report_list.click_first_signature() crash_report_page.click_reports_tab() reports = crash_report_page.reports assert len(reports) > 0, 'reports not found for signature' random_indexes = csp.get_random_indexes(reports, maximum_checks) for index in random_indexes: report = reports[index] assert product == report.product
def test_selecting_one_version_doesnt_show_other_versions( self, base_url, selenium): maximum_checks = 20 # limits the number of reports to check csp = CrashStatsHomePage(base_url, selenium) product = csp.header.current_product versions = csp.header.current_versions version = str(versions[1]) csp.header.select_version(version) report_list = csp.click_last_product_top_crashers_link() crash_report_page = report_list.click_first_signature() crash_report_page.click_reports_tab() reports = crash_report_page.reports assert len(reports) > 0, 'reports not found for signature' random_indexes = csp.get_random_indexes(reports, maximum_checks) for index in random_indexes: report = reports[index] assert product == report.product
def test_that_only_browser_reports_have_browser_icon(self, mozwebqa): csp = CrashStatsHomePage(mozwebqa) reports_page = csp.click_last_product_top_crashers_link() product_type, days, os = 'Browser', '7', 'Windows' assert product_type == reports_page.current_filter_type reports_page.click_filter_days_by(days) reports_page.click_filter_os_by(os) assert product_type == reports_page.current_filter_type assert days == reports_page.current_days_filter assert os == reports_page.current_os_filter signature_list_items = reports_page.random_signature_items(19) assert len(signature_list_items) > 0, 'Signature list items not found' for signature_item in signature_list_items: assert (signature_item.is_browser_icon_visible), \ "Signature %s did not have a browser icon" % signature_item.title assert (not signature_item.is_plugin_icon_visible), \ "Signature %s unexpectedly had a plugin icon" % signature_item.title
def test_that_only_browser_reports_have_browser_icon(self, base_url, selenium): csp = CrashStatsHomePage(base_url, selenium) reports_page = csp.click_last_product_top_crashers_link() product_type, days, os = 'Browser', '7', 'Windows' assert product_type == reports_page.current_filter_type reports_page.click_filter_days_by(days) reports_page.click_filter_os_by(os) assert product_type == reports_page.current_filter_type assert days == reports_page.current_days_filter assert os == reports_page.current_os_filter signature_list_items = reports_page.random_signature_items(19) assert len(signature_list_items) > 0, 'Signature list items not found' for signature_item in signature_list_items: assert (signature_item.is_browser_icon_visible), \ "Signature %s did not have a browser icon" % signature_item.title assert (not signature_item.is_plugin_icon_visible), \ "Signature %s unexpectedly had a plugin icon" % signature_item.title
def test_that_only_plugin_reports_have_plugin_icon(self, mozwebqa): csp = CrashStatsHomePage(mozwebqa) reports_page = csp.click_last_product_top_crashers_link() product_type, days, os = 'Plugin', '28', 'Windows' reports_page.click_filter_by(product_type) reports_page.click_filter_days_by(days) reports_page.click_filter_os_by(os) assert product_type == reports_page.current_filter_type assert days == reports_page.current_days_filter assert os == reports_page.current_os_filter signature_list_items = reports_page.signature_items assert len(signature_list_items) > 0, 'Signature list items not found' for signature_item in signature_list_items[:min(signature_list_items, 24)]: assert (signature_item.is_plugin_icon_visible), \ "Signature %s did not have a plugin icon" % signature_item.title assert (not signature_item.is_browser_icon_visible), \ "Signature %s unexpectedly had a browser icon" % signature_item.title
def test_that_only_plugin_reports_have_plugin_icon(self, base_url, selenium): csp = CrashStatsHomePage(base_url, selenium) reports_page = csp.click_last_product_top_crashers_link() product_type, days, os = 'Plugin', '28', 'Windows' reports_page.click_filter_by(product_type) reports_page.click_filter_days_by(days) reports_page.click_filter_os_by(os) assert product_type == reports_page.current_filter_type assert days == reports_page.current_days_filter assert os == reports_page.current_os_filter signature_list_items = reports_page.signature_items assert len(signature_list_items) > 0, 'Signature list items not found' for signature_item in signature_list_items[:min( signature_list_items, 24)]: assert (signature_item.is_plugin_icon_visible), \ "Signature %s did not have a plugin icon" % signature_item.title assert (not signature_item.is_browser_icon_visible), \ "Signature %s unexpectedly had a browser icon" % signature_item.title
def test_top_crasher_reports_tab_has_uuid_report(self, mozwebqa): csp = CrashStatsHomePage(mozwebqa) top_crashers = csp.click_last_product_top_crashers_link() crash_signature = top_crashers.click_first_signature() crash_signature.click_reports_tab() reports_table_count = len(crash_signature.reports) # verify crash reports table is populated assert crash_signature.results_count_total > 0 assert reports_table_count > 0, 'No reports found' most_recent_report = crash_signature.reports[0] uuid_report = most_recent_report.click_report_date() # verify the uuid report page assert '' != uuid_report.uuid_in_body, 'UUID not found in body' assert '' != uuid_report.uuid_in_table, 'UUID not found in table' assert '' != uuid_report.signature_in_body, 'Signature not found in body' assert '' != uuid_report.signature_in_table, 'Signature not found in table' assert (uuid_report.uuid_in_body == uuid_report.uuid_in_table), \ 'UUID in body did not match the UUID in the table' assert (uuid_report.signature_in_body in uuid_report.signature_in_table), \ 'Signature in body did not match the signature in the '
def test_top_crasher_reports_tab_has_uuid_report(self, base_url, selenium): csp = CrashStatsHomePage(base_url, selenium) top_crashers = csp.click_last_product_top_crashers_link() crash_signature = top_crashers.click_first_signature() crash_signature.click_reports_tab() reports_table_count = len(crash_signature.reports) # verify crash reports table is populated assert crash_signature.results_count_total > 0 assert reports_table_count > 0, 'No reports found' most_recent_report = crash_signature.reports[0] uuid_report = most_recent_report.click_report_date() # verify the uuid report page assert '' != uuid_report.uuid_in_body, 'UUID not found in body' assert '' != uuid_report.uuid_in_table, 'UUID not found in table' assert '' != uuid_report.signature_in_body, 'Signature not found in body' assert '' != uuid_report.signature_in_table, 'Signature not found in table' assert (uuid_report.uuid_in_body == uuid_report.uuid_in_table), \ 'UUID in body did not match the UUID in the table' assert (uuid_report.signature_in_body in uuid_report.signature_in_table), \ 'Signature in body did not match the signature in the '