Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ASE_Y2S1_CP_G4
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Joshua Gill
ASE_Y2S1_CP_G4
Commits
eb0f51f3
Commit
eb0f51f3
authored
3 years ago
by
John Watkins
Browse files
Options
Downloads
Patches
Plain Diff
finished test suite for dashboard
parent
9f0bd9f5
No related branches found
No related tags found
2 merge requests
!114
LoggingService service class, new method to add a log to the "Logs" table when...
,
!111
fixed superadmin issue
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
selenium testing/suites/__pycache__/dashboard.cpython-39.pyc
+0
-0
0 additions, 0 deletions
selenium testing/suites/__pycache__/dashboard.cpython-39.pyc
selenium testing/suites/dashboard.py
+21
-1
21 additions, 1 deletion
selenium testing/suites/dashboard.py
with
21 additions
and
1 deletion
selenium testing/suites/__pycache__/dashboard.cpython-39.pyc
+
0
−
0
View file @
eb0f51f3
No preview for this file type
This diff is collapsed.
Click to expand it.
selenium testing/suites/dashboard.py
+
21
−
1
View file @
eb0f51f3
...
...
@@ -16,7 +16,8 @@ class Dashboard:
self
.
testSearchByTermCorrectAmountOfResults
,
self
.
testSearchByTermIgnoresCase
,
self
.
testCanAddTagToSearch
,
self
.
testSearchByTagReturnsCorrectAmount
self
.
testSearchByTagReturnsCorrectAmount
,
self
.
testWhenStarPressedBusinessIsMovedToTop
]
def
__str__
(
self
):
...
...
@@ -128,4 +129,23 @@ class Dashboard:
input
()
#Favourite businesses
def
testWhenStarPressedBusinessIsMovedToTop
(
self
):
driver
=
startTest
(
self
.
options
)
login
(
driver
)
star
=
driver
.
find_element
(
By
.
XPATH
,
'
//*[@id=
"
business_card_container
"
]/div[1]/div[2]
'
)
driver
.
execute_script
(
"
arguments[0].click();
"
,
star
)
driver
.
refresh
()
time
.
sleep
(
1
)
results
=
driver
.
find_elements
(
By
.
CLASS_NAME
,
"
reward_card
"
)
try
:
assert
len
(
results
)
==
1
success
(
"
Pressing the star moves the icon to favourited
"
)
self
.
passed
+=
1
except
AssertionError
:
error
(
"
Items do not move when favourited
"
)
input
()
\ No newline at end of file
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