@pytest.mark.nondestructive
def test_feedback_can_be_filtered_by_all_products_and_versions(self, mozwebqa):
    "Tests product filtering in dashboard\n\n        1. Verify that at least one product exists\n        2. Verify that filtering by product returns results\n        3. Verify that versions show up when you choose a product\n        4. Verify that the state of the filters are correct after being applied\n        5. Verify product and version values in the URL\n\n        NB: We don't cycle through all product/version\n        combinations--only the first two of each.\n\n        "
    dashboard_pg = DashboardPage(mozwebqa)
    dashboard_pg.go_to_dashboard_page()
    total_messages = dashboard_pg.total_message_count
    products = dashboard_pg.product_filter.products
    Assert.greater(len(products), 0)
    for product in products[:2]:
        if (not product):
            continue
        dashboard_pg.product_filter.select_product(product)
        Assert.greater(total_messages, dashboard_pg.total_message_count)
        versions = dashboard_pg.product_filter.versions
        Assert.greater(len(versions), 0)
        for version in versions[:2]:
            if (not version):
                continue
            dashboard_pg.product_filter.select_version(version)
            Assert.greater(total_messages, dashboard_pg.total_message_count)
            Assert.equal(dashboard_pg.product_filter.selected_product, product)
            Assert.equal(dashboard_pg.product_filter.selected_version, version)
            Assert.equal(dashboard_pg.product_from_url, product)
            Assert.equal(dashboard_pg.version_from_url, version)
            Assert.greater(len(dashboard_pg.messages), 0)
            dashboard_pg.product_filter.unselect_version(version)
        dashboard_pg.product_filter.unselect_product(product)
Tests product filtering in dashboard

1. Verify that at least one product exists
2. Verify that filtering by product returns results
3. Verify that versions show up when you choose a product
4. Verify that the state of the filters are correct after being applied
5. Verify product and version values in the URL

NB: We don't cycle through all product/version
combinations--only the first two of each.
@pytest.mark.nondestructive
def test_feedback_can_be_filtered_by_all_products_and_versions(self, mozwebqa):
    "Tests product filtering in dashboard\n\n        1. Verify that at least one product exists\n        2. Verify that filtering by product returns results\n        3. Verify that versions show up when you choose a product\n        4. Verify that the state of the filters are correct after being applied\n        5. Verify product and version values in the URL\n\n        NB: We don't cycle through all product/version\n        combinations--only the first two of each.\n\n        "
    dashboard_pg = DashboardPage(mozwebqa)
    dashboard_pg.go_to_dashboard_page()
    total_messages = dashboard_pg.total_message_count
    products = dashboard_pg.product_filter.products
    Assert.greater(len(products), 0)
    for product in products[:2]:
        if (not product):
            continue
        dashboard_pg.product_filter.select_product(product)
        Assert.greater(total_messages, dashboard_pg.total_message_count)
        versions = dashboard_pg.product_filter.versions
        Assert.greater(len(versions), 0)
        for version in versions[:2]:
            if (not version):
                continue
            dashboard_pg.product_filter.select_version(version)
            Assert.greater(total_messages, dashboard_pg.total_message_count)
            Assert.equal(dashboard_pg.product_filter.selected_product, product)
            Assert.equal(dashboard_pg.product_filter.selected_version, version)
            Assert.equal(dashboard_pg.product_from_url, product)
            Assert.equal(dashboard_pg.version_from_url, version)
            Assert.greater(len(dashboard_pg.messages), 0)
            dashboard_pg.product_filter.unselect_version(version)
        dashboard_pg.product_filter.unselect_product(product)