This commit is contained in:
Matt Brandt 2014-07-01 11:57:21 -06:00
Родитель 84f34c9481
Коммит 78bc9301f3
4 изменённых файлов: 0 добавлений и 15 удалений

Просмотреть файл

@ -15,7 +15,6 @@ from pages.page import Page
class Base(Page): class Base(Page):
_csrf_token_locator = (By.NAME, 'csrfmiddlewaretoken')
_logout_locator = (By.ID, 'nav-logout') _logout_locator = (By.ID, 'nav-logout')
_pending_approval_locator = (By.ID, 'pending-approval') _pending_approval_locator = (By.ID, 'pending-approval')
@ -29,10 +28,6 @@ class Base(Page):
WebDriverWait(self.selenium, 10).until(lambda s: self.selenium.title) WebDriverWait(self.selenium, 10).until(lambda s: self.selenium.title)
return self.selenium.title return self.selenium.title
@property
def is_csrf_token_present(self):
return self.is_element_present(*self._csrf_token_locator)
@property @property
def is_pending_approval_visible(self): def is_pending_approval_visible(self):
return self.is_element_visible(*self._pending_approval_locator) return self.is_element_visible(*self._pending_approval_locator)

Просмотреть файл

@ -15,11 +15,8 @@ class TestAccount:
@pytest.mark.credentials @pytest.mark.credentials
@pytest.mark.nondestructive @pytest.mark.nondestructive
@pytest.mark.xfail("'allizom' in config.getvalue('base_url')",
reason="Bug 1000908 - Upgrade django-browserid to v0.10")
def test_login_logout(self, mozwebqa): def test_login_logout(self, mozwebqa):
home_page = Home(mozwebqa) home_page = Home(mozwebqa)
Assert.true(home_page.is_csrf_token_present)
home_page.login() home_page.login()
Assert.true(home_page.header.is_logout_menu_item_present) Assert.true(home_page.header.is_logout_menu_item_present)
home_page.header.click_logout_menu_item() home_page.header.click_logout_menu_item()
@ -27,12 +24,8 @@ class TestAccount:
@pytest.mark.credentials @pytest.mark.credentials
@pytest.mark.nondestructive @pytest.mark.nondestructive
@pytest.mark.xfail("'allizom' in config.getvalue('base_url')",
reason="Bug 1000908 - Upgrade django-browserid to v0.10")
def test_logout_verify_bid(self, mozwebqa): def test_logout_verify_bid(self, mozwebqa):
home_page = Home(mozwebqa) home_page = Home(mozwebqa)
Assert.true(home_page.is_csrf_token_present)
home_page.login() home_page.login()
Assert.true(home_page.header.is_logout_menu_item_present) Assert.true(home_page.header.is_logout_menu_item_present)
home_page.logout_using_url() home_page.logout_using_url()

Просмотреть файл

@ -25,7 +25,6 @@ class TestInvite:
home_page = Home(mozwebqa) home_page = Home(mozwebqa)
home_page.login() home_page.login()
invite_page = home_page.header.click_invite_menu_item() invite_page = home_page.header.click_invite_menu_item()
Assert.true(invite_page.is_csrf_token_present)
mail_address = "validuser@example.com" mail_address = "validuser@example.com"
invite_success_page = invite_page.invite(mail_address) invite_success_page = invite_page.invite(mail_address)
Assert.equal("%s has been invited to Mozillians. They'll receive an email with instructions on how to join.\ Assert.equal("%s has been invited to Mozillians. They'll receive an email with instructions on how to join.\

Просмотреть файл

@ -21,7 +21,6 @@ class TestProfile(BaseTest):
home_page.login() home_page.login()
edit_profile_page = home_page.header.click_edit_profile_menu_item() edit_profile_page = home_page.header.click_edit_profile_menu_item()
confirm_profile_delete_page = edit_profile_page.click_delete_profile_button() confirm_profile_delete_page = edit_profile_page.click_delete_profile_button()
Assert.true(confirm_profile_delete_page.is_csrf_token_present)
Assert.true(confirm_profile_delete_page.is_confirm_text_present) Assert.true(confirm_profile_delete_page.is_confirm_text_present)
Assert.true(confirm_profile_delete_page.is_cancel_button_present) Assert.true(confirm_profile_delete_page.is_cancel_button_present)
Assert.true(confirm_profile_delete_page.is_delete_button_present) Assert.true(confirm_profile_delete_page.is_delete_button_present)
@ -34,7 +33,6 @@ class TestProfile(BaseTest):
profile_page = home_page.header.click_view_profile_menu_item() profile_page = home_page.header.click_view_profile_menu_item()
edit_profile_page = home_page.header.click_edit_profile_menu_item() edit_profile_page = home_page.header.click_edit_profile_menu_item()
Assert.true(edit_profile_page.is_csrf_token_present)
current_time = str(time.time()).split('.')[0] current_time = str(time.time()).split('.')[0]
# New profile data # New profile data