Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
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
Jérome Perrin
erp5
Commits
87f2f5f2
Commit
87f2f5f2
authored
Dec 09, 2022
by
Jérome Perrin
Committed by
Kazuhiko Shiozaki
Jul 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
web_ui_test: add a test for editing and viewing web page in xhtml style
parent
3d0bb3e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
243 additions
and
0 deletions
+243
-0
bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPageSaveAndViewXHTMLStyle-reference-snapshot-1.png.png
...WebPageSaveAndViewXHTMLStyle-reference-snapshot-1.png.png
+0
-0
bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPageSaveAndViewXHTMLStyle-reference-snapshot-1.png.xml
...WebPageSaveAndViewXHTMLStyle-reference-snapshot-1.png.xml
+36
-0
bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPageSaveAndViewXHTMLStyle.xml
...tests/erp5_web_zuite/testWebPageSaveAndViewXHTMLStyle.xml
+58
-0
bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPageSaveAndViewXHTMLStyle.zpt
...tests/erp5_web_zuite/testWebPageSaveAndViewXHTMLStyle.zpt
+149
-0
No files found.
bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPageSaveAndViewXHTMLStyle-reference-snapshot-1.png.png
0 → 100644
View file @
87f2f5f2
17.7 KB
bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPageSaveAndViewXHTMLStyle-reference-snapshot-1.png.xml
0 → 100644
View file @
87f2f5f2
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Image"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
testWebPageSaveAndViewXHTMLStyle-reference-snapshot-1.png
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
image/png
</string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<int>
281
</int>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
testWebPageSaveAndViewXHTMLStyle-reference-snapshot-1.png
</string>
</value>
</item>
<item>
<key>
<string>
width
</string>
</key>
<value>
<int>
1115
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPageSaveAndViewXHTMLStyle.xml
0 → 100644
View file @
87f2f5f2
<?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=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<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>
testWebPageSaveAndViewXHTMLStyle
</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>
Web Page Save and View with erp5_xhtml_style
</unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_web_ui_test/PathTemplateItem/portal_tests/erp5_web_zuite/testWebPageSaveAndViewXHTMLStyle.zpt
0 → 100644
View file @
87f2f5f2
<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
tal:content=
"template/title_and_id"
></title>
</head>
<body>
<table
cellpadding=
"1"
cellspacing=
"1"
border=
"1"
>
<thead>
<tr>
<td
rowspan=
"1"
colspan=
"3"
tal:content=
"template/title_and_id"
></td>
</tr>
</thead>
<tbody>
<tal:block
metal:use-macro=
"here/Zuite_erp5_web_common/macros/init"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/web_page_module/WebPageModule_createTestWebPage?id=test_web_page
&
reference=test_web_page
</td>
<td></td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Created Successfully.
</td>
<td></td>
<td></td>
</tr>
<tr>
<td>
open
</td>
<td>
${base_url}/web_page_module/test_web_page/WebPage_viewEditor?editable_mode:int=1
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope="editor"]//iframe
</td>
<td></td>
</tr>
<tr>
<!-- gadget iframe -->
<td>
selectFrame
</td>
<td>
//div[@data-gadget-scope="editor"]//iframe
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//iframe
</td>
<td></td>
</tr>
<tr>
<!-- CKEditor iframe -->
<td>
selectFrame
</td>
<td>
//iframe
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//body
</td>
<td></td>
</tr>
<tr>
<td>
assertEval
</td>
<td>
(function (){
selenium.browserbot.getCurrentWindow().document.body.innerHTML = `
<
h1
>
Some Example content
<
/h1
>
<
h2
>
Tables
<
/h2
>
<
table border="1"
>
<
caption
>
A table with border=1
<
/caption
>
<
thead
>
<
tr
>
<
th
>
First
<
/th
>
<
th
>
Second
<
/th
>
<
/tr
>
<
/thead
>
<
tbody
>
<
tr
>
<
td
>
One
<
/td
>
<
td
>
Two
<
/td
>
<
/tr
>
<
tr
>
<
td
>
1
<
/td
>
<
td
>
2
<
/td
>
<
/tr
>
<
/tbody
>
<
/table
>
<
table
>
<
caption
>
A table without border=1
<
/caption
>
<
thead
>
<
tr
>
<
th
>
Third
<
/th
>
<
th
>
Forth
<
/th
>
<
/tr
>
<
/thead
>
<
tbody
>
<
tr
>
<
td
>
Three
<
/td
>
<
td
>
Four
<
/td
>
<
/tr
>
<
tr
>
<
td
>
3
<
/td
>
<
td
>
4
<
/td
>
<
/tr
>
<
/tbody
>
<
/table
>
`;
return 'OK';
})()
<td>
OK
</td>
</tr>
<tr>
<td>
selectFrame
</td>
<td>
relative=top
</td>
<td></td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
//button[@name="Base_edit:method"]
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
Data updated.
</td>
<td></td>
</tr>
<tr>
<td>
clickAndWait
</td>
<td>
link=View
</td>
<td></td>
</tr>
<tr>
<td>
waitForText
</td>
<td>
//div[contains(@data-gadget-url, "gadget_html_viewer.html")]/h1
</td>
<td>
Some Example content
</td>
</tr>
<tr>
<td>
verifyImageMatchSnapshot
</td>
<td>
//div[contains(@data-gadget-url, "gadget_html_viewer.html")]
</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