Index: intagroup.plonetabs/trunk/quintagroup/plonetabs/tests.py
===================================================================
--- /quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests.py	(revision 755)
+++ 	(revision )
@@ -1,54 +1,0 @@
-import unittest
-
-from zope.testing import doctestunit
-from zope.component import testing
-from Testing import ZopeTestCase as ztc
-
-from Products.Five import zcml
-from Products.Five import fiveconfigure
-from Products.PloneTestCase import PloneTestCase as ptc
-from Products.PloneTestCase.layer import PloneSite
-ptc.setupPloneSite()
-
-import quintagroup.plonetabs
-
-class TestCase(ptc.PloneTestCase):
-    class layer(PloneSite):
-        @classmethod
-        def setUp(cls):
-            fiveconfigure.debug_mode = True
-            zcml.load_config('configure.zcml',
-                             quintagroup.plonetabs)
-            fiveconfigure.debug_mode = False
-
-        @classmethod
-        def tearDown(cls):
-            pass
-
-
-def test_suite():
-    return unittest.TestSuite([
-
-        # Unit tests
-        #doctestunit.DocFileSuite(
-        #    'README.txt', package='quintagroup.plonetabs',
-        #    setUp=testing.setUp, tearDown=testing.tearDown),
-
-        #doctestunit.DocTestSuite(
-        #    module='quintagroup.plonetabs.mymodule',
-        #    setUp=testing.setUp, tearDown=testing.tearDown),
-
-
-        # Integration tests that use PloneTestCase
-        #ztc.ZopeDocFileSuite(
-        #    'README.txt', package='quintagroup.plonetabs',
-        #    test_class=TestCase),
-
-        #ztc.FunctionalDocFileSuite(
-        #    'browser.txt', package='quintagroup.plonetabs',
-        #    test_class=TestCase),
-
-        ])
-
-if __name__ == '__main__':
-    unittest.main(defaultTest='test_suite')
Index: /quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/__init__.py
===================================================================
--- /quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/__init__.py	(revision 756)
+++ /quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/__init__.py	(revision 756)
@@ -0,0 +1,1 @@
+#
Index: /quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/base.py
===================================================================
--- /quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/base.py	(revision 756)
+++ /quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/base.py	(revision 756)
@@ -0,0 +1,21 @@
+from  Products.Five import zcml
+from  Products.Five import fiveconfigure
+from  Testing import ZopeTestCase as ztc
+from  Products.PloneTestCase import PloneTestCase as ptc
+from  Products.PloneTestCase.layer import onsetup
+
+#ztc.installProduct('Zope2Product')
+
+@onsetup
+def setup_package():
+     import quintagroup.plonetabs
+     zcml.load_config('configure.zcml', quintagroup.plonetabs)
+     #ztc.installPackage('some.other.package')
+     ztc.installPackage('quintagroup.plonetabs')
+
+setup_package()
+ptc.setupPloneSite(products=['quintagroup.plonetabs'])
+
+class PloneTabsTestCase(ptc.PloneTestCase):
+     """Common test base class
+     """
Index: /quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/test_setup.py
===================================================================
--- /quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/test_setup.py	(revision 756)
+++ /quintagroup.plonetabs/trunk/quintagroup/plonetabs/tests/test_setup.py	(revision 756)
@@ -0,0 +1,67 @@
+import unittest
+from Products.CMFCore.utils import getToolByName
+
+from quintagroup.plonetabs.tests.base import PloneTabsTestCase
+
+class TestSetup(PloneTabsTestCase):
+    
+    def afterSetUp(self):
+        self.properties = getToolByName(self.portal, 'portal_properties')
+        self.types = getToolByName(self.portal, 'portal_types')
+    
+    def test_actionIcons(self):
+        tool = getToolByName(self.portal, 'portal_actionicons')
+        icon_ids = [i._action_id for i in tool.listActionIcons()]
+        self.failUnless('plonetabs' in icon_ids,
+            'There is no plonetabs action icon in actionicons tool.')
+    
+    def test_controlPanel(self):
+        tool = getToolByName(self.portal, 'portal_controlpanel')
+        action_ids = [a.id for a in tool.listActions()]
+        self.failUnless('plonetabs' in action_ids,
+            'There is no plonetabs action in control panel.')
+    
+    def test_cssRegistry(self):
+        tool = getToolByName(self.portal, 'portal_css')
+        css = tool.getResource('++resource++plonetabs.css')
+        self.failIf(css is None,
+            'There is no ++resource++plonetabs.css stylesheets registered.')
+    
+    def test_jsRegistry(self):
+        tool = getToolByName(self.portal, 'portal_javascripts')
+        
+        prototype = tool.getResource('++resource++prototype.js')
+        self.failIf(prototype is None,
+            'There is no ++resource++prototype.js script registered.')
+        self.failUnless(prototype._data['enabled'],
+            '++resource++prototype.js script is disabled.')
+        
+        effects = tool.getResource('++resource++pt_effects.js')
+        self.failIf(effects is None,
+            'There is no ++resource++pt_effects.js script registered.')
+        
+        dad = tool.getResource('++resource++sa_dragdrop.js')
+        self.failIf(dad is None,
+            'There is no ++resource++sa_dragdrop.js script registered.')
+
+    def test_kssRegistry(self):
+        tool = getToolByName(self.portal, 'portal_kss')
+        kss = tool.getResource('++resource++plonetabs.kss')
+        self.failIf(kss is None,
+            'There is no ++resource++plonetabs.kss sheets registered.')
+    
+    def test_propertiesTool(self):
+        tool = getToolByName(self.portal, 'portal_properties')
+        self.failUnless(hasattr(tool, 'tabs_properties'),
+            'There is no tabs_properties sheet in portal properties tool.')
+        titles = tool.tabs_properties.getProperty('titles', None)
+        self.assertEquals(titles,
+            ('portal_tabs|Portal Tabs Configuration',
+             'portal_footer|Portal Footer Configuration'),
+            'Site properties was not setup properly'
+        )
+
+def test_suite():
+    suite = unittest.TestSuite()
+    suite.addTest(unittest.makeSuite(TestSetup))
+    return suite
