def testAnnotationStageDetailLink(self): """ tests that when you click on the annotations link in the detail section it goes to the correct assay results; jlewis """ self.performSearch(term="thymus/parathyroid primordium", stage="19") # select specific stage activetree = self.driver.find_element_by_css_selector(".mgitreeview .active") self.assertEqual(activetree.text,"thymus/parathyroid primordium") wait.forAjax(self.driver) # verify annotation count exists annotCountTag = self.driver.find_element_by_css_selector(".resultsLink a") annotCount = int(annotCountTag.text) self.assertTrue(annotCount > 0, "annotation count not greater than zero") # click link to go to results page annotCountTag.click() wait.forNewWindow(self.driver) searchFor = self.driver.find_element_by_css_selector(".youSearchedFor") self.assertEqual(self.driver.title, "Result Summary") self.assertTrue("thymus/parathyroid primordium" in searchFor.text, "You searched for does not contain structure name") body = self.driver.find_element_by_tag_name("body") self.assertTrue( ("of %d" % annotCount) in body.text, "same annotation count not found on results summary")
def test_geno_popup_data(self): """ @status this test verifies the data found in a genotype popup page. @bug under construction """ self.driver.find_element_by_name("nomen").clear() self.driver.find_element_by_name("nomen").send_keys("lepr") self.driver.find_element_by_class_name("buttonLabel").click() self.driver.find_element_by_link_text("Leprdb").click() main_window = self.driver.window_handles[0] self.driver.find_element_by_link_text("hm1").click() wait.forNewWindow(self.driver) page_title = self.driver.find_element_by_class_name("titleBarMainTitle") self.assertEqual(page_title.text, "Phenotypes Associated with This Genotype") mgi_id = self.driver.find_element_by_class_name("genoID") self.assertEqual(mgi_id.text, "MGI:4429457") geno_type_id = self.driver.find_element_by_css_selector(".hmGeno.genotypeType") self.assertEqual(geno_type_id.text, "hm1") allelesystems = self.driver.find_elements_by_class_name("mpSystemRow") allelesystems = iterate.getTextAsList(allelesystems) print allelesystems self.assertEqual(allelesystems, ["homeostasis/metabolism", "behavior/neurological", "renal/urinary system"]) """