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
139
Merge Requests
139
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
3cc5e0bd
Commit
3cc5e0bd
authored
Feb 06, 2020
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_document_scanner_ui_test: Fix test to cover latest changes
parent
0d7bca58
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
119 additions
and
41 deletions
+119
-41
bt5/erp5_document_scanner_ui_test/PathTemplateItem/portal_tests/renderjs_erp5_document_scanner_zuite/testScanDocument.zpt
...renderjs_erp5_document_scanner_zuite/testScanDocument.zpt
+119
-41
No files found.
bt5/erp5_document_scanner_ui_test/PathTemplateItem/portal_tests/renderjs_erp5_document_scanner_zuite/testScanDocument.zpt
View file @
3cc5e0bd
...
...
@@ -68,11 +68,7 @@
<td>
field_your_title
</td>
<td>
Test Scan Document
<span
tal:replace=
"python: DateTime().ISO()"
></span></td>
</tr>
<!--tr>
<td>type</td>
<td>field_your_reference</td>
<td>TESTSCANDOCUMENT<span tal:replace="python: DateTime().ISO()"></span></td>
</tr-->
<tr>
<td>
type
</td>
<td>
field_your_language
</td>
...
...
@@ -95,7 +91,7 @@
</tr>
<div
tal:repeat=
"item python:range(2)"
>
<!-- Click on Capture -->
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
...
...
@@ -106,11 +102,17 @@
<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="reset-btn ui-btn-icon-left ui-icon-times"]
</td>
<td></td>
</tr>
<!-- Click on Delete -->
<tr>
<td>
click
</td>
<td>
//button[@class="reset-btn ui-btn-icon-left ui-icon-times"]
</td>
...
...
@@ -121,6 +123,7 @@
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
<td></td>
</tr>
<!-- Click on Capture again -->
<tr>
<td>
click
</td>
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
...
...
@@ -131,42 +134,128 @@
<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>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
'text': 'Captured'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/>
</tal:block>
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@class="take-picture-btn ui-btn-icon-left ui-icon-circle"]
</td>
<td></td>
</tr>
<!-- wait upload starts -->
<tr>
<td>
waitForElementPresent
</td>
<td>
//button[@class="ui-btn-icon-left ui-icon-spinner"]
</td>
<td></td>
</tr>
</div>
<!-- wait upload finish -->
<tr>
<td>
storeValue
</td>
<td>
//
input[@id="field_your_active_process_url
"]
</td>
<td>
active_process_url
</td>
<td>
waitForElementNotPresent
</td>
<td>
//
button[@class="ui-btn-icon-left ui-icon-spinner
"]
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog"
/>
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
'text': 'The document is being created in background.'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tr>
<td>
open
</td>
<td>
${base_url}/erp5/Base_assertActiveProcessHasOneImage?active_process_url=${active_process_url}
</td>
<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>
assertTextPresent
</td>
<td>
OK
</td>
<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>
<td>
waitForElementNotPresent
</td>
<td>
//button[@class="ui-btn-icon-left ui-icon-spinner"]
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog"
/>
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
'text': 'The document is being created in background.'}"
>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded"
/>
<tal:block
metal:use-macro=
"here/Zuite_CommonTemplate/macros/wait_for_activities"
/>
...
...
@@ -215,12 +304,12 @@
</tr>
<tr>
<td>
waitForTextPresent
</td>
<td>
of
2
</td>
<td>
of
3
</td>
<td></td>
</tr>
<tr>
<td>
assertTextPresent
</td>
<td>
of
2
</td>
<td>
of
3
</td>
<td></td>
</tr>
<tr>
...
...
@@ -229,17 +318,6 @@
<td></td>
</tr>
<!--tr>
<td>open</td>
<td>${base_url}/erp5/Base_removeActiveProcessFromFileSystem?active_process_url=${active_process_url}</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Done</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