예제 #1
0
 def test_open_shopping_cart_empty_existing_user_signed(self):
     user_information = PersonalInformation(email="*****@*****.**",
                                            first_name="John",
                                            last_name="Doe",
                                            password="******")
     self.browser.get('http://automationpractice.com/index.php')
     self.assertIn('My Store', self.browser.title)
     home_page = HomePage(self.browser)
     home_page.sign_in()
     authentication = Authentication(self.browser)
     authentication.sign_in(user=user_information)
     account = MyAccount(self.browser)
     name_surname = user_information.first_name + ' ' + user_information.last_name
     self.assertTrue(account.is_user_logged(name_surname))
     home_page.open_shopping_cart()
     self.assertTrue(home_page.is_shopping_cart_empty())
예제 #2
0
 def test_open_shopping_cart_empty_existing_user_not_signed(self):
     self.browser.get('http://automationpractice.com/index.php')
     self.assertIn('My Store', self.browser.title)
     home_page = HomePage(self.browser)
     home_page.open_shopping_cart()
     self.assertTrue(home_page.is_shopping_cart_empty())