Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Tyagov
slapos
Commits
33ea9a32
Commit
33ea9a32
authored
Jun 06, 2022
by
Lukas Niegsch
Committed by
Alain Takoudjou
Sep 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
headless-chromium: added a test case that check if the url is valid
parent
75b9189f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
software/headless-chromium/test/test.py
software/headless-chromium/test/test.py
+23
-0
No files found.
software/headless-chromium/test/test.py
View file @
33ea9a32
...
...
@@ -68,3 +68,26 @@ class TestHeadlessChromium(SlapOSInstanceTestCase):
response
=
requests
.
get
(
proxyURL
+
frontend
,
verify
=
False
,
auth
=
(
username
,
password
))
self
.
assertEqual
(
requests
.
codes
[
'ok'
],
response
.
status_code
)
class
TestHeadlessChromiumParameters
(
SlapOSInstanceTestCase
):
instance_parameter_dict
=
{
# this website echoes the get request for debugging purposes
'target-url'
:
'https://httpbin.org/get?a=6&b=4'
,
'incognito'
:
True
,
"block-new-web-contents"
:
False
,
"window-size"
:
"900,600"
}
@
classmethod
def
getInstanceParameterDict
(
cls
):
return
cls
.
instance_parameter_dict
def
setUp
(
self
):
self
.
connection_parameters
=
self
.
requestDefaultInstance
().
getConnectionParameterDict
()
def
test_chromium_loads_target_url_parameter
(
self
):
url
=
self
.
connection_parameters
[
'remote-debug-url'
]
response
=
requests
.
get
(
'%s/json'
%
url
)
loaded_url
=
response
.
json
()[
0
][
'url'
]
self
.
assertEqual
(
loaded_url
,
self
.
instance_parameter_dict
[
'target-url'
])
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