Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- Added even more test cases #3

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b5736fc
- Added even more test cases
mohdos Apr 11, 2020
ce043df
Done phase 3 with Documentation no Report yet
kamelMohsen Apr 11, 2020
d06c71a
Done phase 3 with Documentation no Report yet
kamelMohsen Apr 11, 2020
99e9bd9
Added Report
kamelMohsen Apr 11, 2020
8219329
update tests
eman-gamal Apr 11, 2020
b81c305
Add liked Songs and Playlist
eman-gamal Apr 11, 2020
2f73dab
Fixed some tests+ fixed Documentation
kamelMohsen Apr 11, 2020
13f5fc2
Fixed some tests+ fixed Documentation
kamelMohsen Apr 11, 2020
ad7b6dd
added reeports
kamelMohsen Apr 11, 2020
672f1ca
- Added docx Report for Front End
mohdos Apr 11, 2020
3960f26
Add artist
eman-gamal Apr 11, 2020
42ec10e
Add artist
eman-gamal Apr 11, 2020
caa1abe
Merge branch 'phase2' of https://github.com/Project-X9/Testing into p…
eman-gamal Apr 11, 2020
9a664b9
- Fixed playlist tests bugs
mohdos Apr 11, 2020
1629ffb
added documentation for the project
kamelMohsen Apr 11, 2020
b646597
Generated pdf report
kamelMohsen Apr 11, 2020
6667226
Merge branch 'phase2' of https://github.com/Project-X9/Testing into p…
kamelMohsen Apr 11, 2020
7933d52
- Added pdf report
mohdos Apr 11, 2020
ddab59c
added documentation for the project
kamelMohsen Apr 11, 2020
0b6810e
Generated pdf report
kamelMohsen Apr 11, 2020
85c6d94
added dependincies
kamelMohsen Apr 11, 2020
5944655
added complete documentation for the project
kamelMohsen Apr 11, 2020
3a160eb
Added documentation
kamelMohsen Apr 11, 2020
04aeb65
added missing Dependency
kamelMohsen Apr 12, 2020
66e71a1
added missing Dependency again
kamelMohsen Apr 12, 2020
55324f3
Added initial randoms
kamelMohsen Apr 12, 2020
33e76ea
Restructured the project
kamelMohsen Apr 13, 2020
f53c526
Added logo to tests
kamelMohsen Apr 13, 2020
090e007
Done
kamelMohsen Apr 13, 2020
735627b
- Made all tests on Firefox
mtm19 Apr 17, 2020
8348c7d
- Fixed a typo in helperClasses
mohdos Apr 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ debug.log
main_file_dummy.py
dummy_python_funds.py

.log
logs/
logs/*.log
Reports/*.json
Reports/*.png
Reports/*.txt
23 changes: 15 additions & 8 deletions Mobile_Testing/Pages/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@


class AuthenticationPage:
signup_button_id = "com.example.projectx:id/signUp_bt"
login_with_facebook_button_id = "com.example.projectx:id/login_button"
signin_button_id = "com.example.projectx:id/signIn_bt"
"""
A class used to represent the Authentication Page
...
Expand All @@ -25,10 +22,14 @@ class AuthenticationPage:
click_login_with_facebook_button()
Clicks the login with facebook button
click_signin_button()
Clicks the sign in button
Clicks the sign in button

"""

signup_button_id = "com.example.projectx:id/signUp_bt"
login_with_facebook_button_id = "com.example.projectx:id/login_button"
signin_button_id = "com.example.projectx:id/signIn_bt"

def __init__(self, driver):
"""
Initializes the page elements
Expand All @@ -41,16 +42,22 @@ def click_signup_button(self):
"""
Clicks sign up button
"""
Helper.find_element_by_id(self.driver, self.signup_button_id).click()
element = Helper.find_element_by_id(self.driver, self.signup_button_id)
if element is not None:
element.click()

def click_login_with_facebook_button(self):
"""
Clicks login with facebook button
"""
Helper.find_element_by_id(self.driver, self.login_with_facebook_button_id).click()
element = Helper.find_element_by_id(self.driver, self.login_with_facebook_button_id)
if element is not None:
element.click()

def click_signin_button(self):
"""
Clicks sign in button
"""
Helper.find_element_by_id(self.driver, self.signin_button_id).click()
element = Helper.find_element_by_id(self.driver, self.signin_button_id)
if element is not None:
element.click()
181 changes: 148 additions & 33 deletions Mobile_Testing/Pages/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,89 @@


class HomePage:
"""
A class used to represent the Home Page
...
Attributes
----------
logout_button_id : string
A string containing the id of logout button

logout_button_id = "com.example.projectx:id/logOut"
playlist_button_id = "com.example.projectx:id/openPlaylist"
play_music_button_id = "com.example.projectx:id/playMusic"
new_releases_button_id : string
A string containing the id of new releases button

"""
A class used to represent the Home Page
...
Attributes
----------
logout_button_id : string
A string containing the id of logout button

playlist_button_id : string
A string containing the id of playlist button

play_music_button_id : string
A string containing the id of playlist button

Methods
-------
click_logout_button(self)
Clicks on the logout button
liked_tracks_button_id : string
A string containing the id of liked tracks button

popular_tracks_button_id : string
A string containing the id of popular tracks button

recommended_tracks_id : string
A string containing the id of recommended tracks button

about_button_id : string
A string containing the id of about button

home_button_id : string
A string containing the id of home button

search_button_id : string
A string containing the id of search button

library_button_id : string
A string containing the id of library button

premium_button_id : string
A string containing the id of premium button


Methods
-------

click_logout_button()
Clicks on the logout button

click_new_releases_button()
Clicks on the new releases button

click_liked_tracks_button()
Clicks on the liked tracks button

click_popular_tracks_button()
Clicks on the popular tracks button

click_recommended_tracks()
Clicks on the recommended tracks

click_about_button()
Clicks on the about button

click_home_button()
Clicks on the home button

click_search_button()
Clicks on the search button

click_library_button()
Clicks on the library button


click_premium_button()
Clicks on the premium button

"""
logout_button_id = "com.example.projectx:id/logOut"
new_releases_button_id = "com.example.projectx:id/newReleases"
liked_tracks_button_id = "com.example.projectx:id/likedTracks"
popular_tracks_button_id = "com.example.projectx:id/popular"
recommended_tracks_id = "com.example.projectx:id/recommended"
about_button_id = "com.example.projectx:id/about"
home_button_id = "com.example.projectx:id/navigation_home"
search_button_id = "com.example.projectx:id/navigation_dashboard"
library_button_id = "com.example.projectx:id/navigation_notifications"
premium_button_id = "com.example.projectx:id/premium"

click_playlist_button()
Clicks on the logout button

click_play_music_button()
Clicks on the play music button
"""
def __init__(self, driver):
"""
Initializes the page elements
Expand All @@ -44,16 +97,78 @@ def click_logout_button(self):
"""
Clicks on the logout button
"""
Helper.find_element_by_id(self.driver, self.logout_button_id).click()
element = Helper.find_element_by_id(self.driver, self.logout_button_id)
if element is not None:
element.click()

def click_new_releases_button(self):
"""
Clicks on the new releases button
"""
element = Helper.find_element_by_id(self.driver, self.new_releases_button_id)
if element is not None:
element.click()

def click_liked_tracks_button(self):
"""
Clicks on the liked tracks button
"""
element = Helper.find_element_by_id(self.driver, self.liked_tracks_button_id)
if element is not None:
element.click()

def click_popular_tracks_button(self):
"""
Clicks on the popular tracks button
"""
element = Helper.find_element_by_id(self.driver, self.popular_tracks_button_id)
if element is not None:
element.click()

def click_recommended_tracks(self):
"""
Clicks on the recommended tracks
"""
element = Helper.find_element_by_id(self.driver, self.recommended_tracks_id)
if element is not None:
element.click()

def click_about_button(self):
"""
Clicks on the about button
"""
element = Helper.find_element_by_id(self.driver, self.about_button_id)
if element is not None:
element.click()

def click_home_button(self):
"""
Clicks on the home button
"""
element = Helper.find_element_by_id(self.driver, self.home_button_id)
if element is not None:
element.click()

def click_search_button(self):
"""
Clicks on the search button
"""
element = Helper.find_element_by_id(self.driver, self.search_button_id)
if element is not None:
element.click()

def click_playlist_button(self):
def click_library_button(self):
"""
Clicks on the playlist button
Clicks on the library button
"""
Helper.find_element_by_id(self.driver, self.playlist_button_id).click()
element = Helper.find_element_by_id(self.driver, self.library_button_id)
if element is not None:
element.click()

def click_play_music_button(self):
def click_premium_button(self):
"""
Clicks on the play music button
Clicks on the premium button
"""
Helper.find_element_by_id(self.driver, self.play_music_button_id).click()
element = Helper.find_element_by_id(self.driver, self.premium_button_id)
if element is not None:
element.click()
23 changes: 14 additions & 9 deletions Mobile_Testing/Pages/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@


class LoginPage:
email_text_field_id = "com.example.projectx:id/email_et"
password_text_field_id = "com.example.projectx:id/password_et"
login_button_id = "com.example.projectx:id/login_bt"

"""
A class used to represent the Login Page
...
Expand All @@ -23,14 +19,17 @@ class LoginPage:
-------
fill_email()
Fills the email field with the gievn string

fill_password()
fills the password field with the give string
click_login()
clicks the login password
do_the_login()
given an email and password this function makes a sign in
given an email and password this function makes a sign in
"""
email_text_field_id = "com.example.projectx:id/email_et"
password_text_field_id = "com.example.projectx:id/password_et"
login_button_id = "com.example.projectx:id/login_bt"

def __init__(self, driver):
"""
Expand All @@ -46,21 +45,27 @@ def fill_email(self, email):
:param email : the string that is filled in the text box
:type email: string
"""
Helper.find_element_by_id(self.driver, self.email_text_field_id).send_keys(email)
element = Helper.find_element_by_id(self.driver, self.email_text_field_id)
if element is not None:
element.send_keys(email)

def fill_password(self, password):
"""
fills the password text box
:param password : the string that is filled in the text box
:type password: string
"""
Helper.find_element_by_id(self.driver, self.password_text_field_id).send_keys(password)
element = Helper.find_element_by_id(self.driver, self.password_text_field_id)
if element is not None:
element.send_keys(password)

def click_login(self):
"""
clicks the login button
"""
Helper.find_element_by_id(self.driver, self.login_button_id).click()
element = Helper.find_element_by_id(self.driver, self.login_button_id)
if element is not None:
element.click()

def do_the_login(self, email, password):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@


class PlayMusicPage:

play_song_id = "com.example.projectx:id/playSong_ib"
previous_song_id = "com.example.projectx:id/previousSong_ib"
next_song_id = "com.example.projectx:id/nextSong_ib"
love_song_id = "com.example.projectx:id/likeButton_ib"
download_song_id = "com.example.projectx:id/downloadButton_ib"
repeat_song_id = "com.example.projectx:id/repeatButton_ib"
share_song_id = "com.example.projectx:id/shareButton_ib"
help_button_id = "com.example.projectx:id/more_ib"
minimize_player_id = "com.example.projectx:id/collapse_ib"
black_list_song_id = "com.example.projectx:id/blackListSong_ib"


"""
A class used to represent the Play Song Page
...
Expand All @@ -23,11 +10,11 @@ class PlayMusicPage:
play_song_id : string
id of play song button
previous_song_id : string
id of previous song button
id of previous song button
next_song_id : string
id of next song button
love_song_id : string
id of love song button
id of love song button
download_song_id : string
id of download song button
repeat_song_id : string
Expand All @@ -47,11 +34,21 @@ class PlayMusicPage:
None
"""

play_song_id = "com.example.projectx:id/playSong_ib"
previous_song_id = "com.example.projectx:id/previousSong_ib"
next_song_id = "com.example.projectx:id/nextSong_ib"
love_song_id = "com.example.projectx:id/likeButton_ib"
download_song_id = "com.example.projectx:id/downloadButton_ib"
repeat_song_id = "com.example.projectx:id/repeatButton_ib"
share_song_id = "com.example.projectx:id/shareButton_ib"
help_button_id = "com.example.projectx:id/more_ib"
minimize_player_id = "com.example.projectx:id/collapse_ib"
black_list_song_id = "com.example.projectx:id/blackListSong_ib"

def __init__(self, driver):
"""
Initializes the page elements
:param driver : the driver to which the super class' driver is to be set
:type driver: WebDriver
"""
self.driver = driver

Loading