Ejemplo n.º 1
0
 def test_hmdc_build(self):
     """
     @Status this test has been updated for the new hmdc pages
     checks the human and mouse build numbers on the HMDC query page
     """
     #displays the HMDC qf
     self.driver.get(PUBLIC_URL + "/diseasePortal")
     #find the pulldown and select Genome Location
     selectorbox = self.driver.find_element_by_class_name("queryBuilder")
     pulldown = selectorbox.find_element_by_tag_name("select").find_elements_by_tag_name("option")
     #print [x.text for x in pulldown]
     searchTextItems = iterate.getTextAsList(pulldown)
     #verifies all the items listed in the pulldown are correct and in order
     self.assertEqual(searchTextItems, ['Please select a field', 'Gene Symbol(s) or ID(s)','Gene Name','Phenotype or Disease Name', 'Phenotype or Disease ID(s)', 'Genome Location', 'Gene File Upload'])
     #click the Genome Location option
     pulldown[5].click()
     #self.assertIn("Genome Location", pulldown[3].Text)
     #finds the human and mouse genome build numbers
     buildnumber = self.driver.find_element_by_class_name('radio-group')
     # get the parent element
     mainbuild = buildnumber.find_elements_by_tag_name('label')
     wait.forAjax(self.driver)
     #confirms that GRCh38 is displayed
     #print [x.text for x in mainbuild]
     searchTextItems = iterate.getTextAsList(mainbuild)
     self.assertEqual(searchTextItems, ['Human (GRCh38)', 'Mouse (GRCm38)'])
    
     """
Ejemplo n.º 2
0
 def test_assaytype_column_sort(self):
     """
     @status: Tests that the assay type column sort works correctly
     Assay Type column:
     * Not applicable is not shown
     * sort order should be type (with not specified last), followed by assay type and gene
     * reverse order should still leave not specified last
     * blot assays are last by default
     """
     driver = self.driver
     driver.get(config.PUBLIC_URL + "/gxd")
     genebox = driver.find_element_by_name('nomenclature')
     # put your marker symbol
     genebox.send_keys("pax6")
     genebox.send_keys(Keys.RETURN)
     #find the Image tab
     imagetab = driver.find_element_by_id("imagestab")
     #click the image tab
     imagetab.click()
     wait.forAjax(driver)
     time.sleep(.5)
     assaylist = driver.find_element_by_id("imagesdata").find_elements_by_css_selector('td.yui-dt-col-assayType')
     items = assaylist[0].find_elements_by_tag_name("li")
     searchTextItems = iterate.getTextAsList(items)
     self.assertEqual(searchTextItems, ["Immunohistochemistry", "Immunohistochemistry"])
     assayheader = driver.find_element_by_id("imagesdata").find_element_by_css_selector('th.yui-dt-col-assayType')
     #click the gene header column to sort
     assayheader.click()
     wait.forAjax(driver)
     time.sleep(.5)
     assaylist = driver.find_element_by_id("imagesdata").find_elements_by_css_selector('td.yui-dt-col-assayType')
     items = assaylist[2].find_elements_by_tag_name("li")
     searchTextItems = iterate.getTextAsList(items)
     self.assertEqual(searchTextItems, ["RT-PCR"])
Ejemplo n.º 3
0
    def test_specimen_note(self):
        """
        @status: Tests that the specimen notes are correctly displayed
        specimen notes should be fully displayed
        """
        driver = self.driver
        driver.get(PWI_URL)
        # opens the PWI reference form
        driver.find_element_by_link_text("Reference Form").click()
        accidbox = driver.find_element_by_id("accids")
        # put your J number in the box
        accidbox.send_keys("J:36691")
        accidbox.submit()

        # finds the specimens link and clicks it
        driver.find_element_by_link_text("Specimens").click()
        wait.forAjax(driver)
        # finds the specimen notes column and then the first 7 items
        summarytable = driver.find_element_by_id("specimenSummaryTable")
        specnotes = summarytable.find_elements_by_css_selector("td:nth-child(13)")
        specnote1 = specnotes[0]
        specnote2 = specnotes[1]
        specnote3 = specnotes[2]
        specnote4 = specnotes[3]
        specnote5 = specnotes[4]
        specnote6 = specnotes[5]
        specnote7 = specnotes[6]
        # asserts the first 7 specimen notes are correct and in correct order
        self.assertEqual(specnote1.text, "2.5% paraformaldehyde  ")
        self.assertEqual(specnote2.text, "2.5% paraformaldehyde  ")
        self.assertEqual(specnote3.text, "Fixed in 2.5% paraformaldehyde. With N-glycannase pretreatment.  ")
        self.assertEqual(specnote4.text, "2.5% paraformaldehyde  ")
        self.assertEqual(specnote5.text, "2.5% paraformaldehyde  ")
        self.assertEqual(specnote6.text, "2.5% paraformaldehyde  ")
        self.assertEqual(specnote7.text, "2.5% paraformaldehyde  ")
Ejemplo n.º 4
0
    def test_cre_assay(self):
        """
        @status: Tests that all cre assays are correctly displayed at the bottom
        cre assays are Recombinase reporter and  In situ reporter (transgenic)
        """
        driver = self.driver
        driver.get(PWI_URL)
        # opens the PWI reference form
        driver.find_element_by_link_text("Reference Form").click()
        accidbox = driver.find_element_by_id("accids")
        # put your J number in the box
        accidbox.send_keys("J:105186")
        accidbox.submit()

        # finds the specimens link and clicks it
        driver.find_element_by_link_text("Specimens").click()
        wait.forAjax(driver)
        # finds the specimen notes column and then the first 7 items
        summarytable = driver.find_element_by_id("specimenSummaryTable")
        assaytypes = summarytable.find_elements_by_css_selector("td:nth-child(3)")
        assaytype1 = assaytypes[13]
        assaytype2 = assaytypes[14]
        assaytype3 = assaytypes[15]
        assaytype4 = assaytypes[16]
        assaytype5 = assaytypes[17]
        assaytype6 = assaytypes[18]
        assaytype7 = assaytypes[19]
        # asserts the first 7 specimen notes are correct and in correct order
        self.assertEqual(assaytype1.text, "In situ reporter (knock in)")
        self.assertEqual(assaytype2.text, "In situ reporter (transgenic)")
        self.assertEqual(assaytype3.text, "In situ reporter (transgenic)")
        self.assertEqual(assaytype4.text, "In situ reporter (transgenic)")
        self.assertEqual(assaytype5.text, "Recombinase reporter")
        self.assertEqual(assaytype6.text, "Recombinase reporter")
        self.assertEqual(assaytype7.text, "Recombinase reporter")
Ejemplo n.º 5
0
    def test_age_note(self):
        """
        @status: Tests that the age notes are correct
        an age note is represented by a asterisk.
        """
        driver = self.driver
        driver.get(PWI_URL)
        # opens the PWI reference form
        driver.find_element_by_link_text("Reference Form").click()
        accidbox = driver.find_element_by_id("accids")
        # put your J number in the box
        accidbox.send_keys("J:84605")
        accidbox.submit()

        # finds the specimens link and clicks it
        driver.find_element_by_link_text("Specimens").click()
        wait.forAjax(driver)
        # finds the age note column and then the first 12 items
        summarytable = driver.find_element_by_id("specimenSummaryTable")
        agenotes = summarytable.find_elements_by_css_selector("td:nth-child(6)")
        agenote1 = agenotes[0]
        agenote2 = agenotes[1]
        agenote3 = agenotes[2]
        agenote4 = agenotes[3]
        agenote5 = agenotes[4]
        agenote6 = agenotes[5]
        agenote7 = agenotes[6]
        # asserts the first 7 age notes are correct and in correct order
        self.assertEqual(agenote1.text, "*  ")
        self.assertEqual(agenote2.text, "*  ")
        self.assertEqual(agenote3.text, "*  ")
        self.assertEqual(agenote4.text, "*  ")
        self.assertEqual(agenote5.text, "*  ")
        self.assertEqual(agenote6.text, "*  ")
        self.assertEqual(agenote7.text, "*  ")
Ejemplo n.º 6
0
 def test_gene_column_sort(self):
     """
     @status: Tests that the Gene column sort works correctly
     Gene column:
     * sort order is gene, then assay type
     """
     driver = self.driver
     driver.get(config.PUBLIC_URL + "/gxd")
     genebox = driver.find_element_by_name('nomenclature')
     # put your marker symbol
     genebox.send_keys("shh")
     genebox.send_keys(Keys.RETURN)
     #find the Image tab
     imagetab = driver.find_element_by_id("imagestab")
     #click the image tab
     imagetab.click()
     wait.forAjax(driver)
     time.sleep(.5)
     
     imagesdata = driver.find_element_by_id("imagesdata")
     genelist = imagesdata.find_elements_by_css_selector('td.yui-dt-col-gene')
     items = genelist[0].find_elements_by_tag_name("li")
     searchTextItems = iterate.getTextAsList(items)
     self.assertEqual(searchTextItems, ["Arx", "Olig2", "Shh"])
     geneheader = imagesdata.find_element_by_css_selector('th.yui-dt-col-gene')
     #click the gene header column to sort
     geneheader.click()
     wait.forAjax(driver)
     time.sleep(.5)
     genelist = driver.find_element_by_id("imagesdata").find_elements_by_css_selector('td.yui-dt-col-gene')
     items = genelist[0].find_elements_by_tag_name("li")
     searchTextItems = iterate.getTextAsList(items)
     self.assertEqual(searchTextItems, ["Arx", "Olig2", "Shh"])
Ejemplo n.º 7
0
 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")                 
Ejemplo n.º 8
0
 def test_multispecs_diffassay(self):
     """
     @status: Tests the display for image panes with multiple specimens from different assays
     each specimen/assay should have it's own row per image
     """
     driver = self.driver
     driver.get(PWI_URL)
     #opens the PWI reference form
     driver.find_element_by_link_text("Reference Form").click()
     accidbox = driver.find_element_by_id('accids')
     # put your J number in the box
     accidbox.send_keys("J:83696")
     accidbox.send_keys(Keys.RETURN)
     time.sleep(3)
     #finds the specimens link and clicks it
     driver.find_element_by_link_text("Exp Images").click()
     wait.forAjax(driver)
     #Locates the images table and finds the table headings
     imagestable = driver.find_element_by_id("paneSummaryTable")
     rows = imagestable.find_elements_by_css_selector('tr')
     #displays each row of data for the first 18 rows
     row1 = rows[1]
     row2 = rows[2]
     row3 = rows[3]
     row4 = rows[4]
     row5 = rows[5]
     row6 = rows[6]
     row7 = rows[7]
     row8 = rows[8]
     row9 = rows[9]
     row10 = rows[10]
     row11 = rows[11]
     row12 = rows[12]
     row13 = rows[13]
     row14 = rows[14]
     row15 = rows[15]
     row16 = rows[16]
     row17 = rows[17]
     row18 = rows[18]
     row19 = rows[19]
     #asserts that the rows of data are correct for the first 18 rows
     self.assertEqual(row1.text, 'MGI:3522445\n1 Syndecan-1 MGI:3522591 (Sdc1) RT-PCR')
     self.assertEqual(row2.text, 'MGI:3522445\n1 Syndecan-2 MGI:3522592 (Sdc2) RT-PCR')
     self.assertEqual(row3.text, 'MGI:3522445\n1 Syndecan-3 MGI:3522593 (Sdc3) RT-PCR')
     self.assertEqual(row4.text, 'MGI:3522445\n1 Syndecan-4 MGI:3522594 (Sdc4) RT-PCR')
     self.assertEqual(row5.text, 'MGI:3522448\n2 A 2A MGI:3522619 (Sdc1) Immunohistochemistry')
     self.assertEqual(row6.text, "2A MGI:3522621 (Hspg2) Immunohistochemistry")
     self.assertEqual(row7.text, "2A MGI:3522624 (Tubb3) Immunohistochemistry")
     self.assertEqual(row8.text, "MGI:3522448\n2 B 2B,2B'' MGI:3522621 (Hspg2) Immunohistochemistry")
     self.assertEqual(row9.text, "2B,2B'' MGI:3522624 (Tubb3) Immunohistochemistry")
     self.assertEqual(row10.text, "MGI:3522448\n2 B' 2B',2B'' MGI:3522619 (Sdc1) Immunohistochemistry")
     self.assertEqual(row11.text, "MGI:3522448\n2 B'' 2B',2B'' MGI:3522619 (Sdc1) Immunohistochemistry")
     self.assertEqual(row12.text, "2B,2B'' MGI:3522621 (Hspg2) Immunohistochemistry")
     self.assertEqual(row13.text, "2B,2B'' MGI:3522624 (Tubb3) Immunohistochemistry")
     self.assertEqual(row14.text, "MGI:3522448\n2 C 2C,2C'' MGI:3522621 (Hspg2) Immunohistochemistry")
     self.assertEqual(row15.text, "2C,2C'' MGI:3522624 (Tubb3) Immunohistochemistry")
     self.assertEqual(row16.text, "MGI:3522448\n2 C' 2C',2C'' MGI:3522619 (Sdc1) Immunohistochemistry")
     self.assertEqual(row17.text, "2C,2C'' MGI:3522624 (Tubb3) Immunohistochemistry")
     self.assertEqual(row18.text, "MGI:3522448\n2 C'' 2C',2C'' MGI:3522619 (Sdc1) Immunohistochemistry")
     self.assertEqual(row19.text, "2C,2C'' MGI:3522621 (Hspg2) Immunohistochemistry")
Ejemplo n.º 9
0
    def testMinimalStageLinks(self):
        """
        tests that all stage links exist in the term detail section and clicking them function correctly; this is for a case with only a few stages; jlewis
        """
        self.performSearch(term="second polar body")
        
        detailArea = self.driver.find_element_by_id("termDetailContent")
        
        stageItems = detailArea.find_elements_by_class_name("stageSelector")
        # add all link text to a list for "assertIn" test
        stages = iterate.getTextAsList(stageItems)
        
        self.assertEqual(stages, ["All", "1", "2", "3", "4"])

        # click stage 1
        stage1 = detailArea.find_element_by_link_text("1").click()
        wait.forAjax(self.driver)
        
        #verify EMAPS term is loaded for second polar body
        detailItems = self.driver.find_elements_by_css_selector("#termDetailContent dd")
        self.assertEqual(detailItems[2].text,"EMAPA:16034")
        
        
        # verify stage is active
        activeStage = self.driver.find_element_by_css_selector(".stageSelector.active")
        self.assertEqual(activeStage.text,"1")
Ejemplo n.º 10
0
 def test_images_noassay(self):
     """
     @status: Tests the display for image panes with no attached assay
     each image and figure displayed but no assay or specimen
     """
     driver = self.driver
     driver.get(PWI_URL)
     #opens the PWI reference form
     driver.find_element_by_link_text("Reference Form").click()
     accidbox = driver.find_element_by_id('accids')
     # put your J number in the box
     accidbox.send_keys("J:102285")
     accidbox.send_keys(Keys.RETURN)
     time.sleep(3)
     #finds the specimens link and clicks it
     driver.find_element_by_link_text("Exp Images").click()
     wait.forAjax(driver)
     #Locates the images table and finds the table headings
     imagestable = driver.find_element_by_id("paneSummaryTable")
     rows = imagestable.find_elements_by_css_selector('tr')
     #displays each row of data for the first 16 rows
     row1 = rows[1]
     row2 = rows[2]
     row3 = rows[3]
     row4 = rows[4]
     row5 = rows[5]
     row6 = rows[6]
     row7 = rows[7]
     row8 = rows[8]
     row9 = rows[9]
     row10 = rows[10]
     row11 = rows[11]
     row12 = rows[12]
     row13 = rows[13]
     row14 = rows[14]
     row15 = rows[15]
     row16 = rows[16]
     #asserts that the rows of data are correct for the first 16 rows
     self.assertEqual(row1.text, 'MGI:4453601\n2 b Fig. 1b MGI:4453599 (Tg(Scgb1a1-cre)1Tauc) In situ reporter (transgenic)')
     self.assertEqual(row2.text, 'MGI:4453603\n3 a Fig. 3a MGI:4453606 (Tg(Scgb1a1-cre)1Tauc) Recombinase reporter')
     self.assertEqual(row3.text, 'MGI:4453603\n3 c Fig. 3c MGI:4453606 (Tg(Scgb1a1-cre)1Tauc) Recombinase reporter')
     self.assertEqual(row4.text, 'MGI:4453603\n3 e Fig. 3e MGI:4453606 (Tg(Scgb1a1-cre)1Tauc) Recombinase reporter')
     self.assertEqual(row5.text, 'MGI:4453605\n4 a Fig. 4a MGI:4453606 (Tg(Scgb1a1-cre)1Tauc) Recombinase reporter')
     self.assertEqual(row6.text, 'MGI:4453605\n4 b Fig. 4b MGI:4453606 (Tg(Scgb1a1-cre)1Tauc) Recombinase reporter')
     self.assertEqual(row7.text, 'MGI:4453605\n4 c Fig. 4c MGI:4453606 (Tg(Scgb1a1-cre)1Tauc) Recombinase reporter')
     self.assertEqual(row8.text, 'MGI:4453605\n4 d Fig. 4d MGI:4453606 (Tg(Scgb1a1-cre)1Tauc) Recombinase reporter')
     self.assertEqual(row9.text, 'MGI:4453605\n4 e Fig. 4e MGI:4453606 (Tg(Scgb1a1-cre)1Tauc) Recombinase reporter')
     self.assertEqual(row10.text, 'MGI:4453605\n4 f Fig. 4f MGI:4453606 (Tg(Scgb1a1-cre)1Tauc) Recombinase reporter')
     self.assertEqual(row11.text, 'MGI:4453605\n4 g Fig. 4g MGI:4453606 (Tg(Scgb1a1-cre)1Tauc) Recombinase reporter')
     self.assertEqual(row12.text, 'MGI:4453605\n4 h Fig. 4h MGI:4453606 (Tg(Scgb1a1-cre)1Tauc) Recombinase reporter')
     self.assertEqual(row13.text, 'MGI:4453605\n4 i Fig. 4i MGI:4453606 (Tg(Scgb1a1-cre)1Tauc) Recombinase reporter')
     self.assertEqual(row14.text, 'MGI:4453605\n4 j Fig. 4j MGI:4453606 (Tg(Scgb1a1-cre)1Tauc) Recombinase reporter')
     self.assertEqual(row15.text, 'MGI:4453605\n4 k')
     self.assertEqual(row16.text, 'MGI:4453605\n4 l')
Ejemplo n.º 11
0
 def test_default_sort_treeview(self):
     """
     @status: Tests that the terms are correctly sorted
     The default sort for the tree view is smart alpha
     """
     driver = self.driver
     driver.get(config.PUBLIC_URL + "/vocab/gxd/anatomy/EMAPA:16042")
     
     wait.forAjax(driver)
     time.sleep(1)
     termList = driver.find_elements_by_class_name("ygtvlabel")
     terms = iterate.getTextAsList(termList)
     print [x.text for x in termList]
Ejemplo n.º 12
0
 def test_mrk_detail_build(self):
     """
     @Status this test works
     Checks the mouse build number on a marker detail page
     """
     #displays the marker detail page for pax6
     self.driver.get(PUBLIC_URL + "/marker/MGI:1096368")
     #opens the Location & Maps section
     self.driver.find_element_by_class_name("toggleImage").click()
     wait.forAjax(self.driver)
     #finds the build number at the top of the snp QF page
     seqmapLabel = self.driver.find_element_by_class_name("detailData2").find_element_by_class_name("closed").find_element_by_css_selector("div.value")
     #verifies GRCm38 is displayed in this section
     self.assertIn("GRCm38", seqmapLabel.text)
Ejemplo n.º 13
0
 def test_table_headers(self):
     """
     @status: Tests that the Gene Ontology Classifications page in Tabular view, table headers are correct
     Headers are: Aspect, Category, Classification Term, Context, Proteoform, Evidence, Inferred From, Reference(s)
     """
     driver = self.driver
     driver.get(config.FEWI_URL + "/marker")
     genebox = driver.find_element_by_name('nomen')
     # put your marker symbol
     genebox.send_keys("Ccdc40")
     genebox.send_keys(Keys.RETURN)
     time.sleep(3)
     #finds the correct marker link and clicks it
     driver.find_element_by_link_text("Ccdc40").click()
     wait.forAjax(driver)
     #Finds the All sequences link and clicks it
     driver.find_element_by_class_name("goRibbon").find_element_by_link_text("26").click()
     wait.forAjax(driver)
     #Locates the marker header table and finds the table headings
     tabularheaderlist = driver.find_element_by_id("dynamicdata")
     items = tabularheaderlist.find_elements_by_tag_name("th")
     searchTextItems = iterate.getTextAsList(items)
     wait.forAjax(driver)
     print searchTextItems
     #verifies all the table headings are correct and in order
     self.assertEqual(searchTextItems, ['Aspect','Category','Classification Term', 'Context', 'Proteoform', 'Evidence', 'Inferred From', 'Reference(s)'])
     wait.forAjax(driver)
Ejemplo n.º 14
0
 def test_hide_private_marker(self):
     """
     @status: Tests that the dummy private allele Brca1<test1> does not display on public
     """
     driver = self.driver
     driver.get(config.PUBLIC_URL)
     self.assertIn("Informatics", driver.title)
     querytext = driver.find_element_by_name('query')
     querytext.clear()
     querytext.send_keys("Agit")# put your marker symbol
     querytext.send_keys(Keys.RETURN)  # click the submit button
     wait.forAjax(driver)
     missng = driver.find_element_by_class_name('redText').is_displayed()#verifies that the warning Could not find the independent term(s): is displaying
     self.assertTrue(missng, 'oops, is not displaying warning message!')
Ejemplo n.º 15
0
 def test_multispecs_sameassay_samepane(self):
     """
     @status: Tests the display for image panes with multiple specimens from the same assay using the same image pane
     each specimen should have it's own row
     """
     driver = self.driver
     driver.get(PWI_URL)
     #opens the PWI reference form
     driver.find_element_by_link_text("Reference Form").click()
     accidbox = driver.find_element_by_id('accids')
     # put your J number in the box
     accidbox.send_keys("J:85638")
     accidbox.send_keys(Keys.RETURN)
     time.sleep(3)
     #finds the specimens link and clicks it
     driver.find_element_by_link_text("Exp Images").click()
     wait.forAjax(driver)
     #Locates the images table and finds the table headings
     imagestable = driver.find_element_by_id("paneSummaryTable")
     rows = imagestable.find_elements_by_css_selector('tr')
     #displays each row of data for the first 13 rows
     row1 = rows[1]
     row2 = rows[2]
     row3 = rows[3]
     row4 = rows[4]
     row5 = rows[5]
     row6 = rows[6]
     row7 = rows[7]
     row8 = rows[8]
     row9 = rows[9]
     row10 = rows[10]
     row11 = rows[11]
     row12 = rows[12]
     row13 = rows[13]
     #asserts that the rows of data are correct for the first 13 rows
     self.assertEqual(row1.text, 'MGI:5750634\n3 A MGI:5750650 (H13) Northern blot')
     self.assertEqual(row2.text, 'MGI:5750637\n4 A 4A MGI:5750680 (H13) RNA in situ')
     self.assertEqual(row3.text, 'MGI:5750637\n4 B 4B MGI:5750680 (H13) RNA in situ')
     self.assertEqual(row4.text, 'MGI:5750637\n4 C 4C MGI:5750680 (H13) RNA in situ')
     self.assertEqual(row5.text, 'MGI:5750638\n5 E5.5 5 E5.5 embryo, 5 E5.5 mother MGI:5750680 (H13) RNA in situ')
     self.assertEqual(row6.text, 'MGI:5750638\n5 E6.5 5 E6.5 embryo, 5 E6.5 mother MGI:5750680 (H13) RNA in situ')
     self.assertEqual(row7.text, 'MGI:5750638\n5 E7.5 5 E7.5 embryo, 5 E7.5 mother MGI:5750680 (H13) RNA in situ')
     self.assertEqual(row8.text, 'MGI:5750638\n5 E8.5 5 E8.5 embryo, 5 E8.5 mother MGI:5750680 (H13) RNA in situ')
     self.assertEqual(row9.text, 'MGI:5750638\n5 E9.5 5 E9.5 embryo, 5 E9.5 mother MGI:5750680 (H13) RNA in situ')
     self.assertEqual(row10.text, 'MGI:5750639\n6 E10.5 6 E10.5 MGI:5750680 (H13) RNA in situ')
     self.assertEqual(row11.text, 'MGI:5750639\n6 E11.5 6 E11.5 MGI:5750680 (H13) RNA in situ')
     self.assertEqual(row12.text, 'MGI:5750639\n6 E13.5 6 E13.5 MGI:5750680 (H13) RNA in situ')
     self.assertEqual(row13.text, 'MGI:5750639\n6 E14.5 6 E14.5 MGI:5750680 (H13) RNA in situ')
Ejemplo n.º 16
0
 def test_parent_data(self):
     """
     @status: Tests that the parent terms are correctly identified
     In this case all 3 parent terms should be part-of
     """
     driver = self.driver
     driver.get(config.PUBLIC_URL + "/vocab/gxd/anatomy/EMAPA:16042")
     
     wait.forAjax(driver)
     time.sleep(1)
     #identifies the table tags that  contain  parent terms
     parent = driver.find_element_by_id("termPaneDetails").find_elements_by_tag_name("td")
     #print [x.text for x in parent]
     
     # verifies that the returned part terms are correct
     self.assertEqual(parent[4].text, "part-of conceptus\npart-of egg cylinder\npart-of mouse")
Ejemplo n.º 17
0
 def test_hide_private_allele(self):
     """
     @status: Tests that the dummy private allele Brca1<test1> does not display on public
     """
     driver = self.driver
     driver.get(config.PUBLIC_URL)
     self.assertIn("Informatics", driver.title)
     querytext = driver.find_element_by_name('query')
     querytext.clear()
     querytext.send_keys("Brca1")# put your marker symbol
     querytext.send_keys(Keys.RETURN)  # click the submit button
     brcalink = driver.find_element_by_link_text("Brca1")  # Find the Brca1 link and click it
     brcalink.click()  # Find the all alleles and mutations link and click it
     allallelelink = driver.find_element_by_link_text("89")
     allallelelink.click()
     wait.forAjax(driver)
     # assert that there is no link for Brca1<test1>#testallele = driver.find_element_by_link_text('Brca1<sup>test1</sup>')
     self.assertNotIn("test1", self.driver.page_source,"Test1 allele is displaying!")
Ejemplo n.º 18
0
 def test_table_headers(self):
     """
     @status: Tests that the Sequence Summary table headers are correct
     Headers are: Select, Sequence, Type, Length, Strain/Species, Description from Sequence Provider, Clone Collection, Marker Symbol
     """
     driver = self.driver
     driver.get(config.FEWI_URL + "/marker")
     genebox = driver.find_element_by_name("nomen")
     # put your marker symbol
     genebox.send_keys("Bloc1s2")
     genebox.send_keys(Keys.RETURN)
     time.sleep(3)
     # finds the correct marker link and clicks it
     driver.find_element_by_link_text("Bloc1s2").click()
     wait.forAjax(driver)
     # Finds the All sequences link and clicks it
     driver.find_element_by_link_text("15").click()
     wait.forAjax(driver)
     # Locates the marker header table and finds the table headings
     markerheaderlist = driver.find_element_by_class_name("summaryHeaderCat1")
     items = markerheaderlist.find_elements_by_tag_name("div")
     searchTextItems = iterate.getTextAsList(items)
     wait.forAjax(driver)
     # verifies all the table headings are correct and in order
     self.assertEqual(searchTextItems, ["Symbol", "Name", "ID"])
     wait.forAjax(driver)
     # Locates the sequence summary table and finds the table headings
     columnheaderlist = driver.find_elements_by_class_name("yui-dt-label")
     searchTextItems = iterate.getTextAsList(columnheaderlist)
     wait.forAjax(driver)
     # verifies all the table headings are correct and in order
     self.assertEqual(
         searchTextItems,
         [
             "Select",
             "Sequence",
             "Type",
             "Length",
             "Strain/Species",
             "Description From\nSequence Provider",
             "Clone\nCollection",
             "Marker\nSymbol",
         ],
     )
Ejemplo n.º 19
0
 def test_specimentype_column_sort(self):
     """
     @status: Tests that the specimen type column sort works correctly
     The order for the specimen type sort is the order in the EI menu:
     *whole mount
     *section
     *section from whole mount
     *optical section
     *not specified
     *blots
     
     Reverse would be specified as:
     *optical section
     *section from whole mount
     *section
     *whole mount
     *not specified
     *blots
     """
     driver = self.driver
     driver.get(config.PUBLIC_URL + "/gxd")
     genebox = driver.find_element_by_name('nomenclature')
     # put your marker symbol
     genebox.send_keys("hoxa13")
     genebox.send_keys(Keys.RETURN)
     #find the Image tab
     imagetab = driver.find_element_by_id("imagestab")
     #click the image tab
     imagetab.click()
     wait.forAjax(driver)
     time.sleep(.5)
     typelist = driver.find_element_by_id("imagesdata").find_elements_by_css_selector('td.yui-dt-col-hybridization')
     items = typelist[0].find_elements_by_tag_name("li")
     searchTextItems = iterate.getTextAsList(items)
     self.assertEqual(searchTextItems, ["section", "section"])
     specimenheader = driver.find_element_by_id("imagesdata").find_element_by_css_selector('th.yui-dt-col-hybridization')
     #click the gene header column to sort
     specimenheader.click()
     wait.forAjax(driver)
     time.sleep(.5)
     assaylist = driver.find_element_by_id("imagesdata").find_elements_by_css_selector('td.yui-dt-col-hybridization')
     items = assaylist[0].find_elements_by_tag_name("li")
     searchTextItems = iterate.getTextAsList(items)
     self.assertEqual(searchTextItems, ["whole mount"])
Ejemplo n.º 20
0
 def test_old_gene_id(self):
     """
     @status: Tests that an Old Gene ID search brings back the proper information
     """
     driver = self.driver
     driver.get(config.FEWI_URL)
     searchbox = driver.find_element_by_id('searchToolTextArea')
     # put your Old Gene ID in the quick search box
     searchbox.send_keys("MGD-MRK-1672")
     searchbox.send_keys(Keys.RETURN)
     time.sleep(3)
     #finds the Best Match information
     buckets = driver.find_elements_by_class_name("qsBucket")
     match_info = buckets[0].find_element_by_class_name("qsBucketRow1").find_elements_by_tag_name("td")
     searchTextItems = iterate.getTextAsList(match_info)
     wait.forAjax(driver)
     print searchTextItems
     #asserts that the Best Match data is correct for the ID searched
     self.assertEqual(searchTextItems[7], 'ID : MGD-MRK-1672   and more detail...')
     wait.forAjax(driver)
Ejemplo n.º 21
0
 def test_mouse_anat_id(self):
     """
     @status: Tests that an Adult Mouse Anatomy ID brings back the proper information
     """
     driver = self.driver
     driver.get(config.FEWI_URL)
     searchbox = driver.find_element_by_id('searchToolTextArea')
     # put your Adult Mouse Anatomy ID in the quick search box
     searchbox.send_keys("MA:0000168")
     searchbox.send_keys(Keys.RETURN)
     time.sleep(3)
     #finds the Best Match information
     buckets = driver.find_elements_by_class_name("qsBucket")
     match_info = buckets[2].find_element_by_class_name("qsBucketRow1").find_elements_by_tag_name("td")
     searchTextItems = iterate.getTextAsList(match_info)
     wait.forAjax(driver)
     print searchTextItems
     #asserts that the Best Match data is correct for the ID searched
     self.assertEqual(searchTextItems[2], 'ID : MA:0000168 (Adult Mouse Anatomy)')
     wait.forAjax(driver) 
Ejemplo n.º 22
0
 def test_ncbi_id(self):
     """
     @status: Tests that a NCBI ID brings back the proper information
     """
     driver = self.driver
     driver.get(config.FEWI_URL)
     searchbox = driver.find_element_by_id('searchToolTextArea')
     # put your NCBI ID in the quick search box
     searchbox.send_keys("20423")
     searchbox.send_keys(Keys.RETURN)
     time.sleep(3)
     #finds the Best Match information
     buckets = driver.find_elements_by_class_name("qsBucket")
     match_info = buckets[2].find_elements_by_class_name("qsBucketRow2")[0].find_elements_by_tag_name("td")
     searchTextItems = iterate.getTextAsList(match_info)
     wait.forAjax(driver)
     print searchTextItems
     #asserts that the Best Match data is correct for the ID searched
     self.assertEqual(searchTextItems[2], 'ID : 20423 (NCBI Gene Model)')
     wait.forAjax(driver) 
Ejemplo n.º 23
0
 def test_escellline_lexicon_id(self):
     """
     @status: Tests that an ES Cell Line ID(Lexicon) brings back the proper information
     """
     driver = self.driver
     driver.get(config.FEWI_URL)
     searchbox = driver.find_element_by_id('searchToolTextArea')
     # put your ES Cell Line ID in the quick search box
     searchbox.send_keys("OST2298")
     searchbox.send_keys(Keys.RETURN)
     time.sleep(3)
     #finds the Best Match information
     buckets = driver.find_elements_by_class_name("qsBucket")
     match_info = buckets[0].find_element_by_class_name("qsBucketRow1").find_elements_by_tag_name("td")
     searchTextItems = iterate.getTextAsList(match_info)
     wait.forAjax(driver)
     print searchTextItems
     #asserts that the Best Match data is correct for the ID searched
     self.assertEqual(searchTextItems[7], 'Cell Line ID : OST2298 (Lexicon)   and 2 more...')
     wait.forAjax(driver) 
Ejemplo n.º 24
0
 def test_go_id(self):
     """
     @status: Tests that an GO ID brings back the proper information
     """
     driver = self.driver
     driver.get(config.FEWI_URL)
     searchbox = driver.find_element_by_id('searchToolTextArea')
     # put your GO ID in the quick search box
     searchbox.send_keys("GO:0005892")
     searchbox.send_keys(Keys.RETURN)
     time.sleep(3)
     #finds the Best Match information
     buckets = driver.find_elements_by_class_name("qsBucket")
     match_info = buckets[0].find_element_by_class_name("qsBucketRow1").find_elements_by_tag_name("td")
     searchTextItems = iterate.getTextAsList(match_info)
     wait.forAjax(driver)
     print searchTextItems
     #asserts that the Best Match data is correct for the ID searched
     self.assertEqual(searchTextItems[7], 'Function : acetylcholine-gated channel complex (GO:0005892)   and more detail...')
     wait.forAjax(driver) 
Ejemplo n.º 25
0
 def test_default_sort_genes(self):
     """
     @status: Tests that the genes column sorts genes result correctly
     """
     driver = self.driver
     driver.get(config.PUBLIC_URL + "/gxd")
     genebox = driver.find_element_by_name('nomenclature')
     # put your marker symbol
     genebox.send_keys("pax6")
     genebox.send_keys(Keys.RETURN)
     #find the Image tab
     imagetab = driver.find_element_by_id("imagestab")
     #click the image tab
     imagetab.click()
     wait.forAjax(driver)
     time.sleep(.5)
     genelist = driver.find_element_by_id("imagesdata").find_elements_by_css_selector('td.yui-dt-col-gene')
     items = genelist[16].find_elements_by_tag_name("li")
     searchTextItems = iterate.getTextAsList(items)
     self.assertEqual(searchTextItems, ["Gsx2", "Nkx2-1", "Pax6"])
Ejemplo n.º 26
0
 def test_default_sort_specimentype(self):
     """
     @status: Tests the sort order for specimen type using default sort
     sort order is gene first, assay type secondary
     """
     driver = self.driver
     driver.get(config.PUBLIC_URL + "/gxd")
     genebox = driver.find_element_by_name('nomenclature')
     # put your marker symbol
     genebox.send_keys("Tmem100")
     genebox.send_keys(Keys.RETURN)
     #find the Image tab
     imagetab = driver.find_element_by_id("imagestab")
     #click the image tab
     imagetab.click()
     wait.forAjax(driver)
     time.sleep(.5)
     typelist = driver.find_element_by_id("imagesdata").find_elements_by_css_selector('td.yui-dt-col-hybridization')
     items = typelist[0].find_elements_by_tag_name("li")
     searchTextItems = iterate.getTextAsList(items)
     self.assertEqual(searchTextItems, ["section", "section from whole mount"])
Ejemplo n.º 27
0
    def test_snp_qf(self):
        """
        @Status this test works
        Checks the dbSNp and mouse build numbers on the snp query form and snp summary page
        """
        self.driver.get(PUBLIC_URL + "/snp/")
        #finds the build number at the top of the snp QF page
        formLabel = self.driver.find_element_by_css_selector("#form1 > div:nth-child(2)")
        self.assertIn("dbSNP Build 142", formLabel.text)

        genebox = self.driver.find_element_by_id("nomen")
        #enters pax6 in the Gene Symbol/Name box
        genebox.send_keys("pax6")
        genebox.send_keys(Keys.RETURN)
        wait.forAjax(self.driver)
        #finds the snp build number in the heading of SNP ID column
        snpidLabel = self.driver.find_element_by_id("snpSummaryTable").find_element_by_id("snp_id")
        self.assertIn("(dbSNP Build 142)", snpidLabel.text)
        #finds the GRC build number in the heading of Map Position column
        mapLabel = self.driver.find_element_by_id("snpSummaryTable").find_element_by_id("map_position")
        self.assertIn("(GRCm38)", mapLabel.text)
Ejemplo n.º 28
0
 def test_default_sort_assaytype(self):
     """
     @status: Tests the sort order for assay type using default sort
     sort order is gene first, assay type secondary
     """
     driver = self.driver
     driver.get(config.PUBLIC_URL + "/gxd")
     genebox = driver.find_element_by_name('nomenclature')
     # put your marker symbol
     genebox.send_keys("Igfbpl1")
     genebox.send_keys(Keys.RETURN)
     #find the Image tab
     imagetab = driver.find_element_by_id("imagestab")
     #click the image tab
     imagetab.click()
     wait.forAjax(driver)
     time.sleep(.5)
     assaylist = driver.find_element_by_id("imagesdata").find_elements_by_css_selector('td.yui-dt-col-assayType')
     items = assaylist[0].find_elements_by_tag_name("li")
     searchTextItems = iterate.getTextAsList(items)
     self.assertEqual(searchTextItems, ["RNA in situ", "Immunohistochemistry", "Immunohistochemistry"])
Ejemplo n.º 29
0
 def test_table_headers(self):
     """
     @status: Tests that the summaries table headers are correct
     """
     driver = self.driver
     #opens the PWI marker form
     driver.get(PWI_URL + '/#markerForm')
     
     nomenbox = driver.find_element_by_id('nomen')
     # put your marker symbol in the box
     nomenbox.send_keys("gata1")
     nomenbox.send_keys(Keys.RETURN)
     time.sleep(3)
     #finds the marker link and clicks it
     driver.find_element_by_link_text("Gata1").click()
     wait.forAjax(driver)
     driver.find_element_by_link_text("GXD Lit Index").click()
     wait.forAjax(driver)
     #Locates the summary table and finds the table headings
     headerlist = driver.find_element_by_id('indexRefsTable')
     items = headerlist.find_elements_by_tag_name("th")
     searchTextItems = iterate.getTextAsList(items)
     wait.forAjax(driver)
     #verifies all the table headings are correct and in order
     self.assertEqual(searchTextItems, ['*','Reference','Priority','Conditional'])
Ejemplo n.º 30
0
 def test_images_nospecimen(self):
     """
     @status: Tests the display for image panes with no specimen label
     each image, figure label, pane label, and assay displayed but no specimen label
     """
     driver = self.driver
     driver.get(PWI_URL)
     #opens the PWI reference form
     driver.find_element_by_link_text("Reference Form").click()
     accidbox = driver.find_element_by_id('accids')
     # put your J number in the box
     accidbox.send_keys("J:9026")
     accidbox.send_keys(Keys.RETURN)
     time.sleep(3)
     #finds the specimens link and clicks it
     driver.find_element_by_link_text("Exp Images").click()
     wait.forAjax(driver)
     #Locates the images table and finds the table headings
     imagestable = driver.find_element_by_id("paneSummaryTable")
     rows = imagestable.find_elements_by_css_selector('tr')
     #displays each row of data for the first 9 rows
     row1 = rows[1]
     row2 = rows[2]
     row3 = rows[3]
     row4 = rows[4]
     row5 = rows[5]
     row6 = rows[6]
     row7 = rows[7]
     row8 = rows[8]
     row9 = rows[9]
     #asserts that the rows of data are correct for the first 9 rows
     self.assertEqual(row1.text, 'MGI:4441359\n1 A 2ar MGI:4441369 (Spp1) Northern blot')
     self.assertEqual(row2.text, 'MGI:4441359\n1 A SPARC MGI:4441372 (Sparc) Northern blot')
     self.assertEqual(row3.text, 'MGI:4441359\n1 B 2ar MGI:4441380 (Spp1) Northern blot')
     self.assertEqual(row4.text, 'MGI:4441359\n1 B SPARC MGI:4441384 (Sparc) Northern blot')
     self.assertEqual(row5.text, 'MGI:4441361\n2 a/e 2a,e MGI:4441386 (Spp1) RNA in situ')
     self.assertEqual(row6.text, 'MGI:4441361\n2 b/f 2b,f MGI:4441386 (Spp1) RNA in situ')
     self.assertEqual(row7.text, 'MGI:4441361\n2 d/h 2d,h - decidua, 2d,h - embryo MGI:4441386 (Spp1) RNA in situ')
     self.assertEqual(row8.text, 'MGI:4441363\n3 a 3a MGI:4441386 (Spp1) RNA in situ')
     self.assertEqual(row9.text, 'MGI:4441363\n3 d/e 3d MGI:4441386 (Spp1) RNA in situ')