Skip to content

Commit

Permalink
Put together all robot framework tests
Browse files Browse the repository at this point in the history
Move all robot framework tests to the same tests/robot folder and
reuse the same layer to test all of them.
  • Loading branch information
gforcada committed Mar 26, 2014
1 parent fb6e8ac commit 1d6cb8a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 35 deletions.
23 changes: 4 additions & 19 deletions plone/app/widgets/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ def setUpZope(self, app, configurationContext):
plone.app.contenttypes,
context=configurationContext)

import plone.app.widgets.tests
xmlconfig.file('configure.zcml', plone.app.widgets.tests,
context=configurationContext)

try:
import mockup
self.loadZCML(package=mockup)
Expand Down Expand Up @@ -151,22 +155,3 @@ class TestSelectWidgetForm(AutoExtensibleForm, form.EditForm):

schema = ITestSelectWidgetSchema
ignoreContext = True


class SelectWidgetLayer(PloneAppWidgetsLayer):

defaultBases = (PLONEAPPWIDGETS_FIXTURE_DX, )

def setUpZope(self, app, configurationContext):
super(SelectWidgetLayer, self).setUpZope(app, configurationContext)
import plone.app.widgets.tests
from zope.configuration import xmlconfig
xmlconfig.file('configure.zcml', plone.app.widgets.tests,
context=configurationContext)


SELECT_WIDGET_FIXTURE = SelectWidgetLayer()
SELECT_WIDGET_ROBOT_TESTING = FunctionalTesting(
bases=(SELECT_WIDGET_FIXTURE,
z2.ZSERVER_FIXTURE),
name="SelectWidgetLayer:Robot")
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*** Settings ***

Resource ../robot/common.robot
Resource common.robot

Test Setup Open SauceLabs test browser
Test Teardown Run keywords Report test status Close all browsers
Expand Down
15 changes: 0 additions & 15 deletions plone/app/widgets/tests/test_robot.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from plone.app.widgets.testing import PLONEAPPWIDGETS_DX_ROBOT_TESTING
from plone.app.widgets.testing import SELECT_WIDGET_ROBOT_TESTING
from plone.testing import layered
import os
import robotsuite
Expand All @@ -26,18 +25,4 @@ def test_suite():
layer=PLONEAPPWIDGETS_DX_ROBOT_TESTING),
])

robot_widgets_dir = os.path.join(current_dir, 'robot_widgets')
robot_widgets_tests = [
os.path.join('robot_widgets', doc) for doc in
os.listdir(robot_widgets_dir) if doc.endswith('.robot') and
doc.startswith('test_')
]
for robot_test in robot_widgets_tests:
robottestsuite = robotsuite.RobotTestSuite(robot_test)
robottestsuite.level = ROBOT_TEST_LEVEL
suite.addTests([
layered(robottestsuite,
layer=SELECT_WIDGET_ROBOT_TESTING),
])

return suite

1 comment on commit 1d6cb8a

@mister-roboto
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TESTS PASSED
Mr.Roboto url : http://jenkins.plone.org/roboto/get_info?push=c2cecb7df2ca432b913990a18af3530b
plone-5.0-python-2.7 [SUCCESS]

Please sign in to comment.