d.addCallback(lambda res: getPage(self.helper_webish_url))
def _got_welcome_helper(page):
html = page.replace('\n', ' ')
- self.failUnless(re.search('<div class="status-indicator connected-yes"></div>[ ]*Helper', html), page)
+ self.failUnless(re.search('<div class="status-indicator connected-yes"></div>[ ]*<div>Helper</div>', html), page)
self.failUnlessIn("Not running helper", page)
d.addCallback(_got_welcome_helper)
d.addCallback(_set_no_helper)
def _check_no_helper(res):
html = res.replace('\n', ' ')
- self.failUnless(re.search('<div class="status-indicator connected-not-configured"></div>[ ]*Helper', html), res)
+ self.failUnless(re.search('<div class="status-indicator connected-not-configured"></div>[ ]*<div>Helper</div>', html), res)
d.addCallback(_check_no_helper)
# enable helper, not connected
d.addCallback(_set_helper_not_connected)
def _check_helper_not_connected(res):
html = res.replace('\n', ' ')
- self.failUnless(re.search('<div class="status-indicator connected-no"></div>[ ]*Helper', html), res)
+ self.failUnless(re.search('<div class="status-indicator connected-no"></div>[ ]*<div>Helper not connected</div>', html), res)
d.addCallback(_check_helper_not_connected)
# enable helper, connected
d.addCallback(_set_helper_connected)
def _check_helper_connected(res):
html = res.replace('\n', ' ')
- self.failUnless(re.search('<div class="status-indicator connected-yes"></div>[ ]*Helper', html), res)
+ self.failUnless(re.search('<div class="status-indicator connected-yes"></div>[ ]*<div>Helper</div>', html), res)
d.addCallback(_check_helper_connected)
return d
def data_introducer_furl(self, ctx, data):
return self.client.introducer_furl
+ def data_introducer_description(self, ctx, data):
+ if self.data_connected_to_introducer(ctx, data) == "no":
+ return "Introducer not connected"
+ return "Introducer"
+
def data_connected_to_introducer(self, ctx, data):
if self.client.connected_to_introducer():
return "yes"
furl, connected = uploader.get_helper_info()
return furl
- def data_connected_to_helper_description(self, ctx, data):
- return self.data_connected_to_helper(ctx, data).replace('-', ' ')
+ def data_helper_description(self, ctx, data):
+ if self.data_connected_to_helper(ctx, data) == "no":
+ return "Helper not connected"
+ return "Helper"
def data_connected_to_helper(self, ctx, data):
try:
<div>
<h3>
<div><n:attr name="class">status-indicator connected-<n:invisible n:render="string" n:data="connected_to_introducer" /></n:attr></div>
- Introducer
+ <div n:render="string" n:data="introducer_description" />
</h3>
<div class="furl" n:render="string" n:data="introducer_furl" />
</div>
<div>
<h3>
<div><n:attr name="class">status-indicator connected-<n:invisible n:render="string" n:data="connected_to_helper" /></n:attr></div>
- Helper
+ <div n:render="string" n:data="helper_description" />
</h3>
<div class="furl" n:render="string" n:data="helper_furl" />
</div>