Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush Tiwari
erp5
Commits
9b5c665d
Commit
9b5c665d
authored
Sep 04, 2018
by
Ayush Tiwari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui_test]: Update test for Historical Diff View
parent
07c3f8fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
7 deletions
+76
-7
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewHistoricalRevisionLink.zpt
...ge_templates_zuite/testFormViewHistoricalRevisionLink.zpt
+76
-7
No files found.
bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_page_templates_zuite/testFormViewHistoricalRevisionLink.zpt
View file @
9b5c665d
...
...
@@ -64,6 +64,21 @@
<td>
A new foo
</td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@name='field_my_lines_list']
</td>
<td></td>
</tr>
<tr>
<td>
type
</td>
<td>
//textarea[@name='field_my_lines_list']
</td>
<td>
Foo
Bar
</td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/save"
/>
<!-- Go to History tab -->
...
...
@@ -118,24 +133,29 @@
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope='
field
_listbox']//table/tbody
</td>
<td>
//div[@data-gadget-scope='
x0
_listbox']//table/tbody
</td>
<td></td>
</tr>
<!-- Check if the columns exists or not. Can be done by just checking the head -->
<tr>
<td>
verifyText
</td>
<td>
//div[@data-gadget-scope='
field
_listbox']//table/thead/tr[1]/th[1]
</td>
<td>
//div[@data-gadget-scope='
x0
_listbox']//table/thead/tr[1]/th[1]
</td>
<td>
Property Name
</td>
</tr>
<tr>
<td>
verifyText
</td>
<td>
//div[@data-gadget-scope='
field
_listbox']//table/thead/tr[1]/th[2]
</td>
<td>
//div[@data-gadget-scope='
x0
_listbox']//table/thead/tr[1]/th[2]
</td>
<td>
Diff Viewer
</td>
</tr>
<tr>
<td>
verifyText
</td>
<td>
//div[@data-gadget-scope='x0_listbox']//table/thead/tr[1]/th[3]
</td>
<td>
Current Value
</td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@data-gadget-scope='
field_listbox']//table/tbody/tr[2
]/td[2]//iframe
</td>
<td>
//div[@data-gadget-scope='
x0_listbox']//table/tbody/tr[1
]/td[2]//iframe
</td>
<td></td>
</tr>
<tr>
...
...
@@ -143,17 +163,66 @@
<td>
1000
</td>
<td></td>
</tr>
<!-- Check for the value of diff in I
f
rame -->
<!-- Check for the value of diff in I
F
rame -->
<tr>
<td>
storeEval
</td>
<td>
document.querySelector('#selenium_myiframe').contentWindow.document.evaluate("//div[@data-gadget-scope='
field_listbox']//table/tbody/tr[2
]/td[2]//iframe", document.querySelector('#selenium_myiframe').contentWindow.document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.contentWindow.document.body.textContent
</td>
<td>
document.querySelector('#selenium_myiframe').contentWindow.document.evaluate("//div[@data-gadget-scope='
x0_listbox']//table/tbody/tr[1
]/td[2]//iframe", document.querySelector('#selenium_myiframe').contentWindow.document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.contentWindow.document.body.textContent
</td>
<td>
diff_content
</td>
</tr>
<tr>
<td>
verifyEval
</td>
<!-- Verify the value after removing the spaces and line breaks -->
<td>
storedVars['diff_content'].replace(/(\r\n\t|\n|\r\t)/gm,"").replace(/\s+/g, '')
</td>
<td>
1-1+Anewfoo
</td>
<td>
1-1+('Foo','Bar')
</td>
</tr>
<tr>
<td>
verifyText
</td>
<td>
//div[@data-gadget-scope='x0_listbox']//table/tbody/tr[1]/td[3]
</td>
<td>
Foo,Bar
</td>
</tr>
<!-- Now let's test the listbox and its values for the 2nd lisbox where we expect
the diff to be shown according to values, i.e, old, new and current values -->
<tr>
<td>
verifyText
</td>
<td>
//div[@data-gadget-scope='x1_listbox']//table/thead/tr[1]/th[1]
</td>
<td>
Property Name
</td>
</tr>
<tr>
<td>
verifyText
</td>
<td>
//div[@data-gadget-scope='x1_listbox']//table/thead/tr[1]/th[2]
</td>
<td>
Old Value
</td>
</tr>
<tr>
<td>
verifyText
</td>
<td>
//div[@data-gadget-scope='x1_listbox']//table/thead/tr[1]/th[3]
</td>
<td>
New Value
</td>
</tr>
<tr>
<td>
verifyText
</td>
<td>
//div[@data-gadget-scope='x1_listbox']//table/thead/tr[1]/th[4]
</td>
<td>
Current Value
</td>
</tr>
<tr>
<td>
verifyText
</td>
<td>
//div[@data-gadget-scope='x1_listbox']//table/tbody/tr[1]/td[1]
</td>
<td>
short_title
</td>
</tr>
<tr>
<td>
verifyText
</td>
<td>
//div[@data-gadget-scope='x1_listbox']//table/tbody/tr[1]/td[2]
</td>
<td></td>
</tr>
<tr>
<td>
verifyText
</td>
<td>
//div[@data-gadget-scope='x1_listbox']//table/tbody/tr[1]/td[3]
</td>
<td>
A new foo
</td>
</tr>
<tr>
<td>
verifyText
</td>
<td>
//div[@data-gadget-scope='x1_listbox']//table/tbody/tr[1]/td[4]
</td>
<td>
A new foo
</td>
</tr>
</tbody></table>
...
...
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