Пример #1
0
class CreateRemoveShopTest(unittest.TestCase):
    SHOP_NAME = u'Ларек-Марек'
    SHOP_CATEGORY = u'Страница, Игры'

    def setUp(self):
        self.driver = get_driver()
        Auth(self.driver).sign_in()
        self.main_page = Main(self.driver)
        self.main_page.open_groups_page()

    def tearDown(self):
        self.driver.quit()

    def test_create_remove_shop(self):
        number_of_groups_before = self.main_page.get_number_of_groups()

        shop = Shop(self.driver)
        shop.create(self.SHOP_NAME)

        shop.open_feed_page()
        shop_name = shop.get_name()
        self.assertEqual(self.SHOP_NAME, shop_name)

        shop_category = shop.get_category()
        self.assertEqual(self.SHOP_CATEGORY, shop_category)

        number_of_groups = self.main_page.get_number_of_groups()
        self.assertNotEqual(number_of_groups, number_of_groups_before)

        shop.remove()

        number_of_groups_after = self.main_page.get_number_of_groups()
        self.assertEqual(number_of_groups_before, number_of_groups_after)
Пример #2
0
 def setUp(self):
     self.driver = get_driver()
     Auth(self.driver).sign_in()
     Main(self.driver).open_groups_page()
     self.shop = Shop(self.driver)
     self.shop.create()
     self.catalog_widget = self.shop.market_page.catalog_widget
Пример #3
0
    def setUp(self):
        self.driver = get_driver()

        Auth(self.driver).sign_in()
        Main(self.driver).open_groups_page()

        self.shop = Shop(self.driver)
        self.shop.create(self.SHOP_NAME)
        self.shop.open_forum_page()
Пример #4
0
    def setUp(self):
        self.driver = get_driver()

        Auth(self.driver).sign_in()
        Main(self.driver).open_groups_page()
        self.shop = Shop(self.driver)
        self.shop.create()

        self.catalog = Catalog(self.driver)
        self.catalog.create()
        self.catalog.open()
Пример #5
0
    def setUp(self):
        self.driver = get_driver()

        Auth(self.driver).sign_in()
        Main(self.driver).open_groups_page()

        self.shop = Shop(self.driver)
        self.shop.create()
        self.shop.open_forum_page()

        self.topic = Topic(self.driver)
        self.topic.create()
Пример #6
0
 def setUp(self):
     self.driver = get_driver()
     Auth(self.driver).sign_in()
     self.main_page = Main(self.driver)
     self.main_page.open_groups_page()
Пример #7
0
    def test_auth(self):
        Auth(self.driver).sign_in()

        username = Main(self.driver).get_username()
        self.assertEqual(self.USERNAME, username)