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
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Boxiang Sun
slapos.core
Commits
6e41423d
Commit
6e41423d
authored
Aug 08, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio_ui_test: Update test for certificate
parent
332b5582
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
159 additions
and
80 deletions
+159
-80
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSAccountCertificate.zpt
...l_tests/slaposjs_zuite/testSlapOSJSAccountCertificate.zpt
+143
-75
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSAccountForceReLogin.zpt
..._tests/slaposjs_zuite/testSlapOSJSAccountForceReLogin.zpt
+0
-5
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/Zuite_SlapOSCommonTemplate.zpt
...ortal_skins/slapos_ui_test/Zuite_SlapOSCommonTemplate.zpt
+16
-0
No files found.
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSAccountCertificate.zpt
View file @
6e41423d
...
...
@@ -28,7 +28,6 @@
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text"
/>
</tal:block>
<tr>
<td
colspan=
"3"
><b>
Request User Certificate
</b>
</td>
</tr>
...
...
@@ -75,34 +74,11 @@
</tal:block>
<tr>
<td
colspan=
"3"
><b>
Request User Certificate
</b>
</td>
<td
colspan=
"3"
><b>
Request User Certificate
(Again)
</b>
</td>
</tr>
<tal:block
define=
"menu_action python: 'Request Certificate'"
>
<tr>
<td
colspan=
"3"
><b
tal:content=
"python: 'Click on %s' % menu_action"
>
Menu Item
</b></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td
tal:content=
"python: '//div[contains(@data-gadget-url, \'gadget_slapos_header.html\')]//a[@data-i18n=\'%s\']' % menu_action"
>
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td
tal:content=
"python: '//div[contains(@data-gadget-url, \'gadget_slapos_header.html\')]//a[@data-i18n=\'%s\']' % menu_action"
>
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td
tal:content=
"python: '//div[contains(@data-gadget-url, \'gadget_slapos_header.html\')]//a[@data-i18n=\'%s\']' % menu_action"
>
</td>
<td></td>
</tr>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/click_submenu_action"
/>
</tal:block>
<tal:block
define=
"header python: 'Request New Certificate'; "
>
...
...
@@ -111,34 +87,94 @@
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/click_proceed"
/>
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
'text': 'This person already has one certificate, please revoke it before request a new one..'}"
>
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
'text': 'Certificate is Requested.'}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification"
/>
</tal:block>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@name="certificate"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//textarea[@name="certificate"]
</td>
<td></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td>
//textarea[@name="key"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//textarea[@name="key"]
</td>
<td></td>
</tr>
<tal:block
define=
"header python: 'Request New Certificate'; "
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/assert_page_header"
/>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/click_page_header"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page"
/>
<tal:block
define=
"person_name python: 'Demo User Functional'"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/access_menu_item_account"
/>
</tal:block>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(3)', 'footer': '${count} Records'};
dummy python: context.REQUEST.set('mapping', {'count': '3'})"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text"
/>
</tal:block>
<!-- We cannot assert title since we UI is generated automatically -->
<tr>
<td>
verifyTextPresent
</td>
<td>
Certificate Login
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Revoke Certificate
</b></td>
<td>
verifyTextPresent
</td>
<td>
Certificate Login
</td>
<td></td>
</tr>
<tr>
<td>
verifyTextPresent
</td>
<td>
CERTLOGIN-
</td>
<td></td>
</tr>
<tal:block
define=
"menu_action python: 'Revoke Certificate'"
>
<tr>
<td>
verifyTextPresent
</td>
<td>
CERTLOGIN-
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[text()="Certificate Login"]
</td>
<td></td>
</tr>
<tal:block
define=
"header python: 'Certificate Login: ${title}';
dummy python: context.REQUEST.set('mapping', {'title' : ''})"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/assert_page_header_contains"
/>
</tal:block>
<tal:block
define=
"menu_action python: 'Delete'"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/click_submenu_action"
/>
</tal:block>
<tal:block
define=
"header python: 'Revoke Person Certificate'; "
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/assert_page_header"
/>
<tal:block
define=
"header python: 'Disable Login: ${title}';
dummy python: context.REQUEST.set('mapping', {'title' : ''})"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/assert_page_header_contains"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/click_proceed"
/>
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
'text': '
Certificate is Revok
ed.'}"
>
'text': '
Login is Disabl
ed.'}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification"
/>
</tal:block>
...
...
@@ -147,74 +183,106 @@
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/assert_page_header"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page"
/>
<tal:block
define=
"person_name python: 'Demo User Functional'"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/access_menu_item_account"
/>
</tal:block>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(2)', 'footer': '${count} Records'};
dummy python: context.REQUEST.set('mapping', {'count': '2'})"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text"
/>
</tal:block>
<!-- We cannot assert title since we UI is generated automatically -->
<tr>
<td>
verifyTextPresent
</td>
<td>
Certificate Login
</td>
<td></td>
</tr>
<tr>
<td>
verifyTextPresent
</td>
<td>
Certificate Login
</td>
<td></td>
</tr>
<tr>
<td
colspan=
"3"
><b>
Request User Certificate again
</b>
</td>
<td>
verifyTextPresent
</td>
<td>
CERTLOGIN-
</td>
<td></td>
</tr>
<tal:block
define=
"menu_action python: 'Request Certificate'"
>
<tr>
<td
colspan=
"3"
><b
tal:content=
"python: 'Click on %s' % menu_action"
>
Menu Item
</b></td>
</tr>
<tr>
<td>
waitForElementPresent
</td>
<td
tal:content=
"python: '//div[contains(@data-gadget-url, \'gadget_slapos_header.html\')]//a[@data-i18n=\'%s\']' % menu_action"
>
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td
tal:content=
"python: '//div[contains(@data-gadget-url, \'gadget_slapos_header.html\')]//a[@data-i18n=\'%s\']' % menu_action"
>
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td
tal:content=
"python: '//div[contains(@data-gadget-url, \'gadget_slapos_header.html\')]//a[@data-i18n=\'%s\']' % menu_action"
>
</td>
<td></td>
</tr>
<tr>
<td>
verifyTextPresent
</td>
<td>
CERTLOGIN-
</td>
<td></td>
</tr>
<tr>
<td>
click
</td>
<td>
//a[text()="Certificate Login"]
</td>
<td></td>
</tr>
<tal:block
define=
"header python: 'Certificate Login: ${title}';
dummy python: context.REQUEST.set('mapping', {'title' : ''}) "
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/assert_page_header_contains"
/>
</tal:block>
<tal:block
define=
"header python: 'Request New Certificate'; "
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/assert_page_header"
/>
<tal:block
define=
"menu_action python: 'Delete'"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/click_submenu_action"
/>
</tal:block>
<tal:block
define=
"header python: 'Disable Login: ${title}';
dummy python: context.REQUEST.set('mapping', {'title' : ''}) "
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/assert_page_header_contains"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/click_proceed"
/>
<tal:block
tal:define=
"notification_configuration python: {'class': 'success',
'text': '
Certificate is Request
ed.'}"
>
'text': '
Login is Disabl
ed.'}"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification"
/>
</tal:block>
<tal:block
tal:define=
"header python: 'Your Account : ${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'Demo User Functional'}) "
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/assert_page_header"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page"
/>
<tal:block
define=
"person_name python: 'Demo User Functional'"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/access_menu_item_account"
/>
</tal:block>
<tal:block
tal:define=
"pagination_configuration python: {'header': '(1)', 'footer': '${count} Records'};
dummy python: context.REQUEST.set('mapping', {'count': '1'})"
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text"
/>
</tal:block>
<!-- We cannot assert title since we UI is generated automatically -->
<tr>
<td>
waitForElemen
tPresent
</td>
<td>
//textarea[@name="certificate"]
</td>
<td>
verifyTextNo
tPresent
</td>
<td>
Certificate Login
</td>
<td></td>
</tr>
<tr>
<td>
assertElemen
tPresent
</td>
<td>
//textarea[@name="certificate"]
</td>
<td>
verifyTextNo
tPresent
</td>
<td>
Certificate Login
</td>
<td></td>
</tr>
<tr>
<td>
waitForElemen
tPresent
</td>
<td>
//textarea[@name="key"]
</td>
<td>
verifyTextNo
tPresent
</td>
<td>
CERTLOGIN-
</td>
<td></td>
</tr>
<tr>
<td>
assertElemen
tPresent
</td>
<td>
//textarea[@name="key"]
</td>
<td>
verifyTextNo
tPresent
</td>
<td>
CERTLOGIN-
</td>
<td></td>
</tr>
<tal:block
define=
"header python: 'Request New Certificate'; "
>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/assert_page_header"
/>
</tal:block>
<tal:block
metal:use-macro=
"here/Zuite_SlapOSCommonTemplate/macros/slapos_logout"
/>
</tbody>
...
...
master/bt5/slapos_jio_ui_test/PathTemplateItem/portal_tests/slaposjs_zuite/testSlapOSJSAccountForceReLogin.zpt
View file @
6e41423d
...
...
@@ -147,11 +147,6 @@ function redirect us to the login page -->
<td>
//a[@data-i18n="Request Certificate"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td>
//a[@data-i18n="Revoke Certificate"]
</td>
<td></td>
</tr>
<tr>
<td>
assertElementPresent
</td>
<td
tal:content=
"python: '//label[contains(text(), \'%s\')]' % (here.Base_translateString('First Name', lang=lang))"
></td>
...
...
master/bt5/slapos_jio_ui_test/SkinTemplateItem/portal_skins/slapos_ui_test/Zuite_SlapOSCommonTemplate.zpt
View file @
6e41423d
...
...
@@ -462,6 +462,22 @@
</tal:block>
</tal:block>
<tal:block metal:define-macro="assert_page_header_contains">
<tal:block tal:define="header_translation python: here.Base_translateString(header, mapping=context.REQUEST.get('mapping', {}), lang=lang);
dummy python:context.REQUEST.set('mapping', {})">
<tr>
<td>waitForElementPresent</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_slapos_header.html\')]//a[contains(@data-i18n, \'%s\')]' % header_translation"></td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_slapos_header.html\')]//a[contains(@data-i18n, \'%s\')]' % header_translation"></td>
<td></td>
</tr>
</tal:block>
</tal:block>
<tal:block metal:define-macro="click_page_header">
<tal:block tal:define="header_translation python: here.Base_translateString(header, mapping=context.REQUEST.get('mapping', {}), lang=lang);
dummy python:context.REQUEST.set('mapping', {})">
...
...
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