Пример #1
0
    def test_set_priority(self):
        main_page = MainPage(self.driver)

        for priority in main_page.PRIORITY_NAMES:
            main_page.set_priority(0, priority, self)
            main_page.check_priority(0, priority, self)
            main_page.choose_priority(priority)  # just ot exit window
Пример #2
0
 def setUp(self):
     auth_test(self)
     # Create 3 new todos
     main_page = MainPage(self.driver)
     main_page.delete_todos(self)
     for iii in range(len(self.TODO_NAMES)):
         main_page.create_todo(self.TODO_NAMES[iii], iii)
     self.driver.get(self.driver.current_url)
     main_page.check_for_self(self)
Пример #3
0
    def test_priority_order(self):
        main_page = MainPage(self.driver)

        # Change priorities
        main_page.set_priority(0, main_page.HIGH_PRIORITY, self)
        main_page.set_priority(1, main_page.MID_PRIORITY, self)
        main_page.set_priority(2, main_page.LOW_PRIORITY, self)

        # Sort
        main_page.set_sort(main_page.SORT_BY_PRIORITY)

        # Check
        main_page.check_todo_order(self)
Пример #4
0
def auth_test(test):
    main_page = MainPage(test.driver)
    main_page.open()

    auth_page = AuthPage(test.driver)
    auth_page.check_for_self(test)

    set_input(test.driver, auth_page.EMAIL_INPUT, os.environ.get('LOGIN'))
    auth_page.next()
    set_input(test.driver, auth_page.PASSWORD_INPUT,os.environ.get('PASSWORD'))
    auth_page.submit()

    main_page.check_for_self(test)
Пример #5
0
 def test_priority_click(self):
     main_page = MainPage(self.driver)
     main_page.open_todo_options(0, self)
     main_page.open_priority_list()
     main_page.check_priority_list_open(self)
Пример #6
0
 def tearDown(self):
     # Delete all todos
     MainPage(self.driver).delete_todos(self)