Commit bca7e714 authored by Ivan Tyagov's avatar Ivan Tyagov

Explicitly pass the pad we want to test.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42620 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dcfc7ee3
...@@ -48,8 +48,7 @@ class TestGadgets(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -48,8 +48,7 @@ class TestGadgets(ERP5TypeTestCase, ZopeTestCase.Functional):
manager_password = '' manager_password = ''
def getBusinessTemplateList(self): def getBusinessTemplateList(self):
return ( return ('erp5_base',
'erp5_base',
'erp5_knowledge_pad', 'erp5_knowledge_pad',
'erp5_web', 'erp5_web',
'erp5_ingestion', 'erp5_ingestion',
...@@ -212,9 +211,6 @@ class TestGadgets(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -212,9 +211,6 @@ class TestGadgets(ERP5TypeTestCase, ZopeTestCase.Functional):
mode='web_section', mode='web_section',
default_pad_group = pad_group) default_pad_group = pad_group)
self.stepTic() self.stepTic()
#websection_pads = websection.ERP5Site_getKnowledgePadListForUser(
#mode='web_section',
#default_pad_group = pad_group)
base_websection_pad, websection_pads = \ base_websection_pad, websection_pads = \
websection.ERP5Site_getActiveKnowledgePadForUser(default_pad_group = pad_group) websection.ERP5Site_getActiveKnowledgePadForUser(default_pad_group = pad_group)
...@@ -428,7 +424,6 @@ class TestGadgets(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -428,7 +424,6 @@ class TestGadgets(ERP5TypeTestCase, ZopeTestCase.Functional):
self.web_front_knowledge_pad.KnowledgePad_addBoxList(**{'uids':[gadget.getUid()]}) self.web_front_knowledge_pad.KnowledgePad_addBoxList(**{'uids':[gadget.getUid()]})
self.stepTic() self.stepTic()
#self.changeSkin('KM')
# check that gadgets are added to web front page view # check that gadgets are added to web front page view
response = self.publish(url, self.auth) response = self.publish(url, self.auth)
for gadget in web_front_gadgets: for gadget in web_front_gadgets:
...@@ -568,8 +563,9 @@ class TestGadgets(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -568,8 +563,9 @@ class TestGadgets(ERP5TypeTestCase, ZopeTestCase.Functional):
self.stepTic() self.stepTic()
# check that gadgets are added to web section page view # check that gadgets are added to web section page view
self.changeSkin('KM') response = self.publish('%s/WebSection_viewKnowledgePadColumn?active_pad_url=%s' \
response = self.publish('%s/WebSection_viewKnowledgePadColumn' %self.web_section_url, self.auth) %(self.web_section_url, self.web_section_knowledge_pad.getRelativeUrl()), self.auth)
for gadget in web_section_gadgets: for gadget in web_section_gadgets:
self.failUnless(gadget.getTitle() in response.getBody()) self.failUnless(gadget.getTitle() in response.getBody())
...@@ -682,7 +678,8 @@ class TestGadgets(ERP5TypeTestCase, ZopeTestCase.Functional): ...@@ -682,7 +678,8 @@ class TestGadgets(ERP5TypeTestCase, ZopeTestCase.Functional):
self.stepTic() self.stepTic()
# check that gadgets are added to web section page view # check that gadgets are added to web section page view
response = self.publish('%s/WebSection_viewKnowledgePadColumn' %self.web_page_url, self.auth) response = self.publish('%s/WebSection_viewKnowledgePadColumn?active_pad_url=%s' \
%(self.web_page_url,self.web_section_content_knowledge_pad.getRelativeUrl()), self.auth)
for gadget in web_section_content_gadgets: for gadget in web_section_content_gadgets:
self.failUnless(gadget.getTitle() in response.getBody()) self.failUnless(gadget.getTitle() in response.getBody())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment