Permalink
Browse files

cast count to int, update remaining count due to functional change

  • Loading branch information...
1 parent 70f6a84 commit ad28ddfabbb3ffda352140e0b1e19e06eda00cb7 Zac committed Mar 7, 2012
Showing with 13 additions and 13 deletions.
  1. +1 −1 pages/desktop/submit_feedback.py
  2. +7 −7 tests/desktop/test_feedback.py
  3. +5 −5 tests/desktop/test_ideas.py
@@ -71,7 +71,7 @@ def error_message(self):
@property
def remaining_character_count(self):
- return self.selenium.find_element(*self._remaining_character_count_locator).text
+ return int(self.selenium.find_element(*self._remaining_character_count_locator).text)
@property
def is_remaining_character_count_limited(self):
@@ -57,31 +57,31 @@ def test_remaining_character_count(self, mozwebqa):
submit_happy_feedback_pg = SubmitHappyFeedbackPage(mozwebqa)
submit_happy_feedback_pg.go_to_submit_happy_feedback_page()
- Assert.equal(submit_happy_feedback_pg.remaining_character_count, "140")
+ Assert.equal(submit_happy_feedback_pg.remaining_character_count, 250)
Assert.false(submit_happy_feedback_pg.is_remaining_character_count_limited)
Assert.false(submit_happy_feedback_pg.is_remaining_character_count_negative)
Assert.false(submit_happy_feedback_pg.is_submit_feedback_enabled)
- submit_happy_feedback_pg.type_feedback("a" * 111)
- Assert.equal(submit_happy_feedback_pg.remaining_character_count, "29")
+ submit_happy_feedback_pg.type_feedback("a" * 199)
+ Assert.equal(submit_happy_feedback_pg.remaining_character_count, 51)
Assert.false(submit_happy_feedback_pg.is_remaining_character_count_limited)
Assert.false(submit_happy_feedback_pg.is_remaining_character_count_negative)
Assert.true(submit_happy_feedback_pg.is_submit_feedback_enabled)
submit_happy_feedback_pg.type_feedback("b")
- Assert.equal(submit_happy_feedback_pg.remaining_character_count, "28")
+ Assert.equal(submit_happy_feedback_pg.remaining_character_count, 50)
Assert.true(submit_happy_feedback_pg.is_remaining_character_count_limited)
Assert.false(submit_happy_feedback_pg.is_remaining_character_count_negative)
Assert.true(submit_happy_feedback_pg.is_submit_feedback_enabled)
- submit_happy_feedback_pg.type_feedback("c" * 28)
- Assert.equal(submit_happy_feedback_pg.remaining_character_count, "0")
+ submit_happy_feedback_pg.type_feedback("c" * 50)
+ Assert.equal(submit_happy_feedback_pg.remaining_character_count, 0)
Assert.true(submit_happy_feedback_pg.is_remaining_character_count_limited)
Assert.false(submit_happy_feedback_pg.is_remaining_character_count_negative)
Assert.true(submit_happy_feedback_pg.is_submit_feedback_enabled)
submit_happy_feedback_pg.type_feedback("d")
- Assert.equal(submit_happy_feedback_pg.remaining_character_count, "-1")
+ Assert.equal(submit_happy_feedback_pg.remaining_character_count, -1)
Assert.false(submit_happy_feedback_pg.is_remaining_character_count_limited)
Assert.true(submit_happy_feedback_pg.is_remaining_character_count_negative)
Assert.false(submit_happy_feedback_pg.is_submit_feedback_enabled)
@@ -54,31 +54,31 @@ def test_remaining_character_count(self, mozwebqa):
submit_idea_pg = SubmitIdeaPage(mozwebqa)
submit_idea_pg.go_to_submit_idea_page()
- Assert.equal(submit_idea_pg.remaining_character_count, "250")
+ Assert.equal(submit_idea_pg.remaining_character_count, 250)
Assert.false(submit_idea_pg.is_remaining_character_count_limited)
Assert.false(submit_idea_pg.is_remaining_character_count_negative)
Assert.false(submit_idea_pg.is_submit_feedback_enabled)
submit_idea_pg.type_feedback("a" * 199)
- Assert.equal(submit_idea_pg.remaining_character_count, "51")
+ Assert.equal(submit_idea_pg.remaining_character_count, 51)
Assert.false(submit_idea_pg.is_remaining_character_count_limited)
Assert.false(submit_idea_pg.is_remaining_character_count_negative)
Assert.true(submit_idea_pg.is_submit_feedback_enabled)
submit_idea_pg.type_feedback("b")
- Assert.equal(submit_idea_pg.remaining_character_count, "50")
+ Assert.equal(submit_idea_pg.remaining_character_count, 50)
Assert.true(submit_idea_pg.is_remaining_character_count_limited)
Assert.false(submit_idea_pg.is_remaining_character_count_negative)
Assert.true(submit_idea_pg.is_submit_feedback_enabled)
submit_idea_pg.type_feedback("c" * 50)
- Assert.equal(submit_idea_pg.remaining_character_count, "0")
+ Assert.equal(submit_idea_pg.remaining_character_count, 0)
Assert.true(submit_idea_pg.is_remaining_character_count_limited)
Assert.false(submit_idea_pg.is_remaining_character_count_negative)
Assert.true(submit_idea_pg.is_submit_feedback_enabled)
submit_idea_pg.type_feedback("d")
- Assert.equal(submit_idea_pg.remaining_character_count, "-1")
+ Assert.equal(submit_idea_pg.remaining_character_count, -1)
Assert.false(submit_idea_pg.is_remaining_character_count_limited)
Assert.true(submit_idea_pg.is_remaining_character_count_negative)
Assert.false(submit_idea_pg.is_submit_feedback_enabled)

0 comments on commit ad28ddf

Please sign in to comment.