diff --git a/news/522.bugfix b/news/522.bugfix new file mode 100644 index 000000000..2278b62db --- /dev/null +++ b/news/522.bugfix @@ -0,0 +1,3 @@ +- Use the shared 'Plone test setup' and 'Plone test teardown' keywords in Robot + tests. + [Rotonen] diff --git a/plone/app/contenttypes/tests/robot/contenttypes_keywords.txt b/plone/app/contenttypes/tests/robot/contenttypes_keywords.txt deleted file mode 100644 index 43611ed2c..000000000 --- a/plone/app/contenttypes/tests/robot/contenttypes_keywords.txt +++ /dev/null @@ -1,99 +0,0 @@ -Variables plone/app/contenttypes/tests/robot/variables.py - -*** Keywords *** - -Suite Setup - Open browser ${front-page} - -Suite Teardown - Close All Browsers - -Log in - [Documentation] Log in to the site as ${userid} using ${password}. There - ... is no guarantee of where in the site you are once this is - ... done. (You are responsible for knowing where you are and - ... where you want to be) - [Arguments] ${userid} ${password} - - Go to ${PLONE_URL}/login_form - Page should contain element __ac_name - Page should contain element __ac_password - Page should contain button Log in - Input text __ac_name ${userid} - Input text __ac_password ${password} - Click Button Log in - -Log in as site owner - [Documentation] Log in as the SITE_OWNER provided by plone.app.testing, - ... with all the rights and privileges of that user. - Log in ${SITE_OWNER_NAME} ${SITE_OWNER_PASSWORD} - -Create Event - [Arguments] ${title} - Go to ${test-folder}/++add++Event - - Input text name=form.widgets.IDublinCore.title ${title} - Input text name=form.widgets.start_date-day 10 - Input text name=form.widgets.start_date-year 2013 - Input text name=form.widgets.end_date-day 10 - Input text name=form.widgets.end_date-year 2013 - - Click Button Save - Page Should Contain Item created - -Create News Item - [Arguments] ${title} - Go to ${test-folder}/++add++News Item - - Input text name=form.widgets.IDublinCore.title ${title} - Click Button Save - - Page Should Contain Item created - -Create Link - [Arguments] ${title} - Go to ${test-folder}/++add++Link - - Input text name=form.widgets.IDublinCore.title ${title} - Input text name=form.widgets.remoteUrl http://plone.org - Click Button Save - - Page Should Contain Item created - -Create Collection - [Arguments] ${title} - Go to ${test-folder}/++add++Collection - - Input text name=form.widgets.IDublinCore.title ${title} - Click Button Save - - Page Should Contain Item created - -Create Folder - [Arguments] ${title} - Go to ${test-folder}/++add++Folder - - Input text name=form.widgets.IDublinCore.title ${title} - Click Button Save - - Page Should Contain Item created - -Create Document - [Arguments] ${title} - Go to ${test-folder}/++add++Document - - Input text name=form.widgets.IDublinCore.title ${title} - Click Button Save - - Page Should Contain Item created - -Create Image - [Arguments] ${title} - Go to ${test-folder}/++add++Image - - Input text name=form.widgets.title ${title} - Choose File name=form.widgets.image ${PATH_TO_TEST_FILES}/image.jpg - Click Button Save - - Page Should Contain Item created - Page Should Contain Click to view full-size image diff --git a/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot index 0d89eeca9..bed9c9f3e 100644 --- a/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot +++ b/plone/app/contenttypes/tests/robot/test_collection_creator_criterion.robot @@ -12,12 +12,13 @@ Resource plone/app/robotframework/keywords.robot Resource plone/app/robotframework/saucelabs.robot +Resource plone/app/robotframework/selenium.robot Resource plone/app/contenttypes/tests/robot/keywords.txt Library Remote ${PLONE_URL}/RobotRemote -Test Setup Open SauceLabs test browser -Test Teardown Run keywords Report test status Close all browsers +Test Setup Run Keywords Plone test setup +Test Teardown Run keywords Plone test teardown *** Test cases *************************************************************** diff --git a/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot index 7cca6bb91..120541047 100644 --- a/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot +++ b/plone/app/contenttypes/tests/robot/test_collection_location_criterion.robot @@ -11,12 +11,14 @@ *** Settings ***************************************************************** Resource plone/app/robotframework/keywords.robot +Resource plone/app/robotframework/saucelabs.robot +Resource plone/app/robotframework/selenium.robot Resource plone/app/contenttypes/tests/robot/keywords.txt Variables plone/app/contenttypes/tests/robot/variables.py -Test Setup Run keywords Open test browser -Test Teardown Close all browsers +Test Setup Run Keywords Plone test setup +Test Teardown Run keywords Plone test teardown *** Test cases *************************************************************** diff --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 index dc542fb99..24dbb0352 100644 --- a/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot +++ b/plone/app/contenttypes/tests/robot/test_collection_review_state_criterion.robot @@ -11,10 +11,12 @@ *** Settings ***************************************************************** Resource plone/app/robotframework/keywords.robot +Resource plone/app/robotframework/saucelabs.robot +Resource plone/app/robotframework/selenium.robot Resource plone/app/contenttypes/tests/robot/keywords.txt -Test Setup Run keywords Open test browser -Test Teardown Close all browsers +Test Setup Run Keywords Plone test setup +Test Teardown Run keywords Plone test teardown *** Test cases *************************************************************** diff --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 index 1c242c31d..6d435b8e0 100644 --- a/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot +++ b/plone/app/contenttypes/tests/robot/test_collection_short_name_criterion.robot @@ -11,10 +11,12 @@ *** Settings ***************************************************************** Resource plone/app/robotframework/keywords.robot +Resource plone/app/robotframework/saucelabs.robot +Resource plone/app/robotframework/selenium.robot Resource plone/app/contenttypes/tests/robot/keywords.txt -Test Setup Run keywords Open test browser -Test Teardown Close all browsers +Test Setup Run Keywords Plone test setup +Test Teardown Run keywords Plone test teardown *** Test cases *************************************************************** diff --git a/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot b/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot index c2aabdc56..20588b1d3 100644 --- a/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot +++ b/plone/app/contenttypes/tests/robot/test_collection_type_criterion.robot @@ -11,10 +11,12 @@ *** Settings ***************************************************************** Resource plone/app/robotframework/keywords.robot +Resource plone/app/robotframework/saucelabs.robot +Resource plone/app/robotframework/selenium.robot Resource plone/app/contenttypes/tests/robot/keywords.txt -Test Setup Run keywords Open test browser -Test Teardown Close all browsers +Test Setup Run Keywords Plone test setup +Test Teardown Run keywords Plone test teardown *** Test cases *************************************************************** diff --git a/plone/app/contenttypes/tests/robot/test_folderlisting.robot b/plone/app/contenttypes/tests/robot/test_folderlisting.robot index f5885a381..22b2bb117 100644 --- a/plone/app/contenttypes/tests/robot/test_folderlisting.robot +++ b/plone/app/contenttypes/tests/robot/test_folderlisting.robot @@ -1,12 +1,15 @@ *** Settings *** Resource plone/app/robotframework/keywords.robot +Resource plone/app/robotframework/saucelabs.robot +Resource plone/app/robotframework/selenium.robot Resource plone/app/contenttypes/tests/robot/keywords.txt Variables plone/app/contenttypes/tests/robot/variables.py -Test Setup Run keywords Setup Testcontent Open test browser -Test Teardown Close all browsers + +Test Setup Run Keywords Setup Testcontent Plone test setup +Test Teardown Run keywords Plone test teardown *** Variables ***