Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Test to ensure that user-profiles are working

  • Loading branch information...
commit 70abfd341b90c68f60ed090aff52bf5574fea517 1 parent 9f73c63
@teodosia teodosia authored
Showing with 42 additions and 0 deletions.
  1. +20 −0 pages/author.py
  2. +22 −0 tests/test_profile.py
View
20 pages/author.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+
+from base import BasePage
+
+
+class AuthorPage(BasePage):
+
+ _page_title = u"Posts by %s | QMO \u2013 quality.mozilla.org"
+
+ def go_to_author_page(self, author):
+ self.selenium.get(self.testsetup.base_url + '/author/' + author)
+
+ def __init__(self, testsetup, author):
+ BasePage.__init__(self, testsetup)
+ self._page_title = self._page_title % author
View
22 tests/test_profile.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+
+import pytest
+from unittestzero import Assert
+
+from pages.author import AuthorPage
+
+
+class TestUserRegistration:
+
+ @pytest.mark.nondestructive
+ def test_that_user_profile(self, mozwebqa):
+ author_name = "rbillings"
+
+ author_page = AuthorPage(mozwebqa, author_name)
+ author_page.go_to_author_page(author_name)
+ Assert.true(author_page.is_the_current_page)
Please sign in to comment.
Something went wrong with that request. Please try again.