class SignInHelpTest(AcceptanceTest):
    """
    Tests help links on 'Sign In' page
    """
    def setUp(self):
        super(SignInHelpTest, self).setUp()
        self.index_page = IndexPage(self.browser)
        self.index_page.visit()

    def test_sign_in_nav_help(self):
        """
        Scenario: Help link in navigation bar is working on 'Sign In' page.
        Given that I am on the 'Sign In" page.
        And I want help about the sign in
        And I click the 'Help' in the navigation bar
        Then Help link should open.
        And help url should be correct
        """
        sign_in_page = self.index_page.click_sign_in()
        expected_url = _get_expected_documentation_url(
            '/getting_started/index.html')

        # Assert that help link is correct.
        assert_nav_help_link(test=self,
                             page=sign_in_page,
                             href=expected_url,
                             signed_in=False)
class SignUpHelpTest(AcceptanceTest):
    """
    Tests help links on 'Sign Up' page.
    """
    def setUp(self):
        super(SignUpHelpTest, self).setUp()
        self.index_page = IndexPage(self.browser)
        self.index_page.visit()

    @skip(
        "Disabled as edx.org help links are now different than Open edX (@catong can advise)"
    )
    def test_sign_up_nav_help(self):
        """
        Scenario: Help link in navigation bar is working on 'Sign Up' page.
        Given that I am on the 'Sign Up" page.
        And I want help about the sign up
        And I click the 'Help' in the navigation bar
        Then Help link should open.
        And help url should be correct
        """
        sign_up_page = self.index_page.click_sign_up()
        expected_url = _get_expected_documentation_url('/get_started.html')

        # Assert that help link is correct.
        assert_nav_help_link(test=self,
                             page=sign_up_page,
                             href=expected_url,
                             signed_in=False)
Example #3
0
class StudioWelcomeHelpTest(AcceptanceTest):
    """
    Tests help link on 'Welcome' page ( User not logged in)
    """
    def setUp(self):
        super(StudioWelcomeHelpTest, self).setUp()
        self.index_page = IndexPage(self.browser)
        self.index_page.visit()

    def test_welcome_nav_help(self):
        """
        Scenario: Help link in navigation bar is working on 'Welcome' page (User not logged in).
        Given that I am on the 'Welcome' page.
        And I want help about the edx
        And I click the 'Help' in the navigation bar
        Then Help link should open.
        And help url should contain 'getting_started/get_started.html'
        """
        # The url we want to see in anchor help element.
        href = 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/' \
               'en/latest/getting_started/get_started.html'

        # Assert that help link is correct.
        assert_nav_help_link(test=self,
                             page=self.index_page,
                             href=href,
                             signed_in=False)
class SignInHelpTest(AcceptanceTest):
    """
    Tests help links on 'Sign In' page
    """
    def setUp(self):
        super(SignInHelpTest, self).setUp()
        self.index_page = IndexPage(self.browser)
        self.index_page.visit()

    def test_sign_in_nav_help(self):
        """
        Scenario: Help link in navigation bar is working on 'Sign In' page.
        Given that I am on the 'Sign In" page.
        And I want help about the sign in
        And I click the 'Help' in the navigation bar
        Then Help link should open.
        And help url should end with 'getting_started/get_started.html'
        """
        sign_in_page = self.index_page.click_sign_in()
        # The href we want to see in anchor help element.
        href = 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/' \
               'en/open-release-ficus.master/getting_started/get_started.html'

        # Assert that help link is correct.
        assert_nav_help_link(
            test=self,
            page=sign_in_page,
            href=href,
            signed_in=False
        )
Example #5
0
class SignInHelpTest(AcceptanceTest):
    """
    Tests help links on 'Sign In' page
    """
    def setUp(self):
        super(SignInHelpTest, self).setUp()
        self.index_page = IndexPage(self.browser)
        self.index_page.visit()

    def test_sign_in_nav_help(self):
        """
        Scenario: Help link in navigation bar is working on 'Sign In' page.
        Given that I am on the 'Sign In" page.
        And I want help about the sign in
        And I click the 'Help' in the navigation bar
        Then Help link should open.
        And help url should end with 'getting_started/get_started.html'
        """
        sign_in_page = self.index_page.click_sign_in()
        # The href we want to see in anchor help element.
        href = 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/' \
               'en/latest/getting_started/get_started.html'

        # Assert that help link is correct.
        assert_nav_help_link(test=self,
                             page=sign_in_page,
                             href=href,
                             signed_in=False)
Example #6
0
class SignInHelpTest(AcceptanceTest):
    """
    Tests help links on 'Sign In' page
    """
    def setUp(self):
        super(SignInHelpTest, self).setUp()
        self.index_page = IndexPage(self.browser)
        self.index_page.visit()

    def test_sign_in_nav_help(self):
        """
        Scenario: Help link in navigation bar is working on 'Sign In' page.
        Given that I am on the 'Sign In" page.
        And I want help about the sign in
        And I click the 'Help' in the navigation bar
        Then Help link should open.
        And help url should be correct
        """
        sign_in_page = self.index_page.click_sign_in()
        expected_url = _get_expected_documentation_url('/get_started.html')

        # Assert that help link is correct.
        assert_nav_help_link(
            test=self,
            page=sign_in_page,
            href=expected_url,
            signed_in=False
        )
Example #7
0
class StudioWelcomeHelpTest(AcceptanceTest):
    """
    Tests help link on 'Welcome' page ( User not logged in)
    """
    def setUp(self):
        super(StudioWelcomeHelpTest, self).setUp()
        self.index_page = IndexPage(self.browser)
        self.index_page.visit()

    def test_welcome_nav_help(self):
        """
        Scenario: Help link in navigation bar is working on 'Welcome' page (User not logged in).
        Given that I am on the 'Welcome' page.
        And I want help about the edx
        And I click the 'Help' in the navigation bar
        Then Help link should open.
        And help url should be correct
        """
        expected_url = _get_expected_documentation_url('/get_started.html')

        # Assert that help link is correct.
        assert_nav_help_link(
            test=self,
            page=self.index_page,
            href=expected_url,
            signed_in=False
        )
class StudioWelcomeHelpTest(AcceptanceTest):
    """
    Tests help link on 'Welcome' page ( User not logged in)
    """
    def setUp(self):
        super(StudioWelcomeHelpTest, self).setUp()
        self.index_page = IndexPage(self.browser)
        self.index_page.visit()

    def test_welcome_nav_help(self):
        """
        Scenario: Help link in navigation bar is working on 'Welcome' page (User not logged in).
        Given that I am on the 'Welcome' page.
        And I want help about the edx
        And I click the 'Help' in the navigation bar
        Then Help link should open.
        And help url should contain 'getting_started/get_started.html'
        """
        # The url we want to see in anchor help element.
        href = 'http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/' \
               'en/open-release-ficus.master/getting_started/get_started.html'

        # Assert that help link is correct.
        assert_nav_help_link(
            test=self,
            page=self.index_page,
            href=href,
            signed_in=False
        )
Example #9
0
class StudioWelcomeHelpTest(AcceptanceTest):
    """
    Tests help link on 'Welcome' page ( User not logged in)
    """
    def setUp(self):
        super(StudioWelcomeHelpTest, self).setUp()
        self.index_page = IndexPage(self.browser)
        self.index_page.visit()

    def test_welcome_nav_help(self):
        """
        Scenario: Help link in navigation bar is working on 'Welcome' page (User not logged in).
        Given that I am on the 'Welcome' page.
        And I want help about the edx
        And I click the 'Help' in the navigation bar
        Then Help link should open.
        And help url should be correct
        """
        expected_url = _get_expected_documentation_url(
            '/getting_started/index.html')

        # Assert that help link is correct.
        assert_nav_help_link(test=self,
                             page=self.index_page,
                             href=expected_url,
                             signed_in=False)
Example #10
0
 def setUp(self):
     super(LoggedOutTest, self).setUp()
     self.pages = [
         LoginPage(self.browser),
         IndexPage(self.browser),
         SignupPage(self.browser)
     ]
Example #11
0
    def test_sign_up_with_bad_password(self):
        """
        Scenario: Sign up from the homepage
        Given I visit the Studio homepage
        When I click the link with the text "Sign Up"
        And I fill in the registration form
        When I enter an insufficient password and focus out
        I should see an error message
        """
        index_page = IndexPage(self.browser)
        index_page.visit()
        index_page.click_sign_up()

        password_input = self.sign_up_page.input_password('a')  # Arbitrary short password that will fail
        password_input.send_keys(Keys.TAB)  # Focus out of the element
        index_page.wait_for_element_visibility('#register-password-validation-error', 'Password Error Message')
        self.assertIsNotNone(index_page.q(css='#register-password-validation-error-msg'))  # Error message should exist
    def test_sign_up_with_bad_password(self):
        """
        Scenario: Sign up from the homepage
        Given I visit the Studio homepage
        When I click the link with the text "Sign Up"
        And I fill in the registration form
        When I enter an insufficient password and focus out
        I should see an error message
        """
        index_page = IndexPage(self.browser)
        index_page.visit()
        index_page.click_sign_up()

        password_input = self.sign_up_page.input_password('a')  # Arbitrary short password that will fail
        password_input.send_keys(Keys.TAB)  # Focus out of the element
        index_page.wait_for_element_visibility('#password_error', 'Password Error Message')
        self.assertIsNotNone(index_page.q(css='#password_error').text)  # Make sure there is an error message
Example #13
0
    def test_sign_up_from_home(self):
        """
        Scenario: Sign up from the homepage
        Given I visit the Studio homepage
        When I click the link with the text "Sign Up"
        And I fill in the registration form
        And I press the Create My Account button on the registration form
        Then I should see an email verification prompt
        """
        index_page = IndexPage(self.browser)
        index_page.visit()
        index_page.click_sign_up()

        # Register the user.
        unique_number = uuid.uuid4().hex[:4]
        self.sign_up_page.sign_up_user(
            '{}[email protected]'.format(unique_number),
            '{}-name'.format(unique_number),
            '{}-username'.format(unique_number),
            '{}-password'.format(unique_number),
        )
        home = HomePage(self.browser)
        home.wait_for_page()
Example #14
0
 def setUp(self):
     super(SignInHelpTest, self).setUp()
     self.index_page = IndexPage(self.browser)
     self.index_page.visit()
Example #15
0
 def setUp(self):
     super(StudioWelcomeHelpTest, self).setUp()
     self.index_page = IndexPage(self.browser)
     self.index_page.visit()
 def setUp(self):
     super(SignInHelpTest, self).setUp()
     self.index_page = IndexPage(self.browser)
     self.index_page.visit()
 def setUp(self):
     super(StudioWelcomeHelpTest, self).setUp()
     self.index_page = IndexPage(self.browser)
     self.index_page.visit()