-
-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4019 from plone/port-robot-tests
Port robot tests
- Loading branch information
Showing
42 changed files
with
2,156 additions
and
3,430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,93 @@ | ||
*** Keywords ***************************************************************** | ||
*** Keywords *** | ||
|
||
# --- SETUP ------------------------------------------------------------------ | ||
# SETUP | ||
|
||
Refresh JS/CSS resources | ||
# Not needed anymore, and it is breaking the Plone Zope 4 tests. | ||
# Keep the keyword for backwards compatibility purposes. | ||
Sleep 0.0000001 | ||
|
||
# --- GIVEN ------------------------------------------------------------------ | ||
# GIVEN | ||
|
||
a logged-in manager | ||
Enable autologin as | ||
... Manager | ||
|
||
a logged-in member | ||
Enable autologin as | ||
... Member | ||
|
||
a logged-in site administrator | ||
Enable autologin as Site Administrator Contributor Reviewer | ||
Enable autologin as | ||
... Site Administrator | ||
... Contributor | ||
... Reviewer | ||
|
||
|
||
a document '${title}' | ||
Create content type=Document id=doc title=${title} | ||
Create content | ||
... type=Document | ||
... id=doc | ||
... title=${title} | ||
|
||
a file '${title}' | ||
Create content type=File id=file title=${title} | ||
Create content | ||
... type=File | ||
... id=file | ||
... title=${title} | ||
|
||
a news item '${title}' | ||
Create content type=News Item id=doc title=${title} | ||
Create content | ||
... type=News Item | ||
... id=doc | ||
... title=${title} | ||
|
||
an image '${title}' | ||
Create content type=Image id=doc title=${title} | ||
Create content | ||
... type=Image | ||
... id=doc | ||
... title=${title} | ||
|
||
a folder '${title}' | ||
Create content type=Folder title=${title} | ||
|
||
patterns are loaded | ||
Wait For Condition return !!document.querySelector('body.patterns-loaded') | ||
Create content | ||
... type=Folder | ||
... title=${title} | ||
|
||
a folder with a document '${title}' | ||
${folder_uid}= Create content type=Folder title=folder | ||
Create content type=Document container=${folder_uid} title=${title} | ||
${folder_uid}= Create content type=Folder title=folder | ||
Create content | ||
... type=Document | ||
... container=${folder_uid} | ||
... title=${title} | ||
|
||
Remove line from textarea | ||
[Arguments] ${fieldName} ${value} | ||
|
||
Import library String | ||
${lines}= Get Text //textarea[@name="${fieldName}"] | ||
${lines}= Remove String ${lines} ${value}\n | ||
Type Text //textarea[@name="${fieldName}"] ${lines} | ||
|
||
|
||
Fill text to tinymce editor | ||
[Arguments] ${attr_name} ${input} | ||
|
||
Wait For Condition Attribute //body class contains patterns-loaded | ||
|
||
Sleep 1 | ||
|
||
${check}= Evaluate JavaScript //textarea[@name="${attr_name}"] | ||
... (elem, text) => { | ||
... const tiny = window.tinymce.get(elem.getAttribute("id")); | ||
... let input_text = ""; | ||
... tiny.setContent('${input}'); | ||
... return tiny.getContent(); | ||
... } | ||
... all_elements=False | ||
|
||
Should not be empty ${check} | ||
|
||
|
||
folder contents pattern loaded | ||
Page should contain element css=.pat-structure | ||
Wait For Condition return !!document.querySelector('.pat-structure div.navbar') | ||
Pause | ||
Import library Dialogs | ||
Pause execution |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.