diff --git a/last_commit.txt b/last_commit.txt index 0a7dcded75..589563668c 100644 --- a/last_commit.txt +++ b/last_commit.txt @@ -1,62 +1,54 @@ -Repository: plone.app.contenttypes +Repository: plone.app.discussion -Branch: refs/heads/3.x -Date: 2024-11-12T10:04:08+01:00 +Branch: refs/heads/4.x +Date: 2024-11-12T09:41:13+01:00 Author: 1letter (1letter) <1letter@gmx.de> -Commit: https://github.com/plone/plone.app.contenttypes/commit/9f729f9c9935192e82657f149ea85fb4e374917b +Commit: https://github.com/plone/plone.app.discussion/commit/a964f5304987ae10b25bacc5c5627c11d3562db1 refactoring robot tests Files changed: -A plone/app/contenttypes/tests/robot/keywords.robot -M plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot -M plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot -M plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot -M plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot -M plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot -M plone/app/contenttypes/tests/robot/test_folderlisting.robot -D plone/app/contenttypes/tests/robot/keywords.txt +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 -b'diff --git a/plone/app/contenttypes/tests/robot/keywords.txt b/plone/app/contenttypes/tests/robot/keywords.robot\nsimilarity index 55%\nrename from plone/app/contenttypes/tests/robot/keywords.txt\nrename to plone/app/contenttypes/tests/robot/keywords.robot\nindex 2f204e59..db9d3726 100644\n--- a/plone/app/contenttypes/tests/robot/keywords.txt\n+++ b/plone/app/contenttypes/tests/robot/keywords.robot\n@@ -34,11 +34,10 @@ a event\n a file\n [Arguments] ${title}\n Go to ${PLONE_URL}/++add++File\n- Wait until page contains Add File\n- Input text name=form.widgets.title ${title}\n+ Fill text name=form.widgets.title ${title}\n Choose File name=form.widgets.file ${PATH_TO_TEST_FILES}/file.pdf\n- Wait For Then Click Element css=#form-buttons-save\n- Wait until page contains Item created\n+ Click css=#form-buttons-save\n+ Get text body contains Item created\n \n a folder\n [Arguments] ${title}\n@@ -48,11 +47,10 @@ a folder\n a image\n [Arguments] ${title}\n Go to ${PLONE_URL}/++add++Image\n- Wait until page contains Add Image\n- Input text name=form.widgets.title ${title}\n+ Fill text name=form.widgets.title ${title}\n Choose File name=form.widgets.image ${PATH_TO_TEST_FILES}/image.png\n- Wait For Then Click Element css=#form-buttons-save\n- Wait until page contains Item created error=Image could not be created.\n+ Click css=#form-buttons-save\n+ Get text body contains Item created\n \n a link\n [Arguments] ${title}\n@@ -63,10 +61,9 @@ a link\n a news item\n [Arguments] ${title}\n Go to ${PLONE_URL}/++add++News Item\n- Wait until page contains Add News Item\n- Input text name=form.widgets.IDublinCore.title ${title}\n- Wait For Then Click Element css=#form-buttons-save\n- Wait until page contains Item created\n+ Fill text css=[name="form.widgets.IDublinCore.title"] ${title}\n+ Click css=#form-buttons-save\n+ Get text body contains Item created\n \n \n # ----------------------------------------------------------------------------\n@@ -75,17 +72,15 @@ a news item\n \n the content area should contain\n [Arguments] ${text}\n- Element Should Contain id=content ${text}\n+ Get text id=content contains ${text}\n \n the content area should not contain\n [Arguments] ${text}\n- Element Should Not Contain id=content ${text}\n+ Get Text id=content != ${text}\n \n the collection should contain\n [Arguments] ${title}\n- Wait until page contains element xpath=//*[@id=\'content-core\']\n- Page should contain element //*[@id=\'content-core\']//article//a[contains(text(), \'${title}\')] limit=1\n-\n+ Get Element //*[@id=\'content-core\']//article//a[contains(text(), \'${title}\')]\n \n the collection should not contain\n [Arguments] ${title}\n@@ -101,34 +96,22 @@ fill date field\n Click Element xpath=//div[@data-fieldname="${fieldid}"]//div[contains(@class, \'picker__day\')][contains(text(), "${day}")]\n \n I set the criteria ${type} in row ${number} to the option \'${label}\'\n- [Documentation] A couple of times we shift the focus so the input sticks, and wait a bit,\n- ... to make the test more stable.\n ${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(${number})\n- Wait until page contains element css=${criteria_row} .querystring-criteria-${type} .select2-choice\n- Click Element css=${criteria_row} .querystring-criteria-${type} .select2-choice\n- Sleep 1.5\n- Set Focus To Element css=body\n- Wait until element is visible css=#select2-drop input\n- Input Text css=#select2-drop input ${label}\n- Sleep 1.5\n- Set Focus To Element css=body\n- Wait until element is visible css=#select2-drop .select2-match\n- Click Element css=#select2-drop .select2-match\n- Sleep 1.5\n- Set Focus To Element css=body\n+ Click css=${criteria_row} .querystring-criteria-${type} .select2-choice\n+ Fill Text css=#select2-drop input ${label}\n+ Click xpath=//*[@id="select2-drop"]//*[@class="select2-match"]\n \n I set the criteria ${type} in row ${number} to the options \'${label}\'\n- ${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(${number})\n- Wait until page contains element css=${criteria_row} .querystring-criteria-${type} .select2-choices\n- Click Element css=${criteria_row} .querystring-criteria-${type} .select2-choices\n- Wait until page contains element css=.select2-input.select2-focused\n- Input text css=.select2-input.select2-focused ${label}\\n\n-# Click Element xpath=//div[@class=\'select2-result-label\']/descendant-or-self::*[contains(text(), \'${label}\')]\n+ ${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(1)\n+ Click css=${criteria_row} .querystring-criteria-value .select2-choices\n+ Fill text css=.select2-input.select2-focused ${label}\\n\n+ Click css=.select2-highlighted\n+ Get text css=${criteria_row} .select2-search-choice contains ${label}\n+ [Documentation] Chrome needs some more time\n+ Sleep .1s\n \n I set the criteria ${type} in row ${number} to the text \'${label}\'\n ${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(${number})\n- Input text css=${criteria_row} .querystring-criteria-value input ${label}\\t\n- [Documentation] Shift the focus so the input sticks, and wait a bit\n- Sleep 1.5\n- Set Focus To Element css=.querystring-sortreverse\n- Sleep 1.5\n+ Fill text css=${criteria_row} .querystring-criteria-value input ${label}\n+ Click css=.autotoc-level-1.active\n+ Sleep 1s\n\\ No newline at end of file\ndiff --git a/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot\nindex b957e869..4b6863ea 100644\n--- a/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot\n+++ b/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot\n@@ -1,27 +1,15 @@\n-# ============================================================================\n-# Tests for the Collection Creator Criterion\n-# ============================================================================\n-#\n-# $ bin/robot-server --reload-path src/plone.app.contenttypes plone.app.contenttypes.testing.PLONE_APP_CONTENTTYPES_ROBOT_TESTING\n-#\n-# $ bin/robot src/plone.app.contenttypes/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot\n-#\n-# ============================================================================\n-\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 keywords.txt\n+*** Settings ***\n+\n+Resource plone/app/robotframework/browser.robot\n+Resource plone/app/robotframework/user.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+*** Test cases ***\n \n Scenario: Test Creator Criterions\n Given a site owner document Site Owner Document\n@@ -33,7 +21,7 @@ Scenario: Test Creator Criterions\n And the collection should contain Site Owner Document\n \n \n-*** Keywords *****************************************************************\n+*** Keywords ***\n \n a site owner document\n [Arguments] ${title}\n@@ -49,11 +37,10 @@ a test user document\n \n I set the collection\'s creator criterion to the current logged in user\n Go to ${PLONE_URL}/my-collection/edit\n- Wait until page contains Edit Collection\n+ Get Text body contains Edit Collection\n \n I set the criteria index in row 1 to the option \'Creator\'\n I set the criteria operator in row 1 to the option \'Current\'\n \n- Sleep 1\n- Click Button Save\n- Wait until page contains Changes saved\n+ Click "Save"\n+ Get Text body contains Changes saved\n\\ No newline at end of file\ndiff --git a/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot\nindex eb2dc752..c98cdb16 100644\n--- a/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot\n+++ b/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot\n@@ -1,19 +1,7 @@\n-# ============================================================================\n-# Tests for the Collection Location Criterion\n-# ============================================================================\n-#\n-# $ bin/robot-server --reload-path src/plone.app.contenttypes plone.app.contenttypes.testing.PLONE_APP_CONTENTTYPES_ROBOT_TESTING\n-#\n-# $ bin/robot src/plone.app.contenttypes/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot\n-#\n-# ============================================================================\n-\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 keywords.txt\n+*** Settings ***\n+\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n \n Variables variables.py\n \n@@ -21,11 +9,9 @@ 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: Test Relative Location Criterion\n- [Documentation] This sometimes fails with:\n- ... Element locator \'css=#select2-drop input\' did not match any elements after 30 seconds\n Given I am logged in as site owner\n And a document Document outside Folder\n And a folder \'my-folder\' with a document \'Document within Folder\'\n@@ -36,9 +22,6 @@ Scenario: Test Relative Location Criterion\n \n \n Scenario: Test Absolute Location Criterion\n- [Documentation] This sometimes fails with:\n- ... Element locator \'css=#select2-drop input\' did not match any elements after 30 seconds\n- ... Or with: Element \'id=content\' should not contain text \'Document outside Folder\' but it did.\n Given I am logged in as site owner\n And a document Document outside Folder\n And a folder \'my-folder\' with a document \'Document within Folder\'\n@@ -52,14 +35,14 @@ Scenario: Test Absolute Location Criterion\n \n a folder \'${folder-id}\' with a document \'${document-title}\'\n Go to ${PLONE_URL}/++add++Folder\n- Wait until page contains element name=form.widgets.IDublinCore.title\n- Input text name=form.widgets.IDublinCore.title ${folder-id}\n- Click Button Save\n+ # Wait until page contains element name=form.widgets.IDublinCore.title\n+ Fill text xpath=//*[@name="form.widgets.IDublinCore.title"] ${folder-id}\n+ Click "Save"\n Go to ${PLONE_URL}/${folder-id}/++add++Document\n- Wait until page contains element name=form.widgets.IDublinCore.title\n- Input text name=form.widgets.IDublinCore.title ${document-title}\n- Click Button Save\n- Wait until page contains Item created\n+ # Wait until page contains element name=form.widgets.IDublinCore.title\n+ Fill text xpath=//*[@name="form.widgets.IDublinCore.title"] ${document-title}\n+ Click "Save"\n+ # Wait until page contains Item created\n \n I set the collection\'s location criterion to Advanced Mode\n I set the criteria operator in row 1 to the option \'Advanced Mode\'\n@@ -67,7 +50,7 @@ I set the collection\'s location criterion to Advanced Mode\n I set the collection\'s relative location criterion to\n [Arguments] ${criterion}\n Go to ${PLONE_URL}/my-collection/edit\n- Wait until page contains Edit Collection\n+ # Wait until page contains Edit Collection\n \n I set the criteria index in row 1 to the option \'Location\'\n \n@@ -76,13 +59,13 @@ I set the collection\'s relative location criterion to\n I set the criteria operator in row 1 to the option \'Relative path\'\n I set the criteria value in row 1 to the text \'${criterion}\'\n \n- Click Button Save\n- Wait until page contains Changes saved\n+ Click "Save"\n+ # Wait until page contains Changes saved\n \n I set the collection\'s absolute location criterion to\n [Arguments] ${criterion}\n Go to ${PLONE_URL}/my-collection/edit\n- Wait until page contains Edit Collection\n+ # Wait until page contains Edit Collection\n \n I set the criteria index in row 1 to the option \'Location\'\n \n@@ -91,5 +74,5 @@ I set the collection\'s absolute location criterion to\n I set the criteria operator in row 1 to the option \'Absolute path\'\n I set the criteria value in row 1 to the text \'${criterion}\'\n \n- Click Button Save\n- Wait until page contains Changes saved\n+ Click "Save"\n+ # Wait until page contains Changes saved\n\\ No newline at end of file\ndiff --git a/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot\nindex 719d7f97..52735972 100644\n--- a/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot\n+++ b/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot\n@@ -1,25 +1,15 @@\n-# ============================================================================\n-# Tests for the Collection Type Criterion\n-# ============================================================================\n-#\n-# $ bin/robot-server --reload-path src/plone.app.contenttypes plone.app.contenttypes.testing.PLONE_APP_CONTENTTYPES_ROBOT_TESTING\n-#\n-# $ bin/robot src/plone.app.contenttypes/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot\n-#\n-# ============================================================================\n-\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 keywords.txt\n+*** Settings ***\n+\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n+\n+Variables variables.py\n \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: Test Review state Criterion\n Given I am logged in as site owner\n@@ -31,7 +21,7 @@ Scenario: Test Review state Criterion\n And the collection should not contain Published Document\n \n \n-*** Keywords *****************************************************************\n+*** Keywords ***\n \n a published document\n [Arguments] ${title}\n@@ -45,12 +35,9 @@ a private document\n I set the collection\'s review state criterion to\n [Arguments] ${criterion}\n Go to ${PLONE_URL}/my-collection/edit\n- Wait until page contains Edit Collection\n \n I set the criteria index in row 1 to the option \'Review state\'\n I set the criteria operator in row 1 to the option \'Any\'\n I set the criteria value in row 1 to the options \'${criterion}\'\n \n- Sleep 1\n- Click Button Save\n- Wait until page contains Changes saved\n+ Click "Save"\n\\ No newline at end of file\ndiff --git a/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot\nindex cf09f277..f9bc1c88 100644\n--- a/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot\n+++ b/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot\n@@ -1,25 +1,15 @@\n-# ============================================================================\n-# Tests for the Collection Short Name Criterion\n-# ============================================================================\n-#\n-# $ bin/robot-server --reload-path src/plone.app.contenttypes plone.app.contenttypes.testing.PLONE_APP_CONTENTTYPES_ROBOT_TESTING\n-#\n-# $ bin/robot src/plone.app.contenttypes/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot\n-#\n-# ============================================================================\n-\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 keywords.txt\n+*** Settings ***\n+\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n+\n+Variables variables.py\n \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 Test Short name (id) Criterion\n Given I am logged in as site owner\n@@ -31,17 +21,24 @@ Test Short name (id) Criterion\n And the collection should not contain Second Document\n \n \n-*** Keywords *****************************************************************\n+*** Keywords ***\n \n I set the collection short name (id) criterion to\n [Arguments] ${criterion}\n Go to ${PLONE_URL}/my-collection/edit\n- Wait until page contains Edit Collection\n \n I set the criteria index in row 1 to the option \'Short name\'\n- I set the criteria operator in row 1 to the option \'Is\'\n+ #I set the criteria operator in row 1 to the option \'Is\'\n+\n+ ${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(1)\n+ Click css=${criteria_row} .querystring-criteria-operator .select2-choice\n+ Fill Text css=#select2-drop input Is\n+ Click css=.select2-highlighted\n+\n+\n I set the criteria value in row 1 to the text \'${criterion}\'\n+ [Documentation] Chrome needs some more time\n+ Sleep .1s\n \n- Sleep 1\n- Click Button Save\n- Wait until page contains Changes saved\n+ Click "Save"\n+ Get text body contains Changes saved\n\\ No newline at end of file\ndiff --git a/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot\nindex d7a2bbf6..60d53bb8 100644\n--- a/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot\n+++ b/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot\n@@ -1,25 +1,14 @@\n-# ============================================================================\n-# Tests for the Collection Type Criterion\n-# ============================================================================\n-#\n-# $ bin/robot-server --reload-path src/plone.app.contenttypes plone.app.contenttypes.testing.PLONE_APP_CONTENTTYPES_ROBOT_TESTING\n-#\n-# $ bin/robot src/plone.app.contenttypes/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot\n-#\n-# ============================================================================\n-\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 keywords.txt\n+*** Settings ***\n+\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n+\n+Variables variables.py\n \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 Test Type Criterion\n Given I am logged in as site owner\n@@ -31,17 +20,15 @@ Test Type Criterion\n And the collection should not contain Test Document\n \n \n-*** Keywords *****************************************************************\n+*** Keywords ***\n \n I set the collection\'s type criterion to\n [Arguments] ${criterion}\n Go to ${PLONE_URL}/my-collection/edit\n- Wait until page contains Edit Collection\n \n I set the criteria index in row 1 to the option \'Type\'\n I set the criteria operator in row 1 to the option \'Any\'\n I set the criteria value in row 1 to the options \'${criterion}\'\n \n- Sleep 1\n- Click Button Save\n- Wait until page contains Changes saved\n+ Click "Save"\n+ Get text body contains Changes saved\n\\ No newline at end of file\ndiff --git a/plone/app/contenttypes/tests/robot/test_folderlisting.robot b/plone/app/contenttypes/tests/robot/test_folderlisting.robot\nindex a64f535d..feb83513 100644\n--- a/plone/app/contenttypes/tests/robot/test_folderlisting.robot\n+++ b/plone/app/contenttypes/tests/robot/test_folderlisting.robot\n@@ -1,18 +1,13 @@\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 keywords.txt\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n \n Variables variables.py\n \n-\n Test Setup Run Keywords Setup Testcontent Plone test setup\n Test Teardown Run keywords Plone test teardown\n \n-*** Variables ***\n-\n *** Test cases ***\n \n Scenario: Test folder listing view\n@@ -101,7 +96,7 @@ Listing should list contained content in detail\n the content area should contain this is a test document\n the content area should contain Test News Item\n the content area should contain this is a test news item\n- Page Should Contain Element //img[@title="Test News Item"] 2\n+ Get Element Count //img[@title="Test News Item"] == 2\n the content area should contain Test Event\n the content area should contain this is a test event\n the content area should contain Test Collection\n@@ -111,29 +106,29 @@ Listing should list contained content in detail\n the content area should contain Test File\n the content area should contain file.pdf\n the content area should contain Test Image\n- Page Should Contain Element //img[@title="Test Image"] 3\n+ Get Element Count //img[@title="Test Image"] == 2\n the content area should contain Test Album\n the content area should contain Test Album Image 1\n- Page Should Contain Element //img[@title="Test Album Image 1"] 2\n+ Get Element Count //img[@title="Test Album Image 1"] == 2\n the content area should contain Test Album Image 2\n- Page Should Contain Element //img[@title="Test Album Image 2"] 2\n+ Get Element Count //img[@title="Test Album Image 2"] == 2\n the content area should contain Test Album Image 3\n- Page Should Contain Element //img[@title="Test Album Image 3"] 2\n+ Get Element Count //img[@title="Test Album Image 3"] == 2\n the content area should contain Test Sub Album\n the content area should contain Test Sub Album Image 1\n- Page Should Contain Element //img[@title="Test Sub Album Image 1"] 1\n+ Get Element Count //img[@title="Test Sub Album Image 1"] == 1\n the content area should contain Test Sub Album Image 2\n- Page Should Contain Element //img[@title="Test Sub Album Image 2"] 1\n+ Get Element Count //img[@title="Test Sub Album Image 2"] == 1\n the content area should contain Test Sub Album Image 3\n- Page Should Contain Element //img[@title="Test Sub Album Image 3"] 1\n+ Get Element Count //img[@title="Test Sub Album Image 3"] == 1\n \n Album should list contained images and albums\n the content area should contain Test Album Image 1\n- Page Should Contain Element //img[@title="Test Album Image 1"] 2\n+ Get Element Count //img[@title="Test Album Image 1"] == 1\n the content area should contain Test Album Image 2\n- Page Should Contain Element //img[@title="Test Album Image 2"] 2\n+ Get Element Count //img[@title="Test Album Image 2"] == 1\n the content area should contain Test Album Image 3\n- Page Should Contain Element //img[@title="Test Album Image 3"] 2\n+ Get Element Count //img[@title="Test Album Image 3"] == 1\n the content area should contain Test Sub Album\n \n \n@@ -159,7 +154,7 @@ Listing should list all content in detail\n the content area should contain this is a test document\n the content area should contain Test News Item\n the content area should contain this is a test news item\n- Page Should Contain Element //img[@title="Test News Item"] 2\n+ Get Element Count //img[@title="Test News Item"] == 2\n the content area should contain Test Event\n the content area should contain this is a test event\n the content area should contain Test Collection\n@@ -169,39 +164,39 @@ Listing should list all content in detail\n the content area should contain Test File\n the content area should contain file.pdf\n the content area should contain Test Image\n- Page Should Contain Element //img[@title="Test Image"] 3\n+ Get Element Count //img[@title="Test Image"] == 2\n the content area should contain Test Album\n the content area should contain Test Album Image 1\n- Page Should Contain Element //img[@title="Test Album Image 1"] 2\n+ Get Element Count //img[@title="Test Album Image 1"] == 2\n the content area should contain Test Album Image 2\n- Page Should Contain Element //img[@title="Test Album Image 2"] 2\n+ Get Element Count //img[@title="Test Album Image 2"] == 2\n the content area should contain Test Album Image 3\n- Page Should Contain Element //img[@title="Test Album Image 3"] 2\n+ Get Element Count //img[@title="Test Album Image 3"] == 2\n the content area should contain Test Sub Album\n the content area should contain Test Sub Album Image 1\n- Page Should Contain Element //img[@title="Test Sub Album Image 1"] 2\n+ Get Element Count //img[@title="Test Sub Album Image 1"] == 2\n the content area should contain Test Sub Album Image 2\n- Page Should Contain Element //img[@title="Test Sub Album Image 2"] 2\n+ Get Element Count //img[@title="Test Sub Album Image 2"] == 2\n the content area should contain Test Sub Album Image 3\n- Page Should Contain Element //img[@title="Test Sub Album Image 3"] 2\n+ Get Element Count //img[@title="Test Sub Album Image 3"] == 2\n \n Album should list all images and albums\n the content area should contain Test Image\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Image"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Image"] == 1\n the content area should contain Test News Item\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test News Item"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test News Item"] == 1\n the content area should contain Test Album Image 1\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Album Image 1"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Album Image 1"] == 1\n the content area should contain Test Album Image 2\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Album Image 2"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Album Image 2"] == 1\n the content area should contain Test Album Image 3\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Album Image 3"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Album Image 3"] == 1\n the content area should contain Test Sub Album Image 1\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 1"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 1"] == 1\n the content area should contain Test Sub Album Image 2\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 2"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 2"] == 1\n the content area should contain Test Sub Album Image 3\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 3"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 3"] == 1\n the content area should contain Test Album\n the content area should contain Test Sub Album\n \n@@ -230,8 +225,6 @@ I go to\n \n I disable dropdown navigation\n Go to ${PLONE_URL}/@@navigation-controlpanel\n- Input Text name=form.widgets.navigation_depth 1\n- Set Focus To Element css=#form-buttons-save\n- Wait Until Element Is Visible css=#form-buttons-save\n- Click Button Save\n- Wait until page contains Changes saved\n+ Fill Text css=[name="form.widgets.navigation_depth"] 1\n+ Click "Save"\n+ Get Text body contains Changes saved\n\\ No newline at end of file\n' +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' -Repository: plone.app.contenttypes +Repository: plone.app.discussion -Branch: refs/heads/3.x -Date: 2024-11-12T10:06:19+01:00 +Branch: refs/heads/4.x +Date: 2024-11-12T09:42:07+01:00 Author: 1letter (1letter) <1letter@gmx.de> -Commit: https://github.com/plone/plone.app.contenttypes/commit/c84f3eb12e6c9fe09df8f1e6ba864c9934864559 +Commit: https://github.com/plone/plone.app.discussion/commit/6126034741be5b924c1e4dea21df47c82ad5494a add news Files changed: -A news/707.tests +A news/247.tests -b'diff --git a/news/707.tests b/news/707.tests\nnew file mode 100644\nindex 000000000..01eaa78c7\n--- /dev/null\n+++ b/news/707.tests\n@@ -0,0 +1 @@\n+port robot tests, use browser library [1letter]\n' +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' -Repository: plone.app.contenttypes +Repository: plone.app.discussion -Branch: refs/heads/3.x -Date: 2024-11-12T11:06:10+01:00 +Branch: refs/heads/4.x +Date: 2024-11-12T11:07:20+01:00 Author: Peter Mathis (petschki) -Commit: https://github.com/plone/plone.app.contenttypes/commit/2a0854cc2b6cd6bb677c7b633ce8ec639f181de5 +Commit: https://github.com/plone/plone.app.discussion/commit/eb13d76d04b8c01b73a44ed1c9e86020b327f78f -Merge pull request #708 from plone/port-robottests-3.x +Merge pull request #248 from plone/port-robot-tests-plone-6.0.x -Port robottests 3.x +Port robot tests plone 6.0.x Files changed: -A news/707.tests -A plone/app/contenttypes/tests/robot/keywords.robot -M plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot -M plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot -M plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot -M plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot -M plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot -M plone/app/contenttypes/tests/robot/test_folderlisting.robot -D plone/app/contenttypes/tests/robot/keywords.txt - -b'diff --git a/news/707.tests b/news/707.tests\nnew file mode 100644\nindex 000000000..01eaa78c7\n--- /dev/null\n+++ b/news/707.tests\n@@ -0,0 +1 @@\n+port robot tests, use browser library [1letter]\ndiff --git a/plone/app/contenttypes/tests/robot/keywords.txt b/plone/app/contenttypes/tests/robot/keywords.robot\nsimilarity index 55%\nrename from plone/app/contenttypes/tests/robot/keywords.txt\nrename to plone/app/contenttypes/tests/robot/keywords.robot\nindex 2f204e59b..db9d37260 100644\n--- a/plone/app/contenttypes/tests/robot/keywords.txt\n+++ b/plone/app/contenttypes/tests/robot/keywords.robot\n@@ -34,11 +34,10 @@ a event\n a file\n [Arguments] ${title}\n Go to ${PLONE_URL}/++add++File\n- Wait until page contains Add File\n- Input text name=form.widgets.title ${title}\n+ Fill text name=form.widgets.title ${title}\n Choose File name=form.widgets.file ${PATH_TO_TEST_FILES}/file.pdf\n- Wait For Then Click Element css=#form-buttons-save\n- Wait until page contains Item created\n+ Click css=#form-buttons-save\n+ Get text body contains Item created\n \n a folder\n [Arguments] ${title}\n@@ -48,11 +47,10 @@ a folder\n a image\n [Arguments] ${title}\n Go to ${PLONE_URL}/++add++Image\n- Wait until page contains Add Image\n- Input text name=form.widgets.title ${title}\n+ Fill text name=form.widgets.title ${title}\n Choose File name=form.widgets.image ${PATH_TO_TEST_FILES}/image.png\n- Wait For Then Click Element css=#form-buttons-save\n- Wait until page contains Item created error=Image could not be created.\n+ Click css=#form-buttons-save\n+ Get text body contains Item created\n \n a link\n [Arguments] ${title}\n@@ -63,10 +61,9 @@ a link\n a news item\n [Arguments] ${title}\n Go to ${PLONE_URL}/++add++News Item\n- Wait until page contains Add News Item\n- Input text name=form.widgets.IDublinCore.title ${title}\n- Wait For Then Click Element css=#form-buttons-save\n- Wait until page contains Item created\n+ Fill text css=[name="form.widgets.IDublinCore.title"] ${title}\n+ Click css=#form-buttons-save\n+ Get text body contains Item created\n \n \n # ----------------------------------------------------------------------------\n@@ -75,17 +72,15 @@ a news item\n \n the content area should contain\n [Arguments] ${text}\n- Element Should Contain id=content ${text}\n+ Get text id=content contains ${text}\n \n the content area should not contain\n [Arguments] ${text}\n- Element Should Not Contain id=content ${text}\n+ Get Text id=content != ${text}\n \n the collection should contain\n [Arguments] ${title}\n- Wait until page contains element xpath=//*[@id=\'content-core\']\n- Page should contain element //*[@id=\'content-core\']//article//a[contains(text(), \'${title}\')] limit=1\n-\n+ Get Element //*[@id=\'content-core\']//article//a[contains(text(), \'${title}\')]\n \n the collection should not contain\n [Arguments] ${title}\n@@ -101,34 +96,22 @@ fill date field\n Click Element xpath=//div[@data-fieldname="${fieldid}"]//div[contains(@class, \'picker__day\')][contains(text(), "${day}")]\n \n I set the criteria ${type} in row ${number} to the option \'${label}\'\n- [Documentation] A couple of times we shift the focus so the input sticks, and wait a bit,\n- ... to make the test more stable.\n ${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(${number})\n- Wait until page contains element css=${criteria_row} .querystring-criteria-${type} .select2-choice\n- Click Element css=${criteria_row} .querystring-criteria-${type} .select2-choice\n- Sleep 1.5\n- Set Focus To Element css=body\n- Wait until element is visible css=#select2-drop input\n- Input Text css=#select2-drop input ${label}\n- Sleep 1.5\n- Set Focus To Element css=body\n- Wait until element is visible css=#select2-drop .select2-match\n- Click Element css=#select2-drop .select2-match\n- Sleep 1.5\n- Set Focus To Element css=body\n+ Click css=${criteria_row} .querystring-criteria-${type} .select2-choice\n+ Fill Text css=#select2-drop input ${label}\n+ Click xpath=//*[@id="select2-drop"]//*[@class="select2-match"]\n \n I set the criteria ${type} in row ${number} to the options \'${label}\'\n- ${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(${number})\n- Wait until page contains element css=${criteria_row} .querystring-criteria-${type} .select2-choices\n- Click Element css=${criteria_row} .querystring-criteria-${type} .select2-choices\n- Wait until page contains element css=.select2-input.select2-focused\n- Input text css=.select2-input.select2-focused ${label}\\n\n-# Click Element xpath=//div[@class=\'select2-result-label\']/descendant-or-self::*[contains(text(), \'${label}\')]\n+ ${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(1)\n+ Click css=${criteria_row} .querystring-criteria-value .select2-choices\n+ Fill text css=.select2-input.select2-focused ${label}\\n\n+ Click css=.select2-highlighted\n+ Get text css=${criteria_row} .select2-search-choice contains ${label}\n+ [Documentation] Chrome needs some more time\n+ Sleep .1s\n \n I set the criteria ${type} in row ${number} to the text \'${label}\'\n ${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(${number})\n- Input text css=${criteria_row} .querystring-criteria-value input ${label}\\t\n- [Documentation] Shift the focus so the input sticks, and wait a bit\n- Sleep 1.5\n- Set Focus To Element css=.querystring-sortreverse\n- Sleep 1.5\n+ Fill text css=${criteria_row} .querystring-criteria-value input ${label}\n+ Click css=.autotoc-level-1.active\n+ Sleep 1s\n\\ No newline at end of file\ndiff --git a/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot\nindex b957e8699..4b6863eac 100644\n--- a/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot\n+++ b/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot\n@@ -1,27 +1,15 @@\n-# ============================================================================\n-# Tests for the Collection Creator Criterion\n-# ============================================================================\n-#\n-# $ bin/robot-server --reload-path src/plone.app.contenttypes plone.app.contenttypes.testing.PLONE_APP_CONTENTTYPES_ROBOT_TESTING\n-#\n-# $ bin/robot src/plone.app.contenttypes/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot\n-#\n-# ============================================================================\n-\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 keywords.txt\n+*** Settings ***\n+\n+Resource plone/app/robotframework/browser.robot\n+Resource plone/app/robotframework/user.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+*** Test cases ***\n \n Scenario: Test Creator Criterions\n Given a site owner document Site Owner Document\n@@ -33,7 +21,7 @@ Scenario: Test Creator Criterions\n And the collection should contain Site Owner Document\n \n \n-*** Keywords *****************************************************************\n+*** Keywords ***\n \n a site owner document\n [Arguments] ${title}\n@@ -49,11 +37,10 @@ a test user document\n \n I set the collection\'s creator criterion to the current logged in user\n Go to ${PLONE_URL}/my-collection/edit\n- Wait until page contains Edit Collection\n+ Get Text body contains Edit Collection\n \n I set the criteria index in row 1 to the option \'Creator\'\n I set the criteria operator in row 1 to the option \'Current\'\n \n- Sleep 1\n- Click Button Save\n- Wait until page contains Changes saved\n+ Click "Save"\n+ Get Text body contains Changes saved\n\\ No newline at end of file\ndiff --git a/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot\nindex eb2dc7522..c98cdb164 100644\n--- a/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot\n+++ b/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot\n@@ -1,19 +1,7 @@\n-# ============================================================================\n-# Tests for the Collection Location Criterion\n-# ============================================================================\n-#\n-# $ bin/robot-server --reload-path src/plone.app.contenttypes plone.app.contenttypes.testing.PLONE_APP_CONTENTTYPES_ROBOT_TESTING\n-#\n-# $ bin/robot src/plone.app.contenttypes/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot\n-#\n-# ============================================================================\n-\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 keywords.txt\n+*** Settings ***\n+\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n \n Variables variables.py\n \n@@ -21,11 +9,9 @@ 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: Test Relative Location Criterion\n- [Documentation] This sometimes fails with:\n- ... Element locator \'css=#select2-drop input\' did not match any elements after 30 seconds\n Given I am logged in as site owner\n And a document Document outside Folder\n And a folder \'my-folder\' with a document \'Document within Folder\'\n@@ -36,9 +22,6 @@ Scenario: Test Relative Location Criterion\n \n \n Scenario: Test Absolute Location Criterion\n- [Documentation] This sometimes fails with:\n- ... Element locator \'css=#select2-drop input\' did not match any elements after 30 seconds\n- ... Or with: Element \'id=content\' should not contain text \'Document outside Folder\' but it did.\n Given I am logged in as site owner\n And a document Document outside Folder\n And a folder \'my-folder\' with a document \'Document within Folder\'\n@@ -52,14 +35,14 @@ Scenario: Test Absolute Location Criterion\n \n a folder \'${folder-id}\' with a document \'${document-title}\'\n Go to ${PLONE_URL}/++add++Folder\n- Wait until page contains element name=form.widgets.IDublinCore.title\n- Input text name=form.widgets.IDublinCore.title ${folder-id}\n- Click Button Save\n+ # Wait until page contains element name=form.widgets.IDublinCore.title\n+ Fill text xpath=//*[@name="form.widgets.IDublinCore.title"] ${folder-id}\n+ Click "Save"\n Go to ${PLONE_URL}/${folder-id}/++add++Document\n- Wait until page contains element name=form.widgets.IDublinCore.title\n- Input text name=form.widgets.IDublinCore.title ${document-title}\n- Click Button Save\n- Wait until page contains Item created\n+ # Wait until page contains element name=form.widgets.IDublinCore.title\n+ Fill text xpath=//*[@name="form.widgets.IDublinCore.title"] ${document-title}\n+ Click "Save"\n+ # Wait until page contains Item created\n \n I set the collection\'s location criterion to Advanced Mode\n I set the criteria operator in row 1 to the option \'Advanced Mode\'\n@@ -67,7 +50,7 @@ I set the collection\'s location criterion to Advanced Mode\n I set the collection\'s relative location criterion to\n [Arguments] ${criterion}\n Go to ${PLONE_URL}/my-collection/edit\n- Wait until page contains Edit Collection\n+ # Wait until page contains Edit Collection\n \n I set the criteria index in row 1 to the option \'Location\'\n \n@@ -76,13 +59,13 @@ I set the collection\'s relative location criterion to\n I set the criteria operator in row 1 to the option \'Relative path\'\n I set the criteria value in row 1 to the text \'${criterion}\'\n \n- Click Button Save\n- Wait until page contains Changes saved\n+ Click "Save"\n+ # Wait until page contains Changes saved\n \n I set the collection\'s absolute location criterion to\n [Arguments] ${criterion}\n Go to ${PLONE_URL}/my-collection/edit\n- Wait until page contains Edit Collection\n+ # Wait until page contains Edit Collection\n \n I set the criteria index in row 1 to the option \'Location\'\n \n@@ -91,5 +74,5 @@ I set the collection\'s absolute location criterion to\n I set the criteria operator in row 1 to the option \'Absolute path\'\n I set the criteria value in row 1 to the text \'${criterion}\'\n \n- Click Button Save\n- Wait until page contains Changes saved\n+ Click "Save"\n+ # Wait until page contains Changes saved\n\\ No newline at end of file\ndiff --git a/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot\nindex 719d7f975..52735972c 100644\n--- a/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot\n+++ b/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot\n@@ -1,25 +1,15 @@\n-# ============================================================================\n-# Tests for the Collection Type Criterion\n-# ============================================================================\n-#\n-# $ bin/robot-server --reload-path src/plone.app.contenttypes plone.app.contenttypes.testing.PLONE_APP_CONTENTTYPES_ROBOT_TESTING\n-#\n-# $ bin/robot src/plone.app.contenttypes/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot\n-#\n-# ============================================================================\n-\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 keywords.txt\n+*** Settings ***\n+\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n+\n+Variables variables.py\n \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: Test Review state Criterion\n Given I am logged in as site owner\n@@ -31,7 +21,7 @@ Scenario: Test Review state Criterion\n And the collection should not contain Published Document\n \n \n-*** Keywords *****************************************************************\n+*** Keywords ***\n \n a published document\n [Arguments] ${title}\n@@ -45,12 +35,9 @@ a private document\n I set the collection\'s review state criterion to\n [Arguments] ${criterion}\n Go to ${PLONE_URL}/my-collection/edit\n- Wait until page contains Edit Collection\n \n I set the criteria index in row 1 to the option \'Review state\'\n I set the criteria operator in row 1 to the option \'Any\'\n I set the criteria value in row 1 to the options \'${criterion}\'\n \n- Sleep 1\n- Click Button Save\n- Wait until page contains Changes saved\n+ Click "Save"\n\\ No newline at end of file\ndiff --git a/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot\nindex cf09f2775..f9bc1c88b 100644\n--- a/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot\n+++ b/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot\n@@ -1,25 +1,15 @@\n-# ============================================================================\n-# Tests for the Collection Short Name Criterion\n-# ============================================================================\n-#\n-# $ bin/robot-server --reload-path src/plone.app.contenttypes plone.app.contenttypes.testing.PLONE_APP_CONTENTTYPES_ROBOT_TESTING\n-#\n-# $ bin/robot src/plone.app.contenttypes/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot\n-#\n-# ============================================================================\n-\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 keywords.txt\n+*** Settings ***\n+\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n+\n+Variables variables.py\n \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 Test Short name (id) Criterion\n Given I am logged in as site owner\n@@ -31,17 +21,24 @@ Test Short name (id) Criterion\n And the collection should not contain Second Document\n \n \n-*** Keywords *****************************************************************\n+*** Keywords ***\n \n I set the collection short name (id) criterion to\n [Arguments] ${criterion}\n Go to ${PLONE_URL}/my-collection/edit\n- Wait until page contains Edit Collection\n \n I set the criteria index in row 1 to the option \'Short name\'\n- I set the criteria operator in row 1 to the option \'Is\'\n+ #I set the criteria operator in row 1 to the option \'Is\'\n+\n+ ${criteria_row} = Convert to String .querystring-criteria-wrapper:nth-child(1)\n+ Click css=${criteria_row} .querystring-criteria-operator .select2-choice\n+ Fill Text css=#select2-drop input Is\n+ Click css=.select2-highlighted\n+\n+\n I set the criteria value in row 1 to the text \'${criterion}\'\n+ [Documentation] Chrome needs some more time\n+ Sleep .1s\n \n- Sleep 1\n- Click Button Save\n- Wait until page contains Changes saved\n+ Click "Save"\n+ Get text body contains Changes saved\n\\ No newline at end of file\ndiff --git a/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot\nindex d7a2bbf61..60d53bb8a 100644\n--- a/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot\n+++ b/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot\n@@ -1,25 +1,14 @@\n-# ============================================================================\n-# Tests for the Collection Type Criterion\n-# ============================================================================\n-#\n-# $ bin/robot-server --reload-path src/plone.app.contenttypes plone.app.contenttypes.testing.PLONE_APP_CONTENTTYPES_ROBOT_TESTING\n-#\n-# $ bin/robot src/plone.app.contenttypes/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot\n-#\n-# ============================================================================\n-\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 keywords.txt\n+*** Settings ***\n+\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n+\n+Variables variables.py\n \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 Test Type Criterion\n Given I am logged in as site owner\n@@ -31,17 +20,15 @@ Test Type Criterion\n And the collection should not contain Test Document\n \n \n-*** Keywords *****************************************************************\n+*** Keywords ***\n \n I set the collection\'s type criterion to\n [Arguments] ${criterion}\n Go to ${PLONE_URL}/my-collection/edit\n- Wait until page contains Edit Collection\n \n I set the criteria index in row 1 to the option \'Type\'\n I set the criteria operator in row 1 to the option \'Any\'\n I set the criteria value in row 1 to the options \'${criterion}\'\n \n- Sleep 1\n- Click Button Save\n- Wait until page contains Changes saved\n+ Click "Save"\n+ Get text body contains Changes saved\n\\ No newline at end of file\ndiff --git a/plone/app/contenttypes/tests/robot/test_folderlisting.robot b/plone/app/contenttypes/tests/robot/test_folderlisting.robot\nindex a64f535d6..feb83513e 100644\n--- a/plone/app/contenttypes/tests/robot/test_folderlisting.robot\n+++ b/plone/app/contenttypes/tests/robot/test_folderlisting.robot\n@@ -1,18 +1,13 @@\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 keywords.txt\n+Resource plone/app/robotframework/browser.robot\n+Resource keywords.robot\n \n Variables variables.py\n \n-\n Test Setup Run Keywords Setup Testcontent Plone test setup\n Test Teardown Run keywords Plone test teardown\n \n-*** Variables ***\n-\n *** Test cases ***\n \n Scenario: Test folder listing view\n@@ -101,7 +96,7 @@ Listing should list contained content in detail\n the content area should contain this is a test document\n the content area should contain Test News Item\n the content area should contain this is a test news item\n- Page Should Contain Element //img[@title="Test News Item"] 2\n+ Get Element Count //img[@title="Test News Item"] == 2\n the content area should contain Test Event\n the content area should contain this is a test event\n the content area should contain Test Collection\n@@ -111,29 +106,29 @@ Listing should list contained content in detail\n the content area should contain Test File\n the content area should contain file.pdf\n the content area should contain Test Image\n- Page Should Contain Element //img[@title="Test Image"] 3\n+ Get Element Count //img[@title="Test Image"] == 2\n the content area should contain Test Album\n the content area should contain Test Album Image 1\n- Page Should Contain Element //img[@title="Test Album Image 1"] 2\n+ Get Element Count //img[@title="Test Album Image 1"] == 2\n the content area should contain Test Album Image 2\n- Page Should Contain Element //img[@title="Test Album Image 2"] 2\n+ Get Element Count //img[@title="Test Album Image 2"] == 2\n the content area should contain Test Album Image 3\n- Page Should Contain Element //img[@title="Test Album Image 3"] 2\n+ Get Element Count //img[@title="Test Album Image 3"] == 2\n the content area should contain Test Sub Album\n the content area should contain Test Sub Album Image 1\n- Page Should Contain Element //img[@title="Test Sub Album Image 1"] 1\n+ Get Element Count //img[@title="Test Sub Album Image 1"] == 1\n the content area should contain Test Sub Album Image 2\n- Page Should Contain Element //img[@title="Test Sub Album Image 2"] 1\n+ Get Element Count //img[@title="Test Sub Album Image 2"] == 1\n the content area should contain Test Sub Album Image 3\n- Page Should Contain Element //img[@title="Test Sub Album Image 3"] 1\n+ Get Element Count //img[@title="Test Sub Album Image 3"] == 1\n \n Album should list contained images and albums\n the content area should contain Test Album Image 1\n- Page Should Contain Element //img[@title="Test Album Image 1"] 2\n+ Get Element Count //img[@title="Test Album Image 1"] == 1\n the content area should contain Test Album Image 2\n- Page Should Contain Element //img[@title="Test Album Image 2"] 2\n+ Get Element Count //img[@title="Test Album Image 2"] == 1\n the content area should contain Test Album Image 3\n- Page Should Contain Element //img[@title="Test Album Image 3"] 2\n+ Get Element Count //img[@title="Test Album Image 3"] == 1\n the content area should contain Test Sub Album\n \n \n@@ -159,7 +154,7 @@ Listing should list all content in detail\n the content area should contain this is a test document\n the content area should contain Test News Item\n the content area should contain this is a test news item\n- Page Should Contain Element //img[@title="Test News Item"] 2\n+ Get Element Count //img[@title="Test News Item"] == 2\n the content area should contain Test Event\n the content area should contain this is a test event\n the content area should contain Test Collection\n@@ -169,39 +164,39 @@ Listing should list all content in detail\n the content area should contain Test File\n the content area should contain file.pdf\n the content area should contain Test Image\n- Page Should Contain Element //img[@title="Test Image"] 3\n+ Get Element Count //img[@title="Test Image"] == 2\n the content area should contain Test Album\n the content area should contain Test Album Image 1\n- Page Should Contain Element //img[@title="Test Album Image 1"] 2\n+ Get Element Count //img[@title="Test Album Image 1"] == 2\n the content area should contain Test Album Image 2\n- Page Should Contain Element //img[@title="Test Album Image 2"] 2\n+ Get Element Count //img[@title="Test Album Image 2"] == 2\n the content area should contain Test Album Image 3\n- Page Should Contain Element //img[@title="Test Album Image 3"] 2\n+ Get Element Count //img[@title="Test Album Image 3"] == 2\n the content area should contain Test Sub Album\n the content area should contain Test Sub Album Image 1\n- Page Should Contain Element //img[@title="Test Sub Album Image 1"] 2\n+ Get Element Count //img[@title="Test Sub Album Image 1"] == 2\n the content area should contain Test Sub Album Image 2\n- Page Should Contain Element //img[@title="Test Sub Album Image 2"] 2\n+ Get Element Count //img[@title="Test Sub Album Image 2"] == 2\n the content area should contain Test Sub Album Image 3\n- Page Should Contain Element //img[@title="Test Sub Album Image 3"] 2\n+ Get Element Count //img[@title="Test Sub Album Image 3"] == 2\n \n Album should list all images and albums\n the content area should contain Test Image\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Image"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Image"] == 1\n the content area should contain Test News Item\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test News Item"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test News Item"] == 1\n the content area should contain Test Album Image 1\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Album Image 1"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Album Image 1"] == 1\n the content area should contain Test Album Image 2\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Album Image 2"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Album Image 2"] == 1\n the content area should contain Test Album Image 3\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Album Image 3"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Album Image 3"] == 1\n the content area should contain Test Sub Album Image 1\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 1"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 1"] == 1\n the content area should contain Test Sub Album Image 2\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 2"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 2"] == 1\n the content area should contain Test Sub Album Image 3\n- Page Should Contain Element //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 3"] 1\n+ Get Element Count //div[contains(@class, "card-image")]//img[@title="Test Sub Album Image 3"] == 1\n the content area should contain Test Album\n the content area should contain Test Sub Album\n \n@@ -230,8 +225,6 @@ I go to\n \n I disable dropdown navigation\n Go to ${PLONE_URL}/@@navigation-controlpanel\n- Input Text name=form.widgets.navigation_depth 1\n- Set Focus To Element css=#form-buttons-save\n- Wait Until Element Is Visible css=#form-buttons-save\n- Click Button Save\n- Wait until page contains Changes saved\n+ Fill Text css=[name="form.widgets.navigation_depth"] 1\n+ Click "Save"\n+ Get Text body contains Changes saved\n\\ No newline at end of file\n' +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 + +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'