Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rearranged files and folders

  • Loading branch information...
commit 7fc98013790e2ddf564306a8b514a94e1eaae7c2 1 parent 91bd0af
@AlinT AlinT authored
View
0  pages/__init__.py
No changes.
View
23 mozillians_page.py → pages/mozillians_page.py
@@ -19,7 +19,7 @@
# Portions created by the Initial Developer are Copyright (C) 2011
# the Initial Developer. All Rights Reserved.
#
-# Contributor(s):
+# Contributor(s): Alin Trif <alin.trif@softvision.ro>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -39,7 +39,8 @@
import re
import time
import base64
-from page import Page
+from pages.page import Page
+
class MozilliansBasePage(Page):
@@ -57,7 +58,7 @@ class MozilliansBasePage(Page):
def __init__(self, testsetup):
Page.__init__(self, testsetup)
self.sel = self.selenium
-
+
@property
def page_title(self):
return self.sel.get_title()
@@ -123,8 +124,8 @@ class MozilliansStartPage(MozilliansBasePage):
_create_profile_button_locator = 'css=#call-to-action a'
def __init__(self, testsetup):
- MozilliansBasePage.__init__(self, testsetup)
- self.sel.open('/')
+ MozilliansBasePage.__init__(self, testsetup)
+ self.sel.open('/')
def click_create_profile_button(self):
self.sel.click(self._create_profile_button_locator)
@@ -173,7 +174,7 @@ class MozilliansLoginPage(MozilliansBasePage):
_invalid_credentials_text = 'Please enter a correct username and password'
_account_needs_verification_message_locator = 'css=#messages .info'
- def log_in(self, email = None, password = None):
+ def log_in(self, email=None, password=None):
credentials = self.testsetup.credentials['user']
if email is None:
@@ -202,6 +203,7 @@ def click_forgot_password_link(self):
self.sel.wait_for_page_to_load(self.timeout)
return MozilliansResetPasswordPage(self.testsetup)
+
class MozilliansResetPasswordPage(MozilliansBasePage):
_reset_password_button_locator = 'id=submit'
@@ -218,7 +220,7 @@ def is_reset_password_button_present(self):
def is_email_field_present(self):
return self.sel.is_element_present(self._email_field_locator)
- def reset_password(self, email = None):
+ def reset_password(self, email=None):
credentials = self.testsetup.credentials['user']
if email is None:
@@ -233,6 +235,7 @@ def reset_password(self, email = None):
def is_password_reset_sent_text_present(self):
return self.sel.is_text_present("Password Reset Sent")
+
class MozilliansProfilePage(MozilliansBasePage):
_edit_my_profile_button_locator = 'id=edit-profile'
@@ -263,6 +266,7 @@ def click_edit_my_profile_button(self):
self.sel.wait_for_page_to_load(self.timeout)
return MozilliansEditProfilePage(self.testsetup)
+
class MozilliansEditProfilePage(MozilliansBasePage):
_delete_profile_button_locator = 'id=delete-profile'
@@ -306,6 +310,7 @@ def set_irc_nickname(self, irc_nickname):
def email(self):
return self.sel.get_text(self._email_locator)
+
class MozilliansConfirmProfileDeletePage(MozilliansBasePage):
_delete_button_locator = 'id=delete-action'
@@ -324,6 +329,7 @@ def is_delete_button_present(self):
def is_cancel_button_present(self):
return self.sel.is_element_present(self._cancel_button_locator)
+
class MozilliansInvitePage(MozilliansBasePage):
_recipient_field_locator = 'id=id_recipient'
@@ -340,6 +346,7 @@ def invite(self, email):
def is_invalid_mail_address_message_present(self):
return self.sel.is_text_present(self._enter_valid_email_address_text)
+
class MozilliansInviteSuccessPage(MozilliansBasePage):
_success_message = "Invitation Sent"
@@ -356,6 +363,7 @@ def is_success_message_present(self):
def is_invite_another_mozillian_link_present(self):
return self.sel.is_element_present(self._invite_another_mozillian_link_locator)
+
class MozilliansCreateProfilePage(MozilliansBasePage):
_email_field_locator = 'id=id_email'
@@ -429,6 +437,7 @@ def is_invalid_email_message_present(self):
def is_non_matching_passwords_message_present(self):
return self.sel.is_text_present(self._non_matching_passwords_string)
+
class MozilliansPasswordChangePage(MozilliansBasePage):
_old_password_field_locator = 'id=id_old_password'
View
0  page.py → pages/page.py
File renamed without changes
View
8 test_about_page.py → tests/test_about_page.py
@@ -20,7 +20,7 @@
# Portions created by the Initial Developer are Copyright (C) 2010
# the Initial Developer. All Rights Reserved.
#
-# Contributor(s):
+# Contributor(s): Alin Trif <alin.trif@softvision.ro>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -36,10 +36,10 @@
#
# ***** END LICENSE BLOCK *****
-from mozillians_page import MozilliansBasePage
-from mozillians_page import MozilliansStartPage
+from pages.mozillians_page import MozilliansBasePage
+from pages.mozillians_page import MozilliansStartPage
from unittestzero import Assert
-import pytest
+
class TestAboutPage:
View
8 test_account.py → tests/test_account.py
@@ -20,7 +20,7 @@
# Portions created by the Initial Developer are Copyright (C) 2010
# the Initial Developer. All Rights Reserved.
#
-# Contributor(s):
+# Contributor(s): Alin Trif <alin.trif@softvision.ro>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -36,10 +36,10 @@
#
# ***** END LICENSE BLOCK *****
-from mozillians_page import MozilliansBasePage
-from mozillians_page import MozilliansStartPage
+from pages.mozillians_page import MozilliansBasePage
+from pages.mozillians_page import MozilliansStartPage
from unittestzero import Assert
-import pytest
+
class TestAccount:
View
5 test_invite.py → tests/test_invite.py
@@ -20,7 +20,7 @@
# Portions created by the Initial Developer are Copyright (C) 2011
# the Initial Developer. All Rights Reserved.
#
-# Contributor(s):
+# Contributor(s): Alin Trif <alin.trif@softvision.ro>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -36,11 +36,12 @@
#
# ***** END LICENSE BLOCK *****
-from mozillians_page import MozilliansStartPage
+from pages.mozillians_page import MozilliansStartPage
from unittestzero import Assert
import pytest
xfail = pytest.mark.xfail
+
class TestInvite:
def test_inviting_an_invalid_email_address(self, mozwebqa):
View
7 test_profile.py → tests/test_profile.py
@@ -20,7 +20,7 @@
# Portions created by the Initial Developer are Copyright (C) 2010
# the Initial Developer. All Rights Reserved.
#
-# Contributor(s):
+# Contributor(s): Alin Trif <alin.trif@softvision.ro>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -38,12 +38,13 @@
import time
-from mozillians_page import MozilliansBasePage
-from mozillians_page import MozilliansStartPage
+from pages.mozillians_page import MozilliansBasePage
+from pages.mozillians_page import MozilliansStartPage
from unittestzero import Assert
import pytest
xfail = pytest.mark.xfail
+
class TestProfile:
def test_profile_deletion_confirmation(self, mozwebqa):
View
5 test_search.py → tests/test_search.py
@@ -20,7 +20,7 @@
# Portions created by the Initial Developer are Copyright (C) 2011
# the Initial Developer. All Rights Reserved.
#
-# Contributor(s):
+# Contributor(s): Alin Trif <alin.trif@softvision.ro>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -36,11 +36,12 @@
#
# ***** END LICENSE BLOCK *****
-from mozillians_page import MozilliansStartPage
+from pages.mozillians_page import MozilliansStartPage
from unittestzero import Assert
import pytest
xfail = pytest.mark.xfail
+
class TestSearch:
def test_search_function_only_present_for_vouched_users(self, mozwebqa):
Please sign in to comment.
Something went wrong with that request. Please try again.