5url = "http://localhost:11111/"
8def test_index(browser):
11 assert browser.is_text_present('about')
16 browser.visit(url + 'missing_link')
17 assert browser.is_text_present('Page not found')
20def test_about(browser):
22 browser.click_link_by_text('about')
23 assert browser.is_text_present('Why use searx?')
26def test_preferences(browser):
28 browser.click_link_by_text('preferences')
29 assert browser.is_text_present('Preferences')
30 assert browser.is_text_present('Cookies')
32 assert browser.is_element_present_by_xpath('//label[@for="checkbox_dummy"]')
35def test_preferences_engine_select(browser):
37 browser.click_link_by_text('preferences')
39 assert browser.is_element_present_by_xpath('//a[@href="#tab_engine"]')
40 browser.find_by_xpath('//a[@href="#tab_engine"]').first.click()
42 assert not browser.find_by_xpath('//input[@id="engine_general_dummy__general"]').first.checked
43 browser.find_by_xpath('//label[@for="engine_general_dummy__general"]').first.check()
44 browser.find_by_xpath('//input[@value="save"]').first.click()
46 # waiting for the redirect - without this the test is flaky..
50 browser.click_link_by_text('preferences')
51 browser.find_by_xpath('//a[@href="#tab_engine"]').first.click()
53 assert browser.find_by_xpath('//input[@id="engine_general_dummy__general"]').first.checked
56def test_preferences_locale(browser):
58 browser.click_link_by_text('preferences')
60 browser.select('locale', 'hu')
61 browser.find_by_xpath('//input[@value="save"]').first.click()
63 # waiting for the redirect - without this the test is flaky..
67 browser.click_link_by_text('beállítások')
68 browser.is_text_present('Beállítások')
71def test_search(browser):
73 browser.fill('q', 'test search query')
74 browser.find_by_xpath('//button[@type="submit"]').first.click()
75 assert browser.is_text_present('didn\'t find any results')
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list