Exemplo n.º 1
0
    def test_do_pair_should_see_pair_time_increase(self):
        pair_stair_page = PairStairPage(self.driver)
        self.driver.go_to(PAIR_STAIR_PAGE)
        programmer_0_name = 'programmer0'
        programmer_1_name = 'programmer1'
        old_times = pair_stair_page.get_pair_time(programmer_0_name, programmer_1_name)
        pair_stair_page.do_pair(programmer_0_name, programmer_1_name)
        new_times = pair_stair_page.get_pair_time(programmer_0_name, programmer_1_name)

        self.assertEqual(int(old_times)+1,int(new_times))
Exemplo n.º 2
0
 def setUp(self):
     super(TestPairStairs, self).setUp()
     pair_stair_page = PairStairPage(self.driver)
     self.driver.go_to(PAIR_STAIR_PAGE)
     pair_stair_page.delete_all_programmer()
     pair_stair_page.add_programmer_with_name('programmer0')
     pair_stair_page.add_programmer_with_name('programmer1')
     pair_stair_page.add_programmer_with_name('programmer2')
     pair_stair_page.add_programmer_with_name('programmer3')
Exemplo n.º 3
0
 def tearDown(self):
     pair_stair_page = PairStairPage(self.driver)
     self.driver.go_to(PAIR_STAIR_PAGE)
     pair_stair_page.delete_all_programmer()
     super(TestPairStairs, self).tearDown()
Exemplo n.º 4
0
 def test_delete_programmer_should_not_see_programmer(self):
     pair_stair_page = PairStairPage(self.driver)
     self.driver.go_to(PAIR_STAIR_PAGE)
     programmer_name = 'programmer3'
     pair_stair_page.delete_with_name(programmer_name)
     self.assertNotIn(programmer_name, pair_stair_page.get_programmer_names())
Exemplo n.º 5
0
 def test_add_programmer_should_see_new_programmer(self):
     pair_stair_page = PairStairPage(self.driver)
     self.driver.go_to(PAIR_STAIR_PAGE)
     programmer_name = "test_name"
     pair_stair_page.add_programmer_with_name(programmer_name)
     self.assertIn(programmer_name,pair_stair_page.get_programmer_names())
Exemplo n.º 6
0
 def test_view_pair_stair_page_should_see_add_button(self):
     pair_stair_page = PairStairPage(self.driver)
     self.driver.go_to(PAIR_STAIR_PAGE)
     pair_stair_page.add_programmer_with_name('')
     self.assertEqual(pair_stair_page.get_error_message().text, "Error:programmer name needed")
Exemplo n.º 7
0
 def test_view_pair_stair_page_should_see_add_button(self):
     pair_stair_page = PairStairPage(self.driver)
     self.driver.go_to(PAIR_STAIR_PAGE)
     self.assertEqual(pair_stair_page.get_add_button().text, 'add')
Exemplo n.º 8
0
 def test_should_view_pair_stair_page(self):
     pair_stair_page = PairStairPage(self.driver)
     self.driver.go_to(PAIR_STAIR_PAGE)
     self.assertEqual(pair_stair_page.get_title(), 'Pair Stair')