Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
grady
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Maximilian Michal
grady
Commits
aa37a7e3
Commit
aa37a7e3
authored
2 years ago
by
Egi Brako
Committed by
Jakob Dieterle
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
modified multiple_exams_test.py's test_select_exam function to test any number of exams given
parent
e33b0b57
No related branches found
Branches containing commit
No related tags found
1 merge request
!244
Resolve "Make exam a many to many field on StudentInfo model"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/src/pages/ExamSelectionPage.vue
+2
-1
2 additions, 1 deletion
frontend/src/pages/ExamSelectionPage.vue
functional_tests/multiple_exams_test.py
+12
-5
12 additions, 5 deletions
functional_tests/multiple_exams_test.py
with
14 additions
and
6 deletions
frontend/src/pages/ExamSelectionPage.vue
+
2
−
1
View file @
aa37a7e3
...
...
@@ -33,8 +33,9 @@
You can always come back and change your selection
</p>
</v-card-text>
<v-list
id=
"selectionList"
>
<v-list>
<v-list-item
id=
"listItem"
v-for=
"examType in examTypes"
id=
"listItem"
:key=
"examType.pk"
...
...
This diff is collapsed.
Click to expand it.
functional_tests/multiple_exams_test.py
+
12
−
5
View file @
aa37a7e3
...
...
@@ -6,6 +6,7 @@ from constance.test import override_config
from
core.models
import
UserAccount
from
util.factories
import
make_test_data
,
make_exams
from
functional_tests.util
import
GradyTestCase
,
reset_browser_after_test
from
time
import
sleep
class
multipleExamsTest
(
GradyTestCase
):
...
...
@@ -143,14 +144,20 @@ class multipleExamsTest(GradyTestCase):
WebDriverWait
(
self
.
browser
,
10
).
until
(
ec
.
url_contains
(
'
/exam_selection
'
))
def
test_select_exam
(
self
):
testBool
=
True
reviewer
=
self
.
test_data
[
'
reviewers
'
][
0
]
self
.
_login
(
reviewer
)
#selectionList = self.browser.find_element_by_xpath('//div[@id="selectionList"]')
items
=
self
.
browser
.
find_elements_by_tag_name
(
"
v-list
"
)
print
(
items
)
#items[0].click()
self
.
assertTrue
(
True
)
items
=
self
.
browser
.
find_elements_by_id
(
"
listItem
"
)
for
i
in
range
(
len
(
items
)):
itemText
=
items
[
i
].
text
items
[
i
].
click
()
testBool
=
itemText
==
self
.
browser
.
find_element_by_class_name
(
"
title
"
).
text
if
(
testBool
!=
True
):
break
self
.
browser
.
find_element_by_id
(
"
examsButton
"
).
click
()
items
=
self
.
browser
.
find_elements_by_id
(
"
listItem
"
)
self
.
assertTrue
(
testBool
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment