示例#1
0
def summary_page():
    browser = selenium.webdriver.Chrome()
    browser.implicitly_wait(10)
    summary_page = SummaryPage(browser)
    summary_page.load()
    yield summary_page
    browser.quit()
def test_ignore_missing(summary_page: SummaryPage, clean_ignore_states):
    summary_page.click_address('Missing Street', '2')
    summary_page.ignore('building does not exist')
    summary_page.click_address('Identical Street', '7')
    summary_page.close_tool_window(
    )  # otherwise Missing Street 2 would be hidden, and could not be clicked
    summary_page.click_address('Missing Street', '2')
    assert summary_page.ignore_reason_selected('building does not exist')
    summary_page.recompute()
    summary_page.click_address('Missing Street', '2')
    assert summary_page.ignore_reason_selected('building does not exist')
def test_not_ignore_missing_anymore(summary_page: SummaryPage,
                                    clean_ignore_states):
    summary_page.recompute()
    summary_page.click_address('Missing Street', '3')
    assert summary_page.ignore_reason_selected('building does not exist')
    summary_page.not_ignore()
    assert summary_page.not_ignored()
    summary_page.recompute()
    summary_page.click_address('Missing Street', '3')
    assert summary_page.not_ignored()
示例#4
0
def test_hide_and_show(summary_page: SummaryPage):
    assert summary_page.any_visible('matches')
    summary_page.toggle_column('matches')
    assert not summary_page.any_visible('matches')
    summary_page.toggle_column('matches')
    assert summary_page.any_visible('matches')

    assert summary_page.any_visible('missing')
    summary_page.toggle_column('missing')
    assert not summary_page.any_visible('missing')
    summary_page.toggle_column('missing')
    assert summary_page.any_visible('missing')

    assert summary_page.any_visible('surplus')
    summary_page.toggle_column('surplus')
    assert not summary_page.any_visible('surplus')
    summary_page.toggle_column('surplus')
    assert summary_page.any_visible('surplus')
def test_recompute(summary_page: SummaryPage):
    summary_page.recompute()
    assert summary_page.shows_recent_generation_time()
def test_close_tool_window(summary_page: SummaryPage):
    summary_page.click_address('Identical Street', '1')
    assert summary_page.tool_window_visible()
    summary_page.close_tool_window()
    assert not summary_page.tool_window_visible()
def test_open_tool_window_on_match(summary_page: SummaryPage):
    assert not summary_page.tool_window_visible()
    summary_page.click_address('Identical Street', '1')
    assert summary_page.tool_window_visible()
def test_show_on_osm_on_surplus(summary_page: SummaryPage):
    summary_page.click_address('Surplus Street', '4')
    summary_page.show_on_osm()
    assert summary_page.osm_tab_opened_on_primitive('node', 31)
def test_show_on_osm_on_missing(summary_page: SummaryPage):
    summary_page.click_address('Missing Street', '2')
    summary_page.show_on_osm()
    assert summary_page.osm_tab_opened_on_location('2.10000/2.20000')
def test_show_on_osm_on_match(summary_page: SummaryPage):
    summary_page.click_address('Identical Street', '1')
    summary_page.show_on_osm()
    assert summary_page.osm_tab_opened_on_primitive('way', 1)