From f2f014895b16ef3d72f5803ebb1113d16cb98148 Mon Sep 17 00:00:00 2001 From: petschki Date: Tue, 12 Nov 2024 11:43:39 +0100 Subject: [PATCH] [fc] Repository: plone.app.dexterity Branch: refs/heads/3.x Date: 2024-11-12T10:42:26+01:00 Author: 1letter (1letter) <1letter@gmx.de> Commit: https://github.com/plone/plone.app.dexterity/commit/cf9f209f456fcea5801c6cb31ab80b3cc24649b6 refactoring types robot test Files changed: M plone/app/dexterity/tests/robot/test_types.robot Repository: plone.app.dexterity Branch: refs/heads/3.x Date: 2024-11-12T10:42:33+01:00 Author: 1letter (1letter) <1letter@gmx.de> Commit: https://github.com/plone/plone.app.dexterity/commit/ac4f2611dcb5837840a65c1a9e788381daaaf056 add news Files changed: A news/398.tests Repository: plone.app.dexterity Branch: refs/heads/3.x Date: 2024-11-12T11:43:39+01:00 Author: Peter Mathis (petschki) Commit: https://github.com/plone/plone.app.dexterity/commit/8897203012f86fc2b9e1d8367d7242ef8f467748 Merge pull request #399 from plone/port-robot-tests-3.x Port robot tests 3.x Files changed: A news/398.tests M plone/app/dexterity/tests/robot/test_types.robot --- last_commit.txt | 50 ++++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/last_commit.txt b/last_commit.txt index 589563668c..ad939be929 100644 --- a/last_commit.txt +++ b/last_commit.txt @@ -1,54 +1,48 @@ -Repository: plone.app.discussion +Repository: plone.app.dexterity -Branch: refs/heads/4.x -Date: 2024-11-12T09:41:13+01:00 +Branch: refs/heads/3.x +Date: 2024-11-12T10:42:26+01:00 Author: 1letter (1letter) <1letter@gmx.de> -Commit: https://github.com/plone/plone.app.discussion/commit/a964f5304987ae10b25bacc5c5627c11d3562db1 +Commit: https://github.com/plone/plone.app.dexterity/commit/cf9f209f456fcea5801c6cb31ab80b3cc24649b6 -refactoring robot tests +refactoring types robot test Files changed: -A plone/app/discussion/tests/robot/keywords.robot -A plone/app/discussion/tests/robot/test_allow_discussion.robot -M plone/app/discussion/tests/robot/test_discussion.robot -M plone/app/discussion/tests/robot/test_moderation.robot +M plone/app/dexterity/tests/robot/test_types.robot -b'diff --git a/plone/app/discussion/tests/robot/keywords.robot b/plone/app/discussion/tests/robot/keywords.robot\nnew file mode 100644\nindex 00000000..1f744948\n--- /dev/null\n+++ b/plone/app/discussion/tests/robot/keywords.robot\n@@ -0,0 +1,16 @@\n+*** Keywords ***\n+\n+I enable discussion on the document\n+ Go To ${PLONE_URL}/my-document/edit\n+ Get Text body contains Settings\n+ Click .autotoc-nav >> "Settings"\n+ Select Options By id=formfield-form-widgets-IAllowDiscussion-allow_discussion >> select text Yes\n+ Click "Save"\n+\n+I add a comment\n+ Type Text id=form-widgets-comment-text This is a comment\n+ Click css=button[name="form.buttons.comment"]\n+\n+I can see that the comment is gone\n+ Go To ${PLONE_URL}/my-document/view\n+ Get Element Count css=.comment-body == 0\n\\ No newline at end of file\ndiff --git a/plone/app/discussion/tests/robot/test_allow_discussion.robot b/plone/app/discussion/tests/robot/test_allow_discussion.robot\nnew file mode 100644\nindex 00000000..e9c7389e\n--- /dev/null\n+++ b/plone/app/discussion/tests/robot/test_allow_discussion.robot\n@@ -0,0 +1,77 @@\n+*** Settings ***\n+\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n+\n+Library Remote ${PLONE_URL}/RobotRemote\n+\n+Test Setup Run Keywords Plone test setup\n+Test Teardown Run keywords Plone test teardown\n+\n+*** Test Cases ***\n+\n+Scenario: Allow comments for Link Type\n+ Given a logged-in manager\n+ and Globally enabled comments\n+ and the types control panel\n+ When I select \'Link\' in types dropdown\n+ and Allow discussion\n+ Then Wait For Condition Text //body contains Content Settings\n+\n+ When I add new Link \'my_link\'\n+ Then Link \'my_link\' should have comments enabled\n+\n+\n+*** Keywords ***\n+\n+# GIVEN\n+\n+a logged-in manager\n+ Enable autologin as Manager\n+\n+the types control panel\n+ Go to ${PLONE_URL}/@@content-controlpanel\n+ Wait For Condition Text //body contains Content Settings\n+\n+Globally enabled comments\n+ Go to ${PLONE_URL}/@@discussion-settings\n+ Wait For Condition Text //body contains Discussion settings\n+ Check Checkbox //input[@name="form.widgets.globally_enabled:list"]\n+ Click //button[@name="form.buttons.save"]\n+\n+\n+# WHEN\n+\n+I select \'${content_type}\' in types dropdown\n+ Select Options By //select[@name="type_id"] label ${content_type}\n+ Wait For Condition Text //body contains Globally addable\n+\n+Allow discussion\n+ Check Checkbox //input[@name="allow_discussion:boolean"]\n+ Click //button[@name="form.button.Save"]\n+\n+I add new Link \'${id}\'\n+ Go to ${PLONE_URL}\n+ Wait For Condition Text //body contains Plone site\n+ Create content\n+ ... type=Link\n+ ... id=${id}\n+ ... title=${id}\n+ ... remoteUrl=http://www.starzel.de\n+\n+\n+# THEN\n+\n+Link \'${id}\' should have comments enabled\n+ Go to ${PLONE_URL}/${id}\n+ Wait For Condition Text //body contains ${id}\n+ Get Element Count //div[@id="commenting"] should be 1\n+\n+# Misc\n+\n+Pause\n+ [Documentation] Visually pause test execution with interactive dialog by\n+ ... importing **Dialogs**-library and calling its\n+ ... **Pause Execution**-keyword.\n+ Import library Dialogs\n+ Pause execution\n\\ No newline at end of file\ndiff --git a/plone/app/discussion/tests/robot/test_discussion.robot b/plone/app/discussion/tests/robot/test_discussion.robot\nindex 54b8f4a1..6e2c975b 100644\n--- a/plone/app/discussion/tests/robot/test_discussion.robot\n+++ b/plone/app/discussion/tests/robot/test_discussion.robot\n@@ -1,23 +1,13 @@\n-# ============================================================================\n-# Test basic discussion features (adding, replying, deleting)\n-# ============================================================================\n-#\n-# $ bin/robot-server plone.app.discussion.testing.PLONE_APP_DISCUSSION_ROBOT_TESTING\n-# $ bin/robot src/plone.app.discussion/src/plone/app/discussion/tests/robot/test_discussion.robot\n-#\n-# ============================================================================\n-\n *** Settings ***\n \n-Resource plone/app/robotframework/saucelabs.robot\n-Resource plone/app/robotframework/selenium.robot\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n \n Library Remote ${PLONE_URL}/RobotRemote\n \n Test Setup Run Keywords Plone test setup\n Test Teardown Run keywords Plone test teardown\n \n-\n *** Test Cases ***\n \n Enable Discussion on a Document\n@@ -35,11 +25,16 @@ Add Comment to a Document\n Reply to a comment on a Document\n Given a logged-in Site Administrator\n and a document with discussion enabled\n+ and I add a comment\n+ When I reply to a comment\n+ Then I can see the reply\n \n Delete Comment from a Document\n Given a logged-in Site Administrator\n and a document with discussion enabled\n-\n+ and I add a comment\n+ When I delete the comment\n+ Then I can see that the comment is gone\n \n *** Keywords ***\n \n@@ -58,28 +53,26 @@ a document with discussion enabled\n \n # When\n \n-I enable discussion on the document\n- Go To ${PLONE_URL}/my-document/edit\n- Wait until page contains Settings\n- Click Link Settings\n- Wait until element is visible name=form.widgets.IAllowDiscussion.allow_discussion:list\n- Select From List By Value name=form.widgets.IAllowDiscussion.allow_discussion:list True\n- Click Button Save\n-\n-I add a comment\n- Wait until page contains element id=form-widgets-comment-text\n- Input Text id=form-widgets-comment-text This is a comment\n- Click Button Comment\n+I reply to a comment\n+ Click "Reply"\n+ Fill Text css=div[id^=formfield-form-widgets-new] > textarea My reply text\n+ Click css=.discussion button[name="form.buttons.comment"]\n \n+I delete the comment\n+ Click css=button[name="form.button.DeleteComment"]\n \n # Then\n \n I can see a comment form on the document\n Go To ${PLONE_URL}/my-document/view\n- Wait until page contains My Document\n- Page should contain Add comment\n- Page should contain element id=form-widgets-comment-text\n+ Get Text h1 == My Document\n+ Get Text legend == Add comment\n+ Get Element id=form-widgets-comment-text\n \n I can see the comment below the document\n Go To ${PLONE_URL}/my-document/view\n- Page should contain This is a comment\n+ Get Text css=.comment-body > p == This is a comment\n+\n+I can see the reply\n+ Go To ${PLONE_URL}/my-document/view\n+ Get Text css=.level-1 .comment-body > p == My reply text\n\\ No newline at end of file\ndiff --git a/plone/app/discussion/tests/robot/test_moderation.robot b/plone/app/discussion/tests/robot/test_moderation.robot\nindex ce231e39..e0ff11f4 100644\n--- a/plone/app/discussion/tests/robot/test_moderation.robot\n+++ b/plone/app/discussion/tests/robot/test_moderation.robot\n@@ -1,7 +1,7 @@\n *** Settings ***\n \n-Resource plone/app/robotframework/saucelabs.robot\n-Resource plone/app/robotframework/selenium.robot\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n \n Library Remote ${PLONE_URL}/RobotRemote\n \n@@ -16,7 +16,7 @@ Add a Comment to a Document and bulk delete it\n and workflow multiple enabled\n and a document with discussion enabled\n When I add a comment and delete it\n- Then I can not see the comment below the document\n+ Then I can see that the comment is gone\n \n Last history entry is shown\n Given a logged-in Site Administrator\n@@ -49,49 +49,28 @@ a document with discussion enabled\n \n # When\n \n-I enable discussion on the document\n- Go To ${PLONE_URL}/my-document/edit\n- Wait until page contains Settings\n- Click Link Settings\n- Wait until element is visible name=form.widgets.IAllowDiscussion.allow_discussion:list\n- Select From List By Value name=form.widgets.IAllowDiscussion.allow_discussion:list True\n- Click Button Save\n-\n-I add a comment\n- Wait until page contains element id=form-widgets-comment-text\n- Input Text id=form-widgets-comment-text This is a comment\n- Click Button Comment\n-\n I add a comment and delete it\n- Wait until page contains element id=form-widgets-comment-text\n- Input Text id=form-widgets-comment-text This is a comment\n- Click Button Comment\n+ Fill Text id=form-widgets-comment-text This is a comment\n+ Click css=button[name="form.buttons.comment"]\n Go To ${PLONE_URL}/@@moderate-comments?review_state=all\n- Wait Until Element Is Visible css=option[value=delete]\n- Wait Until Keyword Succeeds 5x 1s Select And Check xpath://select[@name=\'form.select.BulkAction\'] delete\n- Wait Until Element Is Visible css=[name=check_all]\n- Wait Until Element Is Enabled css=[name=check_all]\n- Wait Until Element Is Visible css=[name="paths:list"]\n- Wait Until Element Is Enabled css=[name="paths:list"]\n- Wait for Condition return jQuery._data( jQuery(\'[name=check_all]\')[0], "events" )?.click?.length == 2\n- Select Checkbox name=check_all\n- Wait Until Element Is Visible css=[name="paths:list"]:checked\n- Wait For Then Click Element css=button[name="form.button.BulkAction"]\n- Wait Until Page Does Not Contain This is a comment\n+ Get Text body contains Bulk Actions\n+ Select Options By select[name="form.select.BulkAction"] text Delete\n+ Check Checkbox input[name="check_all"]\n+ Click "Apply"\n+ Get Element Count table > tbody > tr == 0.0\n \n workflow multiple enabled\n Go To ${PLONE_URL}/@@content-controlpanel?type_id=Discussion%20Item&new_workflow=comment_review_workflow\n- Execute Javascript window.scroll(0, 2000)\n- Click Button Save\n+ Click "Save"\n \n # Then\n \n I can not see the comment below the document\n Go To ${PLONE_URL}/my-document/view\n- Wait until page contains My Document\n+ Get Text body contains My Document\n Page should not contain This is a comment\n \n I can see the last history entry in moderation view\n Go To ${PLONE_URL}/@@moderate-comments?review_state=all\n- Wait until page contains element name=form.select.BulkAction\n- Page should contain Create\n+ Get Text body contains Bulk Actions\n+ Get Text table contains Create\n\\ No newline at end of file\n' +b'diff --git a/plone/app/dexterity/tests/robot/test_types.robot b/plone/app/dexterity/tests/robot/test_types.robot\nindex 75fe47f7..c132518c 100644\n--- a/plone/app/dexterity/tests/robot/test_types.robot\n+++ b/plone/app/dexterity/tests/robot/test_types.robot\n@@ -1,35 +1,46 @@\n-*** Settings *****************************************************************\n+*** Settings ***\n \n-Resource plone/app/robotframework/keywords.robot\n-Resource plone/app/robotframework/saucelabs.robot\n-Resource plone/app/robotframework/selenium.robot\n+Resource plone/app/robotframework/browser.robot\n \n-Library Remote ${PLONE_URL}/RobotRemote\n+Library Remote ${PLONE_URL}/RobotRemote\n \n-Test Setup Run Keywords Plone test setup\n-Test Teardown Run keywords Plone test teardown\n+Test Setup Run Keywords Plone test setup\n+Test Teardown Run keywords Plone test teardown\n \n \n-*** Test cases ***************************************************************\n+*** Test cases ***\n \n Scenario: type title is normalized\n- Given a logged in manager\n- When adding a new content type\n- and type title is Bo\xc3\xaete \xc3\xa0 outils\n- Then type id should become boite_a_outils\n+ Given a site owner\n+ When adding a new content type\n+ and type title is Bo\xc3\xaete \xc3\xa0 outils\n+ Then type id should become boite_a_outils\n \n \n-*** Keywords *****************************************************************\n+*** Keywords ***\n+\n+# Given\n+\n+a site owner\n+\n+ Enable autologin as Manager\n+\n+# When\n \n adding a new content type\n- Go to ${PLONE_URL}/@@dexterity-types\n- Click Overlay Button Add New Content Type\xe2\x80\xa6\n+\n+ Go to ${PLONE_URL}/@@dexterity-types\n+ Click "Add New Content Type\xe2\x80\xa6"\n+\n+# Then\n \n type title is\n- [Arguments] ${title}\n- Input text form-widgets-title ${title}\n+ [Arguments] ${title}\n+\n+ Fill text //input[@id="form-widgets-title"] ${title}\n \n type id should become\n- [Arguments] ${id}\n- Set Focus To Element form-widgets-id\n- Wait until keyword succeeds 10 1 Textfield Value Should Be form-widgets-id ${id}\n+ [Arguments] ${id}\n+\n+ Focus id=form-widgets-id\n+ Get text //input[@id="form-widgets-id"] should be ${id}\n\\ No newline at end of file\n' -Repository: plone.app.discussion +Repository: plone.app.dexterity -Branch: refs/heads/4.x -Date: 2024-11-12T09:42:07+01:00 +Branch: refs/heads/3.x +Date: 2024-11-12T10:42:33+01:00 Author: 1letter (1letter) <1letter@gmx.de> -Commit: https://github.com/plone/plone.app.discussion/commit/6126034741be5b924c1e4dea21df47c82ad5494a +Commit: https://github.com/plone/plone.app.dexterity/commit/ac4f2611dcb5837840a65c1a9e788381daaaf056 add news Files changed: -A news/247.tests +A news/398.tests -b'diff --git a/news/247.tests b/news/247.tests\nnew file mode 100644\nindex 00000000..887ab825\n--- /dev/null\n+++ b/news/247.tests\n@@ -0,0 +1,2 @@\n+refactoring robot tests, use browser library\n+[1letter]\n' +b'diff --git a/news/398.tests b/news/398.tests\nnew file mode 100644\nindex 00000000..01eaa78c\n--- /dev/null\n+++ b/news/398.tests\n@@ -0,0 +1 @@\n+port robot tests, use browser library [1letter]\n' -Repository: plone.app.discussion +Repository: plone.app.dexterity -Branch: refs/heads/4.x -Date: 2024-11-12T11:07:20+01:00 +Branch: refs/heads/3.x +Date: 2024-11-12T11:43:39+01:00 Author: Peter Mathis (petschki) -Commit: https://github.com/plone/plone.app.discussion/commit/eb13d76d04b8c01b73a44ed1c9e86020b327f78f +Commit: https://github.com/plone/plone.app.dexterity/commit/8897203012f86fc2b9e1d8367d7242ef8f467748 -Merge pull request #248 from plone/port-robot-tests-plone-6.0.x +Merge pull request #399 from plone/port-robot-tests-3.x -Port robot tests plone 6.0.x +Port robot tests 3.x Files changed: -A news/247.tests -A plone/app/discussion/tests/robot/keywords.robot -A plone/app/discussion/tests/robot/test_allow_discussion.robot -M plone/app/discussion/tests/robot/test_discussion.robot -M plone/app/discussion/tests/robot/test_moderation.robot +A news/398.tests +M plone/app/dexterity/tests/robot/test_types.robot -b'diff --git a/news/247.tests b/news/247.tests\nnew file mode 100644\nindex 00000000..887ab825\n--- /dev/null\n+++ b/news/247.tests\n@@ -0,0 +1,2 @@\n+refactoring robot tests, use browser library\n+[1letter]\ndiff --git a/plone/app/discussion/tests/robot/keywords.robot b/plone/app/discussion/tests/robot/keywords.robot\nnew file mode 100644\nindex 00000000..1f744948\n--- /dev/null\n+++ b/plone/app/discussion/tests/robot/keywords.robot\n@@ -0,0 +1,16 @@\n+*** Keywords ***\n+\n+I enable discussion on the document\n+ Go To ${PLONE_URL}/my-document/edit\n+ Get Text body contains Settings\n+ Click .autotoc-nav >> "Settings"\n+ Select Options By id=formfield-form-widgets-IAllowDiscussion-allow_discussion >> select text Yes\n+ Click "Save"\n+\n+I add a comment\n+ Type Text id=form-widgets-comment-text This is a comment\n+ Click css=button[name="form.buttons.comment"]\n+\n+I can see that the comment is gone\n+ Go To ${PLONE_URL}/my-document/view\n+ Get Element Count css=.comment-body == 0\n\\ No newline at end of file\ndiff --git a/plone/app/discussion/tests/robot/test_allow_discussion.robot b/plone/app/discussion/tests/robot/test_allow_discussion.robot\nnew file mode 100644\nindex 00000000..e9c7389e\n--- /dev/null\n+++ b/plone/app/discussion/tests/robot/test_allow_discussion.robot\n@@ -0,0 +1,77 @@\n+*** Settings ***\n+\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n+\n+Library Remote ${PLONE_URL}/RobotRemote\n+\n+Test Setup Run Keywords Plone test setup\n+Test Teardown Run keywords Plone test teardown\n+\n+*** Test Cases ***\n+\n+Scenario: Allow comments for Link Type\n+ Given a logged-in manager\n+ and Globally enabled comments\n+ and the types control panel\n+ When I select \'Link\' in types dropdown\n+ and Allow discussion\n+ Then Wait For Condition Text //body contains Content Settings\n+\n+ When I add new Link \'my_link\'\n+ Then Link \'my_link\' should have comments enabled\n+\n+\n+*** Keywords ***\n+\n+# GIVEN\n+\n+a logged-in manager\n+ Enable autologin as Manager\n+\n+the types control panel\n+ Go to ${PLONE_URL}/@@content-controlpanel\n+ Wait For Condition Text //body contains Content Settings\n+\n+Globally enabled comments\n+ Go to ${PLONE_URL}/@@discussion-settings\n+ Wait For Condition Text //body contains Discussion settings\n+ Check Checkbox //input[@name="form.widgets.globally_enabled:list"]\n+ Click //button[@name="form.buttons.save"]\n+\n+\n+# WHEN\n+\n+I select \'${content_type}\' in types dropdown\n+ Select Options By //select[@name="type_id"] label ${content_type}\n+ Wait For Condition Text //body contains Globally addable\n+\n+Allow discussion\n+ Check Checkbox //input[@name="allow_discussion:boolean"]\n+ Click //button[@name="form.button.Save"]\n+\n+I add new Link \'${id}\'\n+ Go to ${PLONE_URL}\n+ Wait For Condition Text //body contains Plone site\n+ Create content\n+ ... type=Link\n+ ... id=${id}\n+ ... title=${id}\n+ ... remoteUrl=http://www.starzel.de\n+\n+\n+# THEN\n+\n+Link \'${id}\' should have comments enabled\n+ Go to ${PLONE_URL}/${id}\n+ Wait For Condition Text //body contains ${id}\n+ Get Element Count //div[@id="commenting"] should be 1\n+\n+# Misc\n+\n+Pause\n+ [Documentation] Visually pause test execution with interactive dialog by\n+ ... importing **Dialogs**-library and calling its\n+ ... **Pause Execution**-keyword.\n+ Import library Dialogs\n+ Pause execution\n\\ No newline at end of file\ndiff --git a/plone/app/discussion/tests/robot/test_discussion.robot b/plone/app/discussion/tests/robot/test_discussion.robot\nindex 54b8f4a1..6e2c975b 100644\n--- a/plone/app/discussion/tests/robot/test_discussion.robot\n+++ b/plone/app/discussion/tests/robot/test_discussion.robot\n@@ -1,23 +1,13 @@\n-# ============================================================================\n-# Test basic discussion features (adding, replying, deleting)\n-# ============================================================================\n-#\n-# $ bin/robot-server plone.app.discussion.testing.PLONE_APP_DISCUSSION_ROBOT_TESTING\n-# $ bin/robot src/plone.app.discussion/src/plone/app/discussion/tests/robot/test_discussion.robot\n-#\n-# ============================================================================\n-\n *** Settings ***\n \n-Resource plone/app/robotframework/saucelabs.robot\n-Resource plone/app/robotframework/selenium.robot\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n \n Library Remote ${PLONE_URL}/RobotRemote\n \n Test Setup Run Keywords Plone test setup\n Test Teardown Run keywords Plone test teardown\n \n-\n *** Test Cases ***\n \n Enable Discussion on a Document\n@@ -35,11 +25,16 @@ Add Comment to a Document\n Reply to a comment on a Document\n Given a logged-in Site Administrator\n and a document with discussion enabled\n+ and I add a comment\n+ When I reply to a comment\n+ Then I can see the reply\n \n Delete Comment from a Document\n Given a logged-in Site Administrator\n and a document with discussion enabled\n-\n+ and I add a comment\n+ When I delete the comment\n+ Then I can see that the comment is gone\n \n *** Keywords ***\n \n@@ -58,28 +53,26 @@ a document with discussion enabled\n \n # When\n \n-I enable discussion on the document\n- Go To ${PLONE_URL}/my-document/edit\n- Wait until page contains Settings\n- Click Link Settings\n- Wait until element is visible name=form.widgets.IAllowDiscussion.allow_discussion:list\n- Select From List By Value name=form.widgets.IAllowDiscussion.allow_discussion:list True\n- Click Button Save\n-\n-I add a comment\n- Wait until page contains element id=form-widgets-comment-text\n- Input Text id=form-widgets-comment-text This is a comment\n- Click Button Comment\n+I reply to a comment\n+ Click "Reply"\n+ Fill Text css=div[id^=formfield-form-widgets-new] > textarea My reply text\n+ Click css=.discussion button[name="form.buttons.comment"]\n \n+I delete the comment\n+ Click css=button[name="form.button.DeleteComment"]\n \n # Then\n \n I can see a comment form on the document\n Go To ${PLONE_URL}/my-document/view\n- Wait until page contains My Document\n- Page should contain Add comment\n- Page should contain element id=form-widgets-comment-text\n+ Get Text h1 == My Document\n+ Get Text legend == Add comment\n+ Get Element id=form-widgets-comment-text\n \n I can see the comment below the document\n Go To ${PLONE_URL}/my-document/view\n- Page should contain This is a comment\n+ Get Text css=.comment-body > p == This is a comment\n+\n+I can see the reply\n+ Go To ${PLONE_URL}/my-document/view\n+ Get Text css=.level-1 .comment-body > p == My reply text\n\\ No newline at end of file\ndiff --git a/plone/app/discussion/tests/robot/test_moderation.robot b/plone/app/discussion/tests/robot/test_moderation.robot\nindex ce231e39..e0ff11f4 100644\n--- a/plone/app/discussion/tests/robot/test_moderation.robot\n+++ b/plone/app/discussion/tests/robot/test_moderation.robot\n@@ -1,7 +1,7 @@\n *** Settings ***\n \n-Resource plone/app/robotframework/saucelabs.robot\n-Resource plone/app/robotframework/selenium.robot\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n \n Library Remote ${PLONE_URL}/RobotRemote\n \n@@ -16,7 +16,7 @@ Add a Comment to a Document and bulk delete it\n and workflow multiple enabled\n and a document with discussion enabled\n When I add a comment and delete it\n- Then I can not see the comment below the document\n+ Then I can see that the comment is gone\n \n Last history entry is shown\n Given a logged-in Site Administrator\n@@ -49,49 +49,28 @@ a document with discussion enabled\n \n # When\n \n-I enable discussion on the document\n- Go To ${PLONE_URL}/my-document/edit\n- Wait until page contains Settings\n- Click Link Settings\n- Wait until element is visible name=form.widgets.IAllowDiscussion.allow_discussion:list\n- Select From List By Value name=form.widgets.IAllowDiscussion.allow_discussion:list True\n- Click Button Save\n-\n-I add a comment\n- Wait until page contains element id=form-widgets-comment-text\n- Input Text id=form-widgets-comment-text This is a comment\n- Click Button Comment\n-\n I add a comment and delete it\n- Wait until page contains element id=form-widgets-comment-text\n- Input Text id=form-widgets-comment-text This is a comment\n- Click Button Comment\n+ Fill Text id=form-widgets-comment-text This is a comment\n+ Click css=button[name="form.buttons.comment"]\n Go To ${PLONE_URL}/@@moderate-comments?review_state=all\n- Wait Until Element Is Visible css=option[value=delete]\n- Wait Until Keyword Succeeds 5x 1s Select And Check xpath://select[@name=\'form.select.BulkAction\'] delete\n- Wait Until Element Is Visible css=[name=check_all]\n- Wait Until Element Is Enabled css=[name=check_all]\n- Wait Until Element Is Visible css=[name="paths:list"]\n- Wait Until Element Is Enabled css=[name="paths:list"]\n- Wait for Condition return jQuery._data( jQuery(\'[name=check_all]\')[0], "events" )?.click?.length == 2\n- Select Checkbox name=check_all\n- Wait Until Element Is Visible css=[name="paths:list"]:checked\n- Wait For Then Click Element css=button[name="form.button.BulkAction"]\n- Wait Until Page Does Not Contain This is a comment\n+ Get Text body contains Bulk Actions\n+ Select Options By select[name="form.select.BulkAction"] text Delete\n+ Check Checkbox input[name="check_all"]\n+ Click "Apply"\n+ Get Element Count table > tbody > tr == 0.0\n \n workflow multiple enabled\n Go To ${PLONE_URL}/@@content-controlpanel?type_id=Discussion%20Item&new_workflow=comment_review_workflow\n- Execute Javascript window.scroll(0, 2000)\n- Click Button Save\n+ Click "Save"\n \n # Then\n \n I can not see the comment below the document\n Go To ${PLONE_URL}/my-document/view\n- Wait until page contains My Document\n+ Get Text body contains My Document\n Page should not contain This is a comment\n \n I can see the last history entry in moderation view\n Go To ${PLONE_URL}/@@moderate-comments?review_state=all\n- Wait until page contains element name=form.select.BulkAction\n- Page should contain Create\n+ Get Text body contains Bulk Actions\n+ Get Text table contains Create\n\\ No newline at end of file\n' +b'diff --git a/news/398.tests b/news/398.tests\nnew file mode 100644\nindex 00000000..01eaa78c\n--- /dev/null\n+++ b/news/398.tests\n@@ -0,0 +1 @@\n+port robot tests, use browser library [1letter]\ndiff --git a/plone/app/dexterity/tests/robot/test_types.robot b/plone/app/dexterity/tests/robot/test_types.robot\nindex 75fe47f7..c132518c 100644\n--- a/plone/app/dexterity/tests/robot/test_types.robot\n+++ b/plone/app/dexterity/tests/robot/test_types.robot\n@@ -1,35 +1,46 @@\n-*** Settings *****************************************************************\n+*** Settings ***\n \n-Resource plone/app/robotframework/keywords.robot\n-Resource plone/app/robotframework/saucelabs.robot\n-Resource plone/app/robotframework/selenium.robot\n+Resource plone/app/robotframework/browser.robot\n \n-Library Remote ${PLONE_URL}/RobotRemote\n+Library Remote ${PLONE_URL}/RobotRemote\n \n-Test Setup Run Keywords Plone test setup\n-Test Teardown Run keywords Plone test teardown\n+Test Setup Run Keywords Plone test setup\n+Test Teardown Run keywords Plone test teardown\n \n \n-*** Test cases ***************************************************************\n+*** Test cases ***\n \n Scenario: type title is normalized\n- Given a logged in manager\n- When adding a new content type\n- and type title is Bo\xc3\xaete \xc3\xa0 outils\n- Then type id should become boite_a_outils\n+ Given a site owner\n+ When adding a new content type\n+ and type title is Bo\xc3\xaete \xc3\xa0 outils\n+ Then type id should become boite_a_outils\n \n \n-*** Keywords *****************************************************************\n+*** Keywords ***\n+\n+# Given\n+\n+a site owner\n+\n+ Enable autologin as Manager\n+\n+# When\n \n adding a new content type\n- Go to ${PLONE_URL}/@@dexterity-types\n- Click Overlay Button Add New Content Type\xe2\x80\xa6\n+\n+ Go to ${PLONE_URL}/@@dexterity-types\n+ Click "Add New Content Type\xe2\x80\xa6"\n+\n+# Then\n \n type title is\n- [Arguments] ${title}\n- Input text form-widgets-title ${title}\n+ [Arguments] ${title}\n+\n+ Fill text //input[@id="form-widgets-title"] ${title}\n \n type id should become\n- [Arguments] ${id}\n- Set Focus To Element form-widgets-id\n- Wait until keyword succeeds 10 1 Textfield Value Should Be form-widgets-id ${id}\n+ [Arguments] ${id}\n+\n+ Focus id=form-widgets-id\n+ Get text //input[@id="form-widgets-id"] should be ${id}\n\\ No newline at end of file\n'