예제 #1
0
파일: auth.py 프로젝트: ngavrish/tester
    def validate_login_success(self):
        try:
            marks = Marks(self.browser,self.logger)
            dreams_popup = DreamsPopup(self.browser,self.logger)

            marks.star_box()
            dreams_popup.close()
        except Exception as e:
            raise TestFailedException(e.message)
예제 #2
0
        def run(self, browser, logger):

            marks = Marks(self.browser, self.logger)
            window = BrowserWindow(self.browser, self.logger)
            auth = AuthForm(self.browser, self.logger)

            self.do_method(auth.login_with_fb_full_scale, profiling_events.login_event)
            major_marks = marks.get_major_marks()
            self.do_method(marks.mark_major_marks_standart_comment, None, major_marks)
            window.close()
예제 #3
0
        def run(self, browser, logger):

            marks = Marks(self.browser, self.logger)
            window = BrowserWindow(self.browser, self.logger)
            auth = AuthForm(self.browser, self.logger)

            self.do_method(auth.login_with_fb_full_scale, profiling_events.login_event)
            minor_marks = marks.get_minor_marks()
            for mark in minor_marks:
                self.do_method(marks.mark_and_validate_mark, None, mark)
            window.close()
예제 #4
0
        def run(self, browser, logger):

            marks = Marks(self.browser, self.logger)
            window = BrowserWindow(self.browser, self.logger)
            auth = AuthForm(self.browser, self.logger)
            #       login as user1
            self.logger.log("\r\nLogin as User1\r\n")
            self.do_method(auth.login_with_fb_full_scale, profiling_events.login_event, auth.User1)
            self.do_method(window.open, None, AuthForm.User2.profile_url)
            marks.click(marks.get_mark_by_value(1))
            self.do_method(marks.validate_profile_mark_sent)
            window.close()
예제 #5
0
파일: auth.py 프로젝트: ngavrish/tester
    def validate_fb_login_success(self):
        try:
            marks = Marks(self.browser,self.logger)
            fb_invite_popup = FbInviteFriendsPopup(self.browser,self.logger)
            sexy_popup = SexyPopup(self.browser,self.logger)


            marks.star_box()
            fb_invite_popup.close()
            sexy_popup.close()
        except Exception as e:
            raise TestFailedException(e.message)
예제 #6
0
파일: filters.py 프로젝트: ngavrish/tester
 def validate_user_in_search_age(self,age_interval):
     try:
         marks = Marks(self.browser,self.logger)
         age = int(marks.get_user_age())
         self.logger.log("\r\nComparing " + str(age) + " in " + str(age_interval))
         if age_interval[0] >= self.max_filter_age:
             if age < age_interval[0]:
                 raise TestFailedException("Failed to validate user age \r\n Found age = " + str(age) +
                                           "\r\n Expected interval: " + str(age_interval) + " LESS THAN MINIMUM ")
         else:
             if age < age_interval[0] or age > age_interval[1]:
                 raise TestFailedException("Failed to validate user age \r\n Found age = " + str(age) +
                                           "\r\n Expected interval: " + str(age_interval))
     except Exception as e:
         raise TestFailedException("Failed to select online filter \r\n" + traceback.format_exc())
예제 #7
0
        def run(self, browser, logger):

            marks = Marks(self.browser, self.logger)
            window = BrowserWindow(self.browser, self.logger)
            auth = AuthForm(self.browser, self.logger)
            energy = Energy(self.browser, self.logger)

            self.do_method(auth.login_with_fb_full_scale, profiling_events.login_event)
            initial_energy_value = energy.get_profile_percent_value()
            marks_left_till_plus = marks.get_marks_left_till_energy_plus()
            marks_left = [int(s) for s in marks_left_till_plus.split() if s.isdigit()][0]

            print "Marks left = " + str(marks_left)

            for i in range(marks_left):
                print "step " + str(i)
                self.do_method(marks.marking_made_closer_to_more_energy, None, marks_left_till_plus, i)
            try:
                self.logger.log("Initial egergy value = " + str(initial_energy_value))
                print energy.get_profile_percent_value()
                assert initial_energy_value == energy.get_profile_percent_value() - 3
            except AssertionError:
                raise TestFailedException("Failed to add correct energy amount")
            window.close()
예제 #8
0
        def run(self, browser, logger):
            marks = Marks(self.browser, self.logger)
            window = BrowserWindow(self.browser, self.logger)
            auth = AuthForm(self.browser, self.logger)

            self.do_method(
                auth.login_with_fb_full_scale, profiling_events.events[profiling_events.login_event], auth.User1
            )
            marked_users = [marks.get_photo2mark_href()]
            for i in range(marks.unique_amount):
                marks.like()
                href2like = marks.get_photo2mark_href()
                if href2like in marked_users:
                    print marked_users
                    print href2like
                    raise TestFailedException("Found duplicate user in main search")
                marked_users.append(href2like)
                marks.mark()
                href2like = marks.get_photo2mark_href()
                if href2like in marked_users:
                    self.logger.log("Duplicate user = "******" found in list " + str(marked_users))
                    raise TestFailedException("Found duplicate user in main search")
                marked_users.append(href2like)
            window.close()
예제 #9
0
        def run(self, browser, logger):
            auth = AuthForm(self.browser, self.logger)
            window = BrowserWindow(self.browser,self.logger)
            profile = Profile(self.browser,self.logger)
            marks = Marks(self.browser, self.logger)

            self.do_method(auth.login_with_vk_full_scale,profiling_events.events[profiling_events.login_event],auth.User1)
#            navigate to resetted user profile
            window.open(auth.User1.profile_url_fb)

            for i in range(profile.marks_after_reset_amount):
                marks.click(
                    marks.get_mark_by_value(i+1)
                )
                marks.validate_profile_mark_sent()
                window.open(auth.User1.profile_url_fb)
            window.close()