Fakultas Ilmu Komputer UI

Commit a3f040e4 authored by Syahrul Ardiansyah's avatar Syahrul Ardiansyah
Browse files

first steps of FT for layout + styling

parent 1dc51d9f
...@@ -102,3 +102,27 @@ class NewVisitorTest(LiveServerTestCase): ...@@ -102,3 +102,27 @@ class NewVisitorTest(LiveServerTestCase):
# that the site has generated a unique URL for her -- there is some # that the site has generated a unique URL for her -- there is some
# explanatory text to that effect. # explanatory text to that effect.
self.fail('Finish the test!') self.fail('Finish the test!')
def test_layout_and_styling(self):
# Edith goes to the home page
self.browser.get(self.live_server_url)
self.browser.set_window_size(1024, 768)
# She notices the input box is nicely centered
inputbox = self.browser.find_element_by_id('id_new_item')
self.assertAlmostEqual(
inputbox.location['x'] + inputbox.size['width'] / 2,
512,
delta=10
)
# She starts a new list and sees the input is nicely
# centered there too
inputbox.send_keys('testing')
inputbox.send_keys(Keys.ENTER)
self.wait_for_row_in_list_table('1: testing')
inputbox = self.browser.find_element_by_id('id_new_item')
self.assertAlmostEqual(
inputbox.location['x'] + inputbox.size['width'] / 2,
512,
delta=10
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment