Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
6b7f1bce
Commit
6b7f1bce
authored
Oct 08, 2015
by
Christina Roberts
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10094 from edx/christina/profile-flaky-tests
Fix user profile flaky tests.
parents
f6d34711
99cd1876
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
23 deletions
+11
-23
common/test/acceptance/pages/lms/fields.py
+7
-14
common/test/acceptance/tests/lms/test_learner_profile.py
+2
-7
common/test/acceptance/tests/lms/test_teams.py
+2
-2
No files found.
common/test/acceptance/pages/lms/fields.py
View file @
6b7f1bce
...
@@ -163,26 +163,19 @@ class FieldsMixin(object):
...
@@ -163,26 +163,19 @@ class FieldsMixin(object):
query
.
results
[
0
]
.
send_keys
(
u'
\ue007
'
)
# Press Enter
query
.
results
[
0
]
.
send_keys
(
u'
\ue007
'
)
# Press Enter
return
query
.
attrs
(
'value'
)[
0
]
return
query
.
attrs
(
'value'
)[
0
]
def
value_for_textarea_field
(
self
,
field_id
,
value
=
Non
e
):
def
set_value_for_textarea_field
(
self
,
field_id
,
valu
e
):
"""
"""
Get or s
et the value of a textarea field.
S
et the value of a textarea field.
"""
"""
self
.
wait_for_field
(
field_id
)
self
.
wait_for_field
(
field_id
)
self
.
make_field_editable
(
field_id
)
self
.
make_field_editable
(
field_id
)
query
=
self
.
q
(
css
=
'.u-field-{} textarea'
.
format
(
field_id
))
field_selector
=
'.u-field-{} textarea'
.
format
(
field_id
)
if
not
query
.
present
:
self
.
wait_for_element_presence
(
field_selector
,
'Editable textarea is present.'
)
return
None
if
value
is
not
None
:
query
.
fill
(
value
)
query
.
results
[
0
]
.
send_keys
(
u'
\ue004
'
)
# Focus Out using TAB
if
self
.
mode_for_field
(
field_id
)
==
'edit'
:
query
=
self
.
q
(
css
=
field_selector
)
return
query
.
text
[
0
]
query
.
fill
(
value
)
else
:
query
.
results
[
0
]
.
send_keys
(
u'
\ue004
'
)
# Focus Out using TAB
return
self
.
get_non_editable_mode_value
(
field_id
)
def
get_non_editable_mode_value
(
self
,
field_id
):
def
get_non_editable_mode_value
(
self
,
field_id
):
"""
"""
...
...
common/test/acceptance/tests/lms/test_learner_profile.py
View file @
6b7f1bce
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
"""
"""
End-to-end tests for Student's Profile Page.
End-to-end tests for Student's Profile Page.
"""
"""
from
flaky
import
flaky
from
contextlib
import
contextmanager
from
contextlib
import
contextmanager
from
datetime
import
datetime
from
datetime
import
datetime
...
@@ -48,7 +47,7 @@ class LearnerProfileTestMixin(EventsTestMixin):
...
@@ -48,7 +47,7 @@ class LearnerProfileTestMixin(EventsTestMixin):
"""
"""
profile_page
.
value_for_dropdown_field
(
'language_proficiencies'
,
'English'
)
profile_page
.
value_for_dropdown_field
(
'language_proficiencies'
,
'English'
)
profile_page
.
value_for_dropdown_field
(
'country'
,
'United Arab Emirates'
)
profile_page
.
value_for_dropdown_field
(
'country'
,
'United Arab Emirates'
)
profile_page
.
value_for_textarea_field
(
'bio'
,
'Nothing Special'
)
profile_page
.
set_
value_for_textarea_field
(
'bio'
,
'Nothing Special'
)
def
visit_profile_page
(
self
,
username
,
privacy
=
None
):
def
visit_profile_page
(
self
,
username
,
privacy
=
None
):
"""
"""
...
@@ -306,7 +305,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
...
@@ -306,7 +305,7 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
"""
"""
Test behaviour of a textarea field.
Test behaviour of a textarea field.
"""
"""
profile_page
.
value_for_textarea_field
(
field_id
,
new_value
)
profile_page
.
set_
value_for_textarea_field
(
field_id
,
new_value
)
self
.
assertEqual
(
profile_page
.
get_non_editable_mode_value
(
field_id
),
displayed_value
)
self
.
assertEqual
(
profile_page
.
get_non_editable_mode_value
(
field_id
),
displayed_value
)
self
.
assertTrue
(
profile_page
.
mode_for_field
(
field_id
),
mode
)
self
.
assertTrue
(
profile_page
.
mode_for_field
(
field_id
),
mode
)
...
@@ -473,7 +472,6 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
...
@@ -473,7 +472,6 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
self
.
assert_default_image_has_public_access
(
profile_page
)
self
.
assert_default_image_has_public_access
(
profile_page
)
@flaky
# TODO fix this, see TNL-2704
def
test_user_can_upload_the_profile_image_with_success
(
self
):
def
test_user_can_upload_the_profile_image_with_success
(
self
):
"""
"""
Scenario: Upload profile image works correctly.
Scenario: Upload profile image works correctly.
...
@@ -529,7 +527,6 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
...
@@ -529,7 +527,6 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
}
}
})
})
@flaky
# TODO: fix TNL-3492
def
test_user_can_see_error_for_file_size_below_the_min_limit
(
self
):
def
test_user_can_see_error_for_file_size_below_the_min_limit
(
self
):
"""
"""
Scenario: Upload profile image does not work for < 100 Bytes image file.
Scenario: Upload profile image does not work for < 100 Bytes image file.
...
@@ -641,7 +638,6 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
...
@@ -641,7 +638,6 @@ class OwnLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
self
.
assert_default_image_has_public_access
(
profile_page
)
self
.
assert_default_image_has_public_access
(
profile_page
)
self
.
assertFalse
(
profile_page
.
remove_link_present
)
self
.
assertFalse
(
profile_page
.
remove_link_present
)
@flaky
# TNL-3514
def
test_eventing_after_multiple_uploads
(
self
):
def
test_eventing_after_multiple_uploads
(
self
):
"""
"""
Scenario: An event is fired when a user with a profile image uploads another image
Scenario: An event is fired when a user with a profile image uploads another image
...
@@ -706,7 +702,6 @@ class DifferentUserLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
...
@@ -706,7 +702,6 @@ class DifferentUserLearnerProfilePageTest(LearnerProfileTestMixin, WebAppTest):
self
.
verify_profile_page_is_private
(
profile_page
,
is_editable
=
False
)
self
.
verify_profile_page_is_private
(
profile_page
,
is_editable
=
False
)
self
.
verify_profile_page_view_event
(
username
,
different_user_id
,
visibility
=
self
.
PRIVACY_PRIVATE
)
self
.
verify_profile_page_view_event
(
username
,
different_user_id
,
visibility
=
self
.
PRIVACY_PRIVATE
)
@flaky
# TODO fix this, see TNL-2199
def
test_different_user_public_profile
(
self
):
def
test_different_user_public_profile
(
self
):
"""
"""
Scenario: Verify that desired fields are shown when looking at a different user's public profile.
Scenario: Verify that desired fields are shown when looking at a different user's public profile.
...
...
common/test/acceptance/tests/lms/test_teams.py
View file @
6b7f1bce
...
@@ -425,7 +425,7 @@ class BrowseTopicsTest(TeamsTabBase):
...
@@ -425,7 +425,7 @@ class BrowseTopicsTest(TeamsTabBase):
browse_teams_page
.
click_create_team_link
()
browse_teams_page
.
click_create_team_link
()
create_team_page
=
TeamManagementPage
(
self
.
browser
,
self
.
course_id
,
topic
)
create_team_page
=
TeamManagementPage
(
self
.
browser
,
self
.
course_id
,
topic
)
create_team_page
.
value_for_text_field
(
field_id
=
'name'
,
value
=
'Team Name'
,
press_enter
=
False
)
create_team_page
.
value_for_text_field
(
field_id
=
'name'
,
value
=
'Team Name'
,
press_enter
=
False
)
create_team_page
.
value_for_textarea_field
(
create_team_page
.
set_
value_for_textarea_field
(
field_id
=
'description'
,
field_id
=
'description'
,
value
=
'Team description.'
value
=
'Team description.'
)
)
...
@@ -960,7 +960,7 @@ class TeamFormActions(TeamsTabBase):
...
@@ -960,7 +960,7 @@ class TeamFormActions(TeamsTabBase):
value
=
self
.
TEAMS_NAME
,
value
=
self
.
TEAMS_NAME
,
press_enter
=
False
press_enter
=
False
)
)
self
.
team_management_page
.
value_for_textarea_field
(
self
.
team_management_page
.
set_
value_for_textarea_field
(
field_id
=
'description'
,
field_id
=
'description'
,
value
=
self
.
TEAM_DESCRIPTION
value
=
self
.
TEAM_DESCRIPTION
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment