-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy patheditaboutme_test.py
More file actions
109 lines (73 loc) · 3.08 KB
/
editaboutme_test.py
File metadata and controls
109 lines (73 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# -*- coding: utf-8 -*-
#coding=utf-8
import os
import re
import sys
import pytest
import logging
import unittest
import subprocess
import time
from appium import webdriver
import config
from RAT import *
# Returns abs path relative to this file and not cwd
PATH = lambda p: os.path.abspath(
os.path.join(os.path.dirname(__file__), p)
)
path1 = "./test_resources/."
# logger
logger = logging.getLogger()
logFormatter = logging.Formatter(
'[%(asctime)-15s][%(filename)s][%(funcName)s#%(lineno)d] %(message)s')
ch = logging.StreamHandler(sys.stdout)
ch.setFormatter(logFormatter)
logger.addHandler(ch)
logger.setLevel(logging.INFO)
class EditaboutmeTests(BaseTests):
def test_num_of_fans_follows(self):
try:
self.sociushelper.click_login_by_email_link()
self.sociushelper.login_account(config.EMAIL_ACCOUNT, config.EMAIL_PWD)
#self.sociushelper.click_require_permission_button()
self.sociushelper.click_onboading_step()
self.sociushelper.login_point()
self.sociushelper.swipe_to_aboutme()
#check/get fans and follow of number in aboutme
fans_a = self.sociushelper.get_number_with_id("tv_fans_count")
follow_a = self.sociushelper.get_number_with_id("tv_following_count")
self.sociushelper.swipe_to_find_friend()
self.assertTrue(self.sociushelper.check_num_of_fans_follow(fans_a))
self.assertTrue(self.sociushelper.check_num_of_fans_follow(follow_a))
except:
self.logger.info('caught exception: {}'.format(sys.exc_info()[0]))
self.syshelper.capture_screen("test_num_of_fans_and_follow")
raise
def test_edit_aboutme(self):
try:
# login for new
accounthelper = AccountHelper()
# Create new account button on Soocii
self.sociushelper.click_create_new_account_using_email_button()
# flow to create new account
self.sociushelper.create_account(
accounthelper.name,
accounthelper.name,
accounthelper.email,
"password1234")
# confirm to follow recommended celebrity
self.sociushelper.click_confirm_recommended_celebrity()
# confirm acquiring permission dialog
#self.sociushelper.click_require_permission_button()
self.sociushelper.click_onboading_step()
self.sociushelper.login_point()
self.sociushelper.swipe_to_aboutme()
self.sociushelper.edit_infophoto()
self.sociushelper.edit_username_and_introduction()
self.sociushelper.swipe_up(250)
self.sociushelper.check_text("tv_display_name", "edit display")
self.sociushelper.check_text("tv_about_me", "Hello welcome to my broatcast!!!")
except Exception as e:
self.logger.info('caught exception: {}'.format(sys.exc_info()[0]))
self.syshelper.capture_screen("test_edit_aboutme")
raise