Exemplo n.º 1
0
 def __init__(self, driver=None):
     super(SimplePage, self).__init__(driver=driver, url=tests.get_url('simple_page.html'))
 def test_custom_elements(self):
     hrefs = [a.get_href() for a in self.page.anchor_list if a.get_href()]
     eq_(hrefs[0], get_url('resultPage.html'))
Exemplo n.º 3
0
 def test_unable_to_save_with_invalid_data(self):
     "Should be unable to save a dojo when providing invalid data"
     self.browser.visit(get_url("/dojo/new"))
     self.browser.find_by_css('input[type=submit]').first.click()
     assert self.browser.is_element_present_by_css('.validation-errors')
Exemplo n.º 4
0
 def test_form_add_dojo(self):
     "Should show a form on /dojo/new url"
     self.browser.visit(get_url("/dojo/new"))
     assert self.browser.is_element_present_by_css('form#new-dojo')
Exemplo n.º 5
0
class TestWithStaticUrl(BasePage):
    url = tests.get_url('simple_page.html')
Exemplo n.º 6
0
 def test_form_add_dojo(self):
     "Should show a form on /dojo/new url"
     self.browser.visit(get_url("/dojo/new"))
     assert self.browser.is_element_present_by_css('form#new-dojo')
Exemplo n.º 7
0
 def test_custom_elements(self):
     anchors = self.page.anchor_list
     eq_(filter(lambda x: x.get_href(), anchors)[0].get_href(), get_url('resultPage.html'))
Exemplo n.º 8
0
 def test_get_src(self):
     eq_(self.page.valid_image.get_src(), get_url("icon.gif"))
Exemplo n.º 9
0
 def test_link(self):
     assert self.page.icon_link.get_href() == get_url('icon.gif')
Exemplo n.º 10
0
 def __init__(self):
     super(AlertPage, self).__init__(url=get_url('alerts.html'))
Exemplo n.º 11
0
 def test_get_src(self):
     eq_(self.page.valid_image.get_src(), get_url("icon.gif"))
Exemplo n.º 12
0
 def test_custom_elements(self):
     anchors = self.page.anchor_list
     assert list(
         filter(lambda x: x.get_href(),
                anchors))[0].get_href() == get_url('resultPage.html')
Exemplo n.º 13
0
 def __init__(self):
     super(SimplePage, self).__init__(url=tests.get_url('simple_page.html'))
Exemplo n.º 14
0
 def test_custom_elements(self):
     anchors = self.page.anchor_list
     eq_(
         next(filter(lambda x: x.get_href(), anchors)).get_href(),
         get_url('resultPage.html'))
Exemplo n.º 15
0
 def test_inner_search(self):
     eq_(self.page.div_list[11].first_link.get_href(), get_url('resultPage.html'))
Exemplo n.º 16
0
 def test_inner_search(self):
     eq_(self.page.div_list[11].first_link.get_href(),
         get_url('resultPage.html'))
Exemplo n.º 17
0
 def test_unable_to_save_with_invalid_data(self):
     "Should be unable to save a dojo when providing invalid data"
     self.browser.visit(get_url("/dojo/new"))
     self.browser.find_by_css('input[type=submit]').first.click()
     assert self.browser.is_element_present_by_css('.validation-errors')
Exemplo n.º 18
0
 def test_link(self):
     eq_(self.page.icon_link.get_href(), get_url('icon.gif'))
Exemplo n.º 19
0
 def __init__(self):
     super(SimplePage, self).__init__(url=tests.get_url('simple_page.html'))