Commit 55eefd0e by Jay Zoldak Committed by Jay Zoldak

Fix test that sets release date to work on all platforms

parent 24d08893
from lettuce import world, step from lettuce import world, step
from common import * from common import *
from nose.tools import assert_equal from nose.tools import assert_equal
from selenium.webdriver.common.keys import Keys
import time
############### ACTIONS #################### ############### ACTIONS ####################
...@@ -37,10 +39,14 @@ def i_save_a_new_section_release_date(step): ...@@ -37,10 +39,14 @@ def i_save_a_new_section_release_date(step):
date_css = 'input.start-date.date.hasDatepicker' date_css = 'input.start-date.date.hasDatepicker'
time_css = 'input.start-time.time.ui-timepicker-input' time_css = 'input.start-time.time.ui-timepicker-input'
css_fill(date_css, '12/25/2013') css_fill(date_css, '12/25/2013')
# click here to make the calendar go away # hit TAB to get to the time field
css_click(time_css) e = css_find(date_css).first
e._element.send_keys(Keys.TAB)
css_fill(time_css, '12:00am') css_fill(time_css, '12:00am')
css_click('a.save-button') e = css_find(time_css).first
e._element.send_keys(Keys.TAB)
time.sleep(float(1))
world.browser.click_link_by_text('Save')
############ ASSERTIONS ################### ############ ASSERTIONS ###################
...@@ -106,7 +112,7 @@ def the_section_release_date_picker_not_visible(step): ...@@ -106,7 +112,7 @@ def the_section_release_date_picker_not_visible(step):
def the_section_release_date_is_updated(step): def the_section_release_date_is_updated(step):
css = 'span.published-status' css = 'span.published-status'
status_text = world.browser.find_by_css(css).text status_text = world.browser.find_by_css(css).text
assert status_text == 'Will Release: 12/25/2013 at 12:00am' assert_equal(status_text,'Will Release: 12/25/2013 at 12:00am')
############ HELPER METHODS ################### ############ HELPER METHODS ###################
......
Markdown is supported
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