Ejemplo n.º 1
0
    def test_login_positive(self):
        App.is_displayed(self, NewsScreen.accountTab)
        App.is_displayed(self, NewsScreen.hamburgerMenu)
        App.assert_text(self, NewsScreen.newsHeader, 'News')

        App.click(self, NewsScreen.hamburgerMenu)
        App.assert_text(self, NewsScreen.menuHeader, 'Menu')

        # login as real user
        LoginScreen.login_user(self, 'valid password')
        App.assert_text(self, NewsScreen.newsHeader, 'News')

        App.click(self, NewsScreen.accountTab)
        App.is_displayed(self, DashboardScreen.profileImage)
        App.assert_text(self, DashboardScreen.profileName, 'hack')
        App.assert_text(self, DashboardScreen.dashboardHeader, 'My Dashboard')
Ejemplo n.º 2
0
    def test_login_negative(self):
        App.is_displayed(self, NewsScreen.accountTab)
        App.is_displayed(self, NewsScreen.hamburgerMenu)
        App.assert_text(self, NewsScreen.newsHeader, 'News')

        App.click(self, NewsScreen.hamburgerMenu)
        App.assert_text(self, NewsScreen.menuHeader, 'Menu')

        # login as real user
        LoginScreen.login_user(self, 'invalid password')
        App.assert_text(self, LoginScreen.invalidMsg, 'Incorrect username or password.')