@markers.webview
@markers.smoke
@markers.test_case('C176241')
@markers.nondestructive
def test_back_to_top(webview_base_url, selenium):
    home = Home(selenium, webview_base_url).open()
    book = home.featured_books.openstax_list[59]
    content = book.click_book_cover()
    footer = content.content_footer
    content_header = content.content_header
    original_content_header_y = content_header.root.location['y']
    content = footer.nav.click_back_to_top_link()
    assert content.header.is_nav_displayed
    assert content_header.is_displayed
    assert content_header.is_title_displayed
    assert content_header.is_book_by_displayed
    assert content_header.is_share_displayed
    header_nav = content_header.nav
    assert header_nav.is_contents_button_displayed
    assert header_nav.is_searchbar_displayed
    assert header_nav.is_back_link_displayed
    assert header_nav.is_progress_bar_displayed
    assert header_nav.is_next_link_displayed
    assert content.is_section_title_displayed
    share = content.share
    assert share.is_displayed
    assert share.is_facebook_share_link_displayed
    assert share.is_twitter_share_link_displayed
    assert footer.is_displayed
    assert footer.is_downloads_tab_displayed
    assert footer.is_history_tab_displayed
    assert footer.is_attribution_tab_displayed
    assert footer.is_more_information_tab_displayed
    assert (not content_header.is_pinned)
    assert (content_header.root.location['y'] == original_content_header_y)
@markers.webview
@markers.smoke
@markers.test_case('C176241')
@markers.nondestructive
def test_back_to_top(webview_base_url, selenium):
    home = Home(selenium, webview_base_url).open()
    book = home.featured_books.openstax_list[59]
    content = book.click_book_cover()
    footer = content.content_footer
    content_header = content.content_header
    original_content_header_y = content_header.root.location['y']
    content = footer.nav.click_back_to_top_link()
    assert content.header.is_nav_displayed
    assert content_header.is_displayed
    assert content_header.is_title_displayed
    assert content_header.is_book_by_displayed
    assert content_header.is_share_displayed
    header_nav = content_header.nav
    assert header_nav.is_contents_button_displayed
    assert header_nav.is_searchbar_displayed
    assert header_nav.is_back_link_displayed
    assert header_nav.is_progress_bar_displayed
    assert header_nav.is_next_link_displayed
    assert content.is_section_title_displayed
    share = content.share
    assert share.is_displayed
    assert share.is_facebook_share_link_displayed
    assert share.is_twitter_share_link_displayed
    assert footer.is_displayed
    assert footer.is_downloads_tab_displayed
    assert footer.is_history_tab_displayed
    assert footer.is_attribution_tab_displayed
    assert footer.is_more_information_tab_displayed
    assert (not content_header.is_pinned)
    assert (content_header.root.location['y'] == original_content_header_y)