user menu cleanup
This commit is contained in:
committed by
marcotuts
parent
bc78baa091
commit
32df8db753
@@ -176,12 +176,12 @@ class DashboardPage(PageObject):
|
||||
|
||||
def click_account_settings_link(self):
|
||||
"""
|
||||
Click on `Account Settings` link.
|
||||
Click on `Account` link.
|
||||
"""
|
||||
self.q(css='.dropdown-menu li a').first.click()
|
||||
self.q(css='.dropdown-menu li a').nth(1).click()
|
||||
|
||||
def click_my_profile_link(self):
|
||||
"""
|
||||
Click on `My Profile` link.
|
||||
Click on `Profile` link.
|
||||
"""
|
||||
self.q(css='.dropdown-menu li a').nth(1).click()
|
||||
self.q(css='.dropdown-menu li a').nth(2).click()
|
||||
|
||||
@@ -85,19 +85,19 @@ class DashboardMenuTest(AccountSettingsTestMixin, WebAppTest):
|
||||
"""
|
||||
def test_link_on_dashboard_works(self):
|
||||
"""
|
||||
Scenario: Verify that the "Account Settings" link works from the dashboard.
|
||||
Scenario: Verify that the "Account" link works from the dashboard.
|
||||
|
||||
|
||||
Given that I am a registered user
|
||||
And I visit my dashboard
|
||||
And I click on "Account Settings" in the top drop down
|
||||
And I click on "Account" in the top drop down
|
||||
Then I should see my account settings page
|
||||
"""
|
||||
self.log_in_as_unique_user()
|
||||
dashboard_page = DashboardPage(self.browser)
|
||||
dashboard_page.visit()
|
||||
dashboard_page.click_username_dropdown()
|
||||
self.assertIn('Account Settings', dashboard_page.username_dropdown_link_text)
|
||||
self.assertIn('Account', dashboard_page.username_dropdown_link_text)
|
||||
dashboard_page.click_account_settings_link()
|
||||
|
||||
|
||||
|
||||
@@ -237,15 +237,15 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
|
||||
Given that I am a registered user.
|
||||
When I go to Dashboard page.
|
||||
And I click on username dropdown.
|
||||
Then I see My Profile link in the dropdown menu.
|
||||
When I click on My Profile link.
|
||||
Then I will be navigated to My Profile page.
|
||||
Then I see Profile link in the dropdown menu.
|
||||
When I click on Profile link.
|
||||
Then I will be navigated to Profile page.
|
||||
"""
|
||||
username, user_id = self.log_in_as_unique_user()
|
||||
dashboard_page = DashboardPage(self.browser)
|
||||
dashboard_page.visit()
|
||||
dashboard_page.click_username_dropdown()
|
||||
self.assertTrue('My Profile' in dashboard_page.username_dropdown_link_text)
|
||||
self.assertTrue('Profile' in dashboard_page.username_dropdown_link_text)
|
||||
dashboard_page.click_my_profile_link()
|
||||
my_profile_page = LearnerProfilePage(self.browser, username)
|
||||
my_profile_page.wait_for_page()
|
||||
@@ -255,7 +255,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
|
||||
Scenario: Verify that desired fields are shown when looking at her own private profile.
|
||||
|
||||
Given that I am a registered user.
|
||||
And I visit My Profile page.
|
||||
And I visit my Profile page.
|
||||
And I set the profile visibility to private.
|
||||
And I reload the page.
|
||||
Then I should see the profile visibility selector dropdown.
|
||||
@@ -271,7 +271,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
|
||||
Scenario: Verify that desired fields are shown when looking at her own public profile.
|
||||
|
||||
Given that I am a registered user.
|
||||
And I visit My Profile page.
|
||||
And I visit my Profile page.
|
||||
And I set the profile visibility to public.
|
||||
And I reload the page.
|
||||
Then I should see the profile visibility selector dropdown.
|
||||
@@ -316,7 +316,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
|
||||
Test behaviour of `Country` field.
|
||||
|
||||
Given that I am a registered user.
|
||||
And I visit My Profile page.
|
||||
And I visit my Profile page.
|
||||
And I set the profile visibility to public and set default values for public fields.
|
||||
Then I set country value to `Pakistan`.
|
||||
Then displayed country should be `Pakistan` and country field mode should be `display`
|
||||
@@ -340,7 +340,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
|
||||
Test behaviour of `Language` field.
|
||||
|
||||
Given that I am a registered user.
|
||||
And I visit My Profile page.
|
||||
And I visit my Profile page.
|
||||
And I set the profile visibility to public and set default values for public fields.
|
||||
Then I set language value to `Urdu`.
|
||||
Then displayed language should be `Urdu` and language field mode should be `display`
|
||||
@@ -369,7 +369,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
|
||||
Test behaviour of `About Me` field.
|
||||
|
||||
Given that I am a registered user.
|
||||
And I visit My Profile page.
|
||||
And I visit my Profile page.
|
||||
And I set the profile visibility to public and set default values for public fields.
|
||||
Then I set about me value to `Eat Sleep Code`.
|
||||
Then displayed about me should be `Eat Sleep Code` and about me field mode should be `display`
|
||||
|
||||
Reference in New Issue
Block a user