'Test the detailed client view works.'

def testHuntClientsView(self):

    hunt = self._CreateHuntWithDownloadedFile()
    self.Open('/')
    self.WaitUntil(self.IsElementPresent, 'client_query')
    self.Click('css=a[grrtarget=hunts]')
    self.WaitUntil(self.IsTextPresent, 'GenericHunt')
    self.Click("css=td:contains('GenericHunt')")
    self.Click('css=li[heading=Overview]')
    self.WaitUntil(self.IsTextPresent, 'Hunt    URN')
    self.Click('css=li[heading=Clients]')
    client_id = self.client_ids[0]
    self.WaitUntil(self.IsElementPresent, ("css=tr:contains('%s')" % client_id.Basename()))
    hunt_flows = list(aff4.FACTORY.ListChildren(hunt.urn.Add(client_id.Basename()), token=self.token))
    self.assertEqual(len(hunt_flows), 1)
    self.WaitUntil(self.IsTextPresent, utils.SmartStr(hunt_flows[0]))
