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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
erp5
Commits
d3571fc7
Commit
d3571fc7
authored
Feb 08, 2020
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_document_scanner_ui_test: Improve test to cover all buttons
parent
73eca3b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
104 additions
and
4 deletions
+104
-4
bt5/erp5_document_scanner_ui_test/PathTemplateItem/portal_tests/renderjs_erp5_document_scanner_zuite/testScanDocument.zpt
...renderjs_erp5_document_scanner_zuite/testScanDocument.zpt
+104
-4
No files found.
bt5/erp5_document_scanner_ui_test/PathTemplateItem/portal_tests/renderjs_erp5_document_scanner_zuite/testScanDocument.zpt
View file @
d3571fc7
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
</tr>
</tr>
<div
tal:repeat=
"item python:range(2)"
>
<div
tal:repeat=
"item python:range(2)"
>
<!-- Click on Capture -->
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
...
@@ -102,11 +102,17 @@
...
@@ -102,11 +102,17 @@
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@class="cropper-wrap-box"]
</td>
<td></td>
</tr>
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
<td>
//button[@class="reset-btn ui-btn-icon-left ui-icon-times"]
</td>
<td>
//button[@class="reset-btn ui-btn-icon-left ui-icon-times"]
</td>
<td></td>
<td></td>
</tr>
</tr>
<!-- Click on Delete -->
<tr>
<tr>
<td>
click
</td>
<td>
click
</td>
<td>
//button[@class="reset-btn ui-btn-icon-left ui-icon-times"]
</td>
<td>
//button[@class="reset-btn ui-btn-icon-left ui-icon-times"]
</td>
...
@@ -117,6 +123,7 @@
...
@@ -117,6 +123,7 @@
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
<td></td>
<td></td>
</tr>
</tr>
<!-- Click on Capture again -->
<tr>
<tr>
<td>
click
</td>
<td>
click
</td>
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
...
@@ -127,6 +134,7 @@
...
@@ -127,6 +134,7 @@
<td>
//button[@class="confirm-btn ui-btn-icon-left ui-icon-check"]
</td>
<td>
//button[@class="confirm-btn ui-btn-icon-left ui-icon-check"]
</td>
<td></td>
<td></td>
</tr>
</tr>
<!-- Click on Confirm -->
<tr>
<tr>
<td>
click
</td>
<td>
click
</td>
<td>
//button[@class="confirm-btn ui-btn-icon-left ui-icon-check"]
</td>
<td>
//button[@class="confirm-btn ui-btn-icon-left ui-icon-check"]
</td>
...
@@ -137,18 +145,110 @@
...
@@ -137,18 +145,110 @@
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
<td></td>
<td></td>
</tr>
</tr>
<!-- wait upload starts -->
<tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
waitForElementPresent
</td>
<td>
//button[@class="ui-btn-icon-left ui-icon-spinner"]
</td>
<td>
//button[@class="ui-btn-icon-left ui-icon-spinner"]
</td>
<td></td>
<td></td>
</tr>
</tr>
</div>
</div>
<!-- wait upload finish -->
<tr>
<td>
waitForElementNotPresent
</td>
<td>
//button[@class="ui-btn-icon-left ui-icon-spinner"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//button[@class="new-btn ui-btn-icon-left ui-icon-plus" and @disabled]
</td>
<td></td>
</tr>
<!-- check if first image exists -->
<tr>
<td>
assertElementPresent
</td>
<td>
//img[@data-page="0" and @class="show-img"]
</td>
<td></td>
</tr>
<!-- check if second image exists -->
<tr>
<td>
assertElementPresent
</td>
<td>
//img[@data-page="1" and @class="show-img"]
</td>
<td></td>
</tr>
<!-- check if third image does not exists -->
<tr>
<td>
assertElementNotPresent
</td>
<td>
//img[@data-page="2" and @class="show-img"]
</td>
<td></td>
</tr>
<!-- open first image -->
<tr>
<td>
click
</td>
<td>
//img[@data-page="0" and @class="show-img"]
</td>
<td></td>
</tr>
<!-- check if delete button appears -->
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@class="delete-btn ui-btn-icon-left ui-icon-times"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementNotPresent
</td>
<td>
//button[@class="new-btn ui-btn-icon-left ui-icon-plus" and @disabled]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//button[@class="new-btn ui-btn-icon-left ui-icon-plus"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//div[@class="cropper-wrap-box"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@class="confirm-btn ui-btn-icon-left ui-icon-check"]
</td>
<td></td>
</tr>
<!-- Click on Confirm -->
<tr>
<td>
click
</td>
<td>
//button[@class="confirm-btn ui-btn-icon-left ui-icon-check"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@class="ui-btn-icon-left ui-icon-spinner"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//img[@data-page="2" and @class="show-img"]
</td>
<td></td>
</tr>
<tr>
<tr>
<td>
waitForElementNotPresent
</td>
<td>
waitForElementNotPresent
</td>
<td>
//button[@class="ui-btn-icon-left ui-icon-spinner"]
</td>
<td>
//button[@class="ui-btn-icon-left ui-icon-spinner"]
</td>
<td></td>
<td></td>
</tr>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog"
/>
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
...
@@ -204,12 +304,12 @@
...
@@ -204,12 +304,12 @@
</tr>
</tr>
<tr>
<tr>
<td>
waitForTextPresent
</td>
<td>
waitForTextPresent
</td>
<td>
of
2
</td>
<td>
of
3
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
<td>
assertTextPresent
</td>
<td>
assertTextPresent
</td>
<td>
of
2
</td>
<td>
of
3
</td>
<td></td>
<td></td>
</tr>
</tr>
<tr>
<tr>
...
...
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