Example #1
0
def test_filter_themes(base_url, selenium):
    page = Home(selenium, base_url).open()
    term = 'fox'
    page.search.search_for(term)
    search_page = Search(selenium, base_url)
    select = Select(search_page.filter_by_type)
    select.select_by_value('statictheme')
    search_page.wait_for_contextcard_update("themes")
    assert len(search_page.result_list.themes) == 25
def test_themes_categories(base_url, selenium, count, category):
    themes = Themes(selenium, base_url).open()
    # clicking through each Theme Category
    themes.categories.category_list[count].click()
    category_results = Search(selenium, base_url)
    # checking that search results within that category are sorted correctly
    category_results.wait_for_contextcard_update(category)
    select = Select(category_results.filter_by_sort)
    assert 'Most Users' in select.first_selected_option.text
def test_extensions_categories(base_url, selenium, count, category):
    extensions = Extensions(selenium, base_url).open()
    # clicking through each Category listed on Extensions homepage
    extensions.categories.category_list[count].click()
    category_results = Search(selenium, base_url)
    # checking that category search results are loaded and sorted by users
    category_results.wait_for_contextcard_update(category)
    select = Select(category_results.filter_by_sort)
    assert 'Most Users' in select.first_selected_option.text
Example #4
0
def test_theme_categories_shelf(base_url, selenium, count, category):
    page = Home(selenium, base_url).open()
    # verifying the elements present in the homepage Theme Category shelf
    assert 'Change the way Firefox looks' in page.theme_category.shelf_summary
    categories = page.theme_category.list
    categories[count].category_icon.is_displayed()
    assert category in categories[count].name
    # checking that search results within that category are loaded
    categories[count].click()
    category_results = Search(selenium, base_url)
    category_results.wait_for_contextcard_update(category)
Example #5
0
def test_filter_promoted(base_url, selenium, sort_attr, title):
    page = Home(selenium, base_url).open()
    term = ""
    page.search.search_for(term)
    search_page = Search(selenium, base_url)
    select = Select(search_page.filter_by_badging)
    select.select_by_value(sort_attr)
    search_page.wait_for_contextcard_update('results found')
    results = search_page.result_list.extensions
    for result in results:
        assert result.promoted_badge
        if title != 'Reviewed':
            assert title.title() in result.promoted_badge_label