Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
71f8618f
Commit
71f8618f
authored
Mar 13, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio_ui_test: Add test for duplicated software type
This cause editor do not render the form.
parent
81e4b620
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
425 additions
and
0 deletions
+425
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type.xml
...mple-software-schema/minimal_duplicated_software_type.xml
+26
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/instance-input-schema.json.json
..._duplicated_software_type/instance-input-schema.json.json
+20
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/instance-input-schema.json.xml
...l_duplicated_software_type/instance-input-schema.json.xml
+28
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/instance-shared-duplicated-input-schema.json.json
...re_type/instance-shared-duplicated-input-schema.json.json
+19
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/instance-shared-duplicated-input-schema.json.xml
...are_type/instance-shared-duplicated-input-schema.json.xml
+28
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/instance-shared-input-schema.json.json
...ated_software_type/instance-shared-input-schema.json.json
+19
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/instance-shared-input-schema.json.xml
...cated_software_type/instance-shared-input-schema.json.xml
+28
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/software.cfg.json.json
...a/minimal_duplicated_software_type/software.cfg.json.json
+32
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/software.cfg.json.xml
...ma/minimal_duplicated_software_type/software.cfg.json.xml
+28
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/software.cfg.txt
...-schema/minimal_duplicated_software_type/software.cfg.txt
+1
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/software.cfg.xml
...-schema/minimal_duplicated_software_type/software.cfg.xml
+28
-0
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSTestParameterEditorDuplicatedSoftwareType.xml
...testSlapOSJSTestParameterEditorDuplicatedSoftwareType.xml
+62
-0
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSTestParameterEditorDuplicatedSoftwareType.zpt
...testSlapOSJSTestParameterEditorDuplicatedSoftwareType.zpt
+106
-0
No files found.
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type.xml
0 → 100644
View file @
71f8618f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Folder"
module=
"OFS.Folder"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
minimal_duplicated_software_type
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/instance-input-schema.json.json
0 → 100644
View file @
71f8618f
{
"$schema"
:
"http://json-schema.org/draft-07/schema#"
,
"type"
:
"object"
,
"description"
:
"Sample paremeters for a Simple Demo"
,
"properties"
:
{
"simple-string"
:
{
"title"
:
"Example of Simple String"
,
"description"
:
"Example of Simple String"
,
"type"
:
"string"
,
"default"
:
"Simple string "
},
"simple-integer"
:
{
"title"
:
"Example of Simple Integer"
,
"description"
:
"Example of Simple Integer"
,
"type"
:
"integer"
,
"default"
:
1
}
}
}
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/instance-input-schema.json.xml
0 → 100644
View file @
71f8618f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
instance-input-schema.json
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/x-json
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/instance-shared-duplicated-input-schema.json.json
0 → 100644
View file @
71f8618f
{
"$schema"
:
"http://json-schema.org/draft-07/schema#"
,
"type"
:
"object"
,
"description"
:
"Sample paremeters for a Simple Demo under json-in-xml"
,
"properties"
:
{
"simple-string-y"
:
{
"title"
:
"Another String Y"
,
"description"
:
"Example of Simple String"
,
"type"
:
"string"
,
"default"
:
"Y0"
},
"simple-integer-x"
:
{
"title"
:
"Another String X"
,
"description"
:
"Example of Simple Integer"
,
"type"
:
"integer"
,
"default"
:
"X0"
}
}
}
\ No newline at end of file
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/instance-shared-duplicated-input-schema.json.xml
0 → 100644
View file @
71f8618f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
instance-shared-duplicated-input-schema.json
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/x-json
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/instance-shared-input-schema.json.json
0 → 100644
View file @
71f8618f
{
"$schema"
:
"http://json-schema.org/draft-07/schema#"
,
"type"
:
"object"
,
"description"
:
"Sample paremeters for a Simple Demo under json-in-xml"
,
"properties"
:
{
"simple-string-in-json"
:
{
"title"
:
"Another string on JSON"
,
"description"
:
"Example of Simple String"
,
"type"
:
"string"
,
"default"
:
"Simple string "
},
"simple-integer-in-json"
:
{
"title"
:
"Another Integer on JSON"
,
"description"
:
"Example of Simple Integer"
,
"type"
:
"integer"
,
"default"
:
1
}
}
}
\ No newline at end of file
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/instance-shared-input-schema.json.xml
0 → 100644
View file @
71f8618f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
instance-shared-input-schema.json
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/x-json
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/software.cfg.json.json
0 → 100644
View file @
71f8618f
{
"name"
:
"Simple Demo"
,
"description"
:
"Demo Simple"
,
"serialisation"
:
"xml"
,
"software-type"
:
{
"default"
:
{
"title"
:
"Default"
,
"description"
:
"Default reference parameters"
,
"request"
:
"instance-input-schema.json"
,
"response"
:
"instance-output-schema.json"
,
"index"
:
0
},
"default-shared"
:
{
"title"
:
"Default Shared"
,
"description"
:
"Default shared"
,
"request"
:
"instance-shared-input-schema.json"
,
"response"
:
"instance-output-schema.json"
,
"software-type"
:
"default"
,
"shared"
:
true
,
"index"
:
1
},
"default-shared-duplicated"
:
{
"title"
:
"Duplicated another shared"
,
"description"
:
"Default shared"
,
"request"
:
"instance-shared-duplicated-input-schema.json"
,
"response"
:
"instance-output-schema.json"
,
"software-type"
:
"default"
,
"shared"
:
true
,
"index"
:
2
}
}
}
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/software.cfg.json.xml
0 → 100644
View file @
71f8618f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
software.cfg.json
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/x-json
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/software.cfg.txt
0 → 100644
View file @
71f8618f
# Required to mimic software releases
\ No newline at end of file
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/sample-software-schema/minimal_duplicated_software_type/software.cfg.xml
0 → 100644
View file @
71f8618f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
software.cfg
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/plain
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSTestParameterEditorDuplicatedSoftwareType.xml
0 → 100644
View file @
71f8618f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
testSlapOSJSTestParameterEditorDuplicatedSoftwareType
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSTestParameterEditorDuplicatedSoftwareType.zpt
0 → 100644
View file @
71f8618f
<html
xmlns:tal=
"http://xml.zope.org/namespaces/tal"
xmlns:metal=
"http://xml.zope.org/namespaces/metal"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
>
<title>
Test Form don't render if there are duplicated entries on software.cfg.json
</title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr>
<td
rowspan=
"1"
colspan=
"3"
>
Test Parameter editor (Duplicated Software Type)
</td>
</tr>
</thead>
<tbody>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSParameterCommonTemplate/macros/init"
/>
<tr>
<td
colspan=
"3"
><b>
Set URL for the software release
</b></td>
</tr>
<tr>
<td>
type
</td>
<td>
//input[@name='url_string']
</td>
<td>
${base_url}/web_site_module/hostingjs/hateoas/sample-software-schema/minimal_duplicated_software_type/software.cfg
</td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/click_proceed"
/>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@name="text_content" and contains(text(), '
<
instance
><
/instance
>
')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//textarea[@name="text_content" and contains(text(), '
<
instance
><
/instance
>
')]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@class="error"]//span[@class="error_msg" and contains(text(), "Non valid JSON for software.cfg.json, duplicated entry")]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//div[@class="error"]//span[@class="error_msg" and contains(text(), "Non valid JSON for software.cfg.json, duplicated entry")]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@name="text_content"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//textarea[@name="text_content"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@name="text_content" and contains(text(), '
<
?xml version=
"
1.0
"
encoding=
"
utf-8
"
?
>
')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//textarea[@name="text_content" and contains(text(), '
<
?xml version=
"
1.0
"
encoding=
"
utf-8
"
?
>
')]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//textarea[@name="text_content" and contains(text(), '
<
instance
><
/instance
>
')]
</td>
<td></td>
</tr>
<tr>
<td>
pause
</td>
<td>
500
</td>
<td>
500
</td>
</tr>
<tr>
<td>
type
</td>
<td>
//textarea[@name="text_content"]
</td>
<td>
<
?xml version=
"
1.0
"
encoding=
"
utf-8
"
?
><
instance
><
parameter id=
"
_
">
{
"
simple-string-in-json
"
:
"
1024
"
}
<
/parameter
><
/instance
>
</td>
</tr>
<tr>
<td>
assertValue
</td>
<td>
//textarea[@name="text_content"]
</td>
<td>
<
?xml version=
"
1.0
"
encoding=
"
utf-8
"
?
><
instance
><
parameter id=
"
_
">
{
"
simple-string-in-json
"
:
"
1024
"
}
<
/parameter
><
/instance
>
</td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSParameterCommonTemplate/macros/click_proceed_and_wait_for_hash"
/>
<tr>
<td>
waitForTextPresent
</td>
<td>
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiID8
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiID8+PGluc3RhbmNlPjxwYXJhbWV0ZXIgaWQ9Il8iPnsic2ltcGxlLXN0cmluZy1pbi1qc29uIjogIjEwMjQifTwvcGFyYW1ldGVyPjwvaW5zdGFuY2U+
</td>
<td></td>
</tr>
</tbody>
</table>
</body>
</html>
\ No newline at end of file
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