@markers.webview
@markers.test_case('C132547', 'C132548')
@markers.nondestructive
@markers.parametrize('page_uuid,is_baked_book_index', [('bb62933e-f20a-4ffc-90aa-97b36c296c3e:85036aed-fa1a-5d51-a9c2-c07ee673488d', True), ('6a0568d8-23d7-439b-9a01-16e4e73886b3', False)])
def test_id_links_and_back_button(page_uuid, is_baked_book_index, webview_base_url, selenium):
    content_page = Content(selenium, webview_base_url, id=page_uuid).open()
    content_url = content_page.current_url
    assert ('#' not in content_url)
    content_region = content_page.content_region
    if is_baked_book_index:
        content_page = content_region.click_index_term()
    else:
        content_page = content_region.click_anchor_link(internal_only=True)
        assert content_page.current_url.startswith(content_url)
    new_url = content_page.current_url
    assert ('#' in new_url)
    id = re.search('#(.+)$', new_url)[1]
    assert id
    assert content_page.is_element_id_displayed(id)
    content_page.back()
    assert (content_page.current_url == content_url)
@markers.webview
@markers.test_case('C132547', 'C132548')
@markers.nondestructive
@markers.parametrize('page_uuid,is_baked_book_index', [('bb62933e-f20a-4ffc-90aa-97b36c296c3e:85036aed-fa1a-5d51-a9c2-c07ee673488d', True), ('6a0568d8-23d7-439b-9a01-16e4e73886b3', False)])
def test_id_links_and_back_button(page_uuid, is_baked_book_index, webview_base_url, selenium):
    content_page = Content(selenium, webview_base_url, id=page_uuid).open()
    content_url = content_page.current_url
    assert ('#' not in content_url)
    content_region = content_page.content_region
    if is_baked_book_index:
        content_page = content_region.click_index_term()
    else:
        content_page = content_region.click_anchor_link(internal_only=True)
        assert content_page.current_url.startswith(content_url)
    new_url = content_page.current_url
    assert ('#' in new_url)
    id = re.search('#(.+)$', new_url)[1]
    assert id
    assert content_page.is_element_id_displayed(id)
    content_page.back()
    assert (content_page.current_url == content_url)