Commit a1653314 authored by Ivo Fokkema's avatar Ivo Fokkema

Turn off all PubMed custom link format clicks, as they cause a tooltip that...

Turn off all PubMed custom link format clicks, as they cause a tooltip that keeps getting in the way of data submission form fields.
parent fabb5162
......@@ -91,8 +91,6 @@ class AddSummaryVariantLocatedWithinGeneTest extends LOVDSeleniumWebdriverBaseTe
$GenomicDNAChange = $this->driver->findElement(WebDriverBy::name('VariantOnGenome/DNA'));
$this->assertEquals("g.2843789A>G", $GenomicDNAChange->getAttribute('value'));
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "55/18000");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="owned_by"]/option[text()="LOVD3 Admin (#00001)"]'));
......
......@@ -30,11 +30,9 @@ class AddSummaryVariantOnlyDescribedOnGenomicLevelTest extends LOVDSeleniumWebdr
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="chromosome"]/option[text()="15"]'));
$option->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/DNA"), "g.40702976G>T");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
// $this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "11/10000");
......
......@@ -55,8 +55,6 @@ class AddVariantLocatedWithinGeneToIVAIndividualTest extends LOVDSeleniumWebdriv
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Paternal (confirmed)"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "0.05");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="owned_by"]/option[text()="LOVD3 Admin (#00001)"]'));
......
......@@ -56,8 +56,6 @@ class AddVariantLocatedWithinGeneToHealthyIndividualTest extends LOVDSeleniumWeb
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Paternal (confirmed)"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "0.05");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="owned_by"]/option[text()="LOVD3 Admin (#00001)"]'));
......
......@@ -23,11 +23,9 @@ class AddVariantOnlyDescribedOnGenomicLevelToIVAIndividualTest extends LOVDSelen
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="chromosome"]/option[text()="15"]'));
$option->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/DNA"), "g.40702876G>T");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
// $this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "11/10000");
......
......@@ -20,11 +20,9 @@ class AddVariantOnlyDescribedOnGenomicLevelToHealthyIndividualTest extends LOVDS
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="chromosome"]/option[text()="15"]'));
$option->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/DNA"), "g.40702876G>T");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
// $this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "11/10000");
......
......@@ -13,8 +13,6 @@ class CreateIndividualDiagnosedWithIVATest extends LOVDSeleniumWebdriverBaseTest
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/individuals[\s\S]create$/', $this->driver->getCurrentURL()));
$this->enterValue(WebDriverBy::name("Individual/Lab_ID"), "12345IVA");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
$this->enterValue(WebDriverBy::name("Individual/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("Individual/Remarks"), "No Remarks");
$this->enterValue(WebDriverBy::name("Individual/Remarks_Non_Public"), "Still no remarks");
......
......@@ -59,8 +59,6 @@ class PostFinishAddVariantLocatedWithinTest extends LOVDSeleniumWebdriverBaseTes
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Paternal (confirmed)"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "0.05");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="owned_by"]/option[text()="LOVD3 Admin (#00001)"]'));
......
......@@ -29,11 +29,9 @@ class PostFinishAddVariantOnlyDescribedOnGenomicLevelToIVAIndividualTest extends
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="chromosome"]/option[text()="15"]'));
$option->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/DNA"), "g.40702876G>T");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
// $this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "11/10000");
......
......@@ -43,8 +43,6 @@ class AddVariantLocatedWithinGeneToIVAIndividualTest extends LOVDSeleniumWebdriv
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Paternal (confirmed)"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "0.05");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="owned_by"]/option[text()="Test Owner (#00006)"]'));
......@@ -53,7 +51,7 @@ class AddVariantLocatedWithinGeneToIVAIndividualTest extends LOVDSeleniumWebdriv
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
$this->assertEquals("Successfully created the variant entry!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
}
}
......@@ -11,11 +11,9 @@ class CreateIndividualDiagnosedWithIVATest extends LOVDSeleniumWebdriverBaseTest
$this->driver->get(ROOT_URL . "/src/submit");
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr/td[2]/b"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/individuals[\s\S]create$/', $this->driver->getCurrentURL()));
$this->enterValue(WebDriverBy::name("Individual/Lab_ID"), "12345IVA");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
$this->enterValue(WebDriverBy::name("Individual/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("Individual/Remarks"), "No Remarks");
$this->enterValue(WebDriverBy::name("Individual/Remarks_Non_Public"), "Still no remarks");
......@@ -27,7 +25,7 @@ class CreateIndividualDiagnosedWithIVATest extends LOVDSeleniumWebdriverBaseTest
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create individual information entry']"));
$element->click();
$this->assertEquals("Successfully created the individual information entry!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
}
}
......@@ -14,14 +14,14 @@ class AddVariantLocatedWithinGeneToCMTIndividualTest extends LOVDSeleniumWebdriv
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/submit\/screening\/0000000001$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr/td[2]/b"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&target=0000000001$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath(
'//b[contains(., "A variant that is located within a gene")]'));
$element->click();
$element = $this->driver->findElement(WebDriverBy::linkText("GJB1"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&reference=Transcript&geneid=GJB1&target=0000000001$/', $this->driver->getCurrentURL()));
$this->uncheck(WebDriverBy::name("ignore_00000001"));
$this->enterValue(WebDriverBy::name("00000001_VariantOnTranscript/Exon"), "2");
......@@ -55,14 +55,12 @@ class AddVariantLocatedWithinGeneToCMTIndividualTest extends LOVDSeleniumWebdriv
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Maternal (confirmed)"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "0.003");
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
$this->assertEquals("Successfully created the variant entry!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
}
}
......@@ -13,22 +13,20 @@ class AddVariantOnlyDescribedOnGenomicLevelToCMTIndividualTest extends LOVDSelen
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/submit\/screening\/0000000001$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr/td[2]/b"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&target=0000000001$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//table[2]/tbody/tr[2]/td[2]"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&reference=Genome&target=0000000001$/', $this->driver->getCurrentURL()));
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Maternal (confirmed)"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="chromosome"]/option[text()="X"]'));
$option->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/DNA"), "g.70443591G>T");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
// $this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "11/10000");
......@@ -36,8 +34,8 @@ class AddVariantOnlyDescribedOnGenomicLevelToCMTIndividualTest extends LOVDSelen
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
$this->assertEquals("Successfully created the variant entry!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
}
}
......@@ -10,19 +10,17 @@ class CreateIndividualDiagnosedWithCMTTest extends LOVDSeleniumWebdriverBaseTest
{
$element = $this->driver->findElement(WebDriverBy::id("tab_submit"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/individuals[\s\S]create$/', $this->driver->getCurrentURL()));
$this->enterValue(WebDriverBy::name("Individual/Lab_ID"), "12345CMT");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
$this->enterValue(WebDriverBy::name("Individual/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("Individual/Remarks"), "No Remarks");
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="active_diseases[]"]/option[text()="CMT (Charcot Marie Tooth Disease)"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create individual information entry']"));
$element->click();
$this->assertEquals("Successfully created the individual information entry!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
}
}
......@@ -18,25 +18,25 @@ class PostFinishAddVariantLocatedWithinGeneToCMTTest extends LOVDSeleniumWebdriv
$this->driver->getMouse()->mouseMove($tabElement->getCoordinates());
$allVariantsLink = $this->driver->findElement(WebDriverBy::partialLinkText('View all screenings'));
$allVariantsLink->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/screenings$/', $this->driver->getCurrentURL()));
// $element = $this->driver->findElement(WebDriverBy::cssSelector("#0000000002 > td.ordered"));
$element = $this->driver->findElement(WebDriverBy::xpath("//td[text()='0000000002']"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/screenings\/0000000002$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::id("viewentryOptionsButton_Screenings"));
$element->click();
$element = $this->driver->findElement(WebDriverBy::linkText("Add variant to screening"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&target=0000000002$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath(
'//b[contains(., "A variant that is located within a gene")]'));
$element->click();
$element = $this->driver->findElement(WebDriverBy::cssSelector("td.ordered"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&reference=Transcript&geneid=GJB1&target=0000000002$/', $this->driver->getCurrentURL()));
$this->uncheck(WebDriverBy::name("ignore_00000001"));
$this->enterValue(WebDriverBy::name("00000001_VariantOnTranscript/Exon"), "2");
......@@ -70,14 +70,12 @@ class PostFinishAddVariantLocatedWithinGeneToCMTTest extends LOVDSeleniumWebdriv
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Paternal (confirmed)"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "0.09");
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
$this->assertTrue((bool)preg_match('/^Successfully processed your submission and sent an email notification to the relevant curator[\s\S]*$/', $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText()));
}
}
......@@ -10,7 +10,7 @@ class PostFinishAddVariantOnlyDescribedOnGenomicLevelToCMTTest extends LOVDSelen
{
$this->logout();
$this->login('collaborator', 'test1234');
$this->driver->get(ROOT_URL . "/src/");
// Move mouse to Screenings tab and click 'view all screenings' option.
......@@ -18,7 +18,7 @@ class PostFinishAddVariantOnlyDescribedOnGenomicLevelToCMTTest extends LOVDSelen
$this->driver->getMouse()->mouseMove($tabElement->getCoordinates());
$allVariantsLink = $this->driver->findElement(WebDriverBy::partialLinkText('View all screenings'));
$allVariantsLink->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/screenings$/', $this->driver->getCurrentURL()));
// $element = $this->driver->findElement(WebDriverBy::cssSelector("#0000000002 > td.ordered"));
$element = $this->driver->findElement(WebDriverBy::xpath("//td[text()='0000000002']"));
......@@ -29,22 +29,20 @@ class PostFinishAddVariantOnlyDescribedOnGenomicLevelToCMTTest extends LOVDSelen
$element->click();
$element = $this->driver->findElement(WebDriverBy::linkText("Add variant to screening"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&target=0000000002$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//table[2]/tbody/tr[2]/td[2]/b"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&reference=Genome&target=0000000002$/', $this->driver->getCurrentURL()));
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Maternal (confirmed)"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="chromosome"]/option[text()="X"]'));
$option->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/DNA"), "g.40702876G>T");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
// $this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "11/10000");
......@@ -62,6 +60,6 @@ class PostFinishAddVariantOnlyDescribedOnGenomicLevelToCMTTest extends LOVDSelen
}
$this->assertTrue((bool)preg_match('/^Successfully processed your submission and sent an email notification to the relevant curator[\s\S]*$/', $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText()));
}
}
......@@ -10,7 +10,7 @@ class AddSummaryVariantLocatedWithinGeneTest extends LOVDSeleniumWebdriverBaseTe
{
$element = $this->driver->findElement(WebDriverBy::id("tab_submit"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/submit$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr[2]/td[2]/b"));
$element->click();
......@@ -21,7 +21,7 @@ class AddSummaryVariantLocatedWithinGeneTest extends LOVDSeleniumWebdriverBaseTe
$element->click();
$element = $this->driver->findElement(WebDriverBy::cssSelector("#GJB1 > td.ordered"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&reference=Transcript&geneid=GJB1$/', $this->driver->getCurrentURL()));
$this->uncheck(WebDriverBy::name("ignore_00000001"));
$this->enterValue(WebDriverBy::name("00000001_VariantOnTranscript/Exon"), "3");
......@@ -56,11 +56,9 @@ class AddSummaryVariantLocatedWithinGeneTest extends LOVDSeleniumWebdriverBaseTe
$option->click();
$GenomicDnaChange = $this->driver->executeScript("return window.document.getElementById('variantForm').elements[11].value");
$this->assertEquals("g.70443619G>A", $GenomicDnaChange);
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
// $this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "55/18000");
......@@ -70,8 +68,8 @@ class AddSummaryVariantLocatedWithinGeneTest extends LOVDSeleniumWebdriverBaseTe
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
$this->assertTrue((bool)preg_match('/^Successfully processed your submission and sent an email notification to the relevant curator[\s\S]*$/', $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText()));
}
}
......@@ -14,7 +14,7 @@ class AddSummaryVariantOnlyDescribedOnGenomicLevelTest extends LOVDSeleniumWebdr
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants\/0000000003$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::id("tab_submit"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/submit$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr[2]/td[2]/b"));
$element->click();
......@@ -23,18 +23,16 @@ class AddSummaryVariantOnlyDescribedOnGenomicLevelTest extends LOVDSeleniumWebdr
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr[2]/td[2]/b"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&reference=Genome$/', $this->driver->getCurrentURL()));
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Paternal (confirmed)"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="chromosome"]/option[text()="15"]'));
$option->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/DNA"), "g.40702976G>T");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
// $this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "11/10000");
......@@ -42,8 +40,8 @@ class AddSummaryVariantOnlyDescribedOnGenomicLevelTest extends LOVDSeleniumWebdr
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
$this->assertTrue((bool)preg_match('/^Successfully processed your submission and sent an email notification to the relevant curator[\s\S]*$/', $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText()));
}
}
......@@ -14,14 +14,14 @@ class AddVariantLocatedWithinGeneToCMTIndividualTest extends LOVDSeleniumWebdriv
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/submit\/screening\/0000000001$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr/td[2]/b"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&target=0000000001$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath(
'//b[contains(., "A variant that is located within a gene")]'));
$element->click();
$element = $this->driver->findElement(WebDriverBy::linkText("GJB1"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&reference=Transcript&geneid=GJB1&target=0000000001$/', $this->driver->getCurrentURL()));
$this->uncheck(WebDriverBy::name("ignore_00000001"));
$this->enterValue(WebDriverBy::name("00000001_VariantOnTranscript/Exon"), "2");
......@@ -57,11 +57,9 @@ class AddVariantLocatedWithinGeneToCMTIndividualTest extends LOVDSeleniumWebdriv
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Maternal (confirmed)"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
// $this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "0.003");
......@@ -71,8 +69,8 @@ class AddVariantLocatedWithinGeneToCMTIndividualTest extends LOVDSeleniumWebdriv
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
$this->assertEquals("Successfully created the variant entry!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
}
}
......@@ -14,22 +14,20 @@ class AddVariantOnlyDescribedOnGenomicLevelToCMTIndividualTest extends LOVDSelen
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/submit\/screening\/0000000001$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr/td[2]/b"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&target=0000000001$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//table[2]/tbody/tr[2]/td[2]"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&reference=Genome&target=0000000001$/', $this->driver->getCurrentURL()));
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Maternal (confirmed)"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="chromosome"]/option[text()="X"]'));
$option->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/DNA"), "g.70443591G>T");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
// $this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "11/10000");
......@@ -43,8 +41,8 @@ class AddVariantOnlyDescribedOnGenomicLevelToCMTIndividualTest extends LOVDSelen
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
$this->assertEquals("Successfully created the variant entry!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
}
}
......@@ -10,18 +10,16 @@ class CreateIndividualDiagnosedWithCMTTest extends LOVDSeleniumWebdriverBaseTest
{
$element = $this->driver->findElement(WebDriverBy::id("tab_submit"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/submit$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//div/table/tbody/tr/td/table/tbody/tr/td[2]/b"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/individuals[\s\S]create$/', $this->driver->getCurrentURL()));
$this->enterValue(WebDriverBy::name("Individual/Lab_ID"), "12345CMT");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
// $this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("Individual/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("Individual/Remarks"), "No Remarks");
......@@ -34,8 +32,8 @@ class CreateIndividualDiagnosedWithCMTTest extends LOVDSeleniumWebdriverBaseTest
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create individual information entry']"));
$element->click();
$this->assertEquals("Successfully created the individual information entry!", $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText());
}
}
......@@ -23,20 +23,20 @@ class PostFinishAddVariantLocatedWithinGeneToCMTIndividualTest extends LOVDSelen
// $element = $this->driver->findElement(WebDriverBy::cssSelector("#0000000002 > td.ordered"));
$element = $this->driver->findElement(WebDriverBy::xpath("//td[text()='0000000002']"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/screenings\/0000000002$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::id("viewentryOptionsButton_Screenings"));
$element->click();
$element = $this->driver->findElement(WebDriverBy::linkText("Add variant to screening"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&target=0000000002$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath(
'//b[contains(., "A variant that is located within a gene")]'));
$element->click();
$element = $this->driver->findElement(WebDriverBy::cssSelector("td.ordered"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&reference=Transcript&geneid=GJB1&target=0000000002$/', $this->driver->getCurrentURL()));
$this->uncheck(WebDriverBy::name("ignore_00000001"));
$this->enterValue(WebDriverBy::name("00000001_VariantOnTranscript/Exon"), "2");
......@@ -72,11 +72,9 @@ class PostFinishAddVariantLocatedWithinGeneToCMTIndividualTest extends LOVDSelen
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Paternal (confirmed)"]'));
$option->click();
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
// $this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "0.09");
......@@ -86,8 +84,8 @@ class PostFinishAddVariantLocatedWithinGeneToCMTIndividualTest extends LOVDSelen
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
$this->assertTrue((bool)preg_match('/^Successfully processed your submission and sent an email notification to the relevant curator[\s\S]*$/', $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText()));
}
}
......@@ -20,28 +20,26 @@ class PostFinishAddVariantOnlyDescribedOnGenomicLevelToCMTIndividualTest extends
// $element = $this->driver->findElement(WebDriverBy::cssSelector("#0000000002 > td.ordered"));
$element = $this->driver->findElement(WebDriverBy::xpath("//td[text()='0000000002']"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/screenings\/0000000002$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::id("viewentryOptionsButton_Screenings"));
$element->click();
$element = $this->driver->findElement(WebDriverBy::linkText("Add variant to screening"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&target=0000000002$/', $this->driver->getCurrentURL()));
$element = $this->driver->findElement(WebDriverBy::xpath("//table[2]/tbody/tr[2]/td[2]/b"));
$element->click();
$this->assertTrue((bool)preg_match('/^[\s\S]*\/src\/variants[\s\S]create&reference=Genome&target=0000000002$/', $this->driver->getCurrentURL()));
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="allele"]/option[text()="Maternal (confirmed)"]'));
$option->click();
$option = $this->driver->findElement(WebDriverBy::xpath('//select[@name="chromosome"]/option[text()="X"]'));
$option->click();
$this->enterValue(WebDriverBy::name("VariantOnGenome/DNA"), "g.40702876G>T");
$element = $this->driver->findElement(WebDriverBy::linkText("PubMed"));
$element->click();
// Move mouse to let browser hide tooltip of pubmed link (needed for chrome)
$this->driver->getMouse()->mouseMove(null, 200, 200);
// $this->driver->getMouse()->mouseMove(null, 200, 200);
$this->enterValue(WebDriverBy::name("VariantOnGenome/Reference"), "{PMID:Fokkema et al (2011):21520333}");
$this->enterValue(WebDriverBy::name("VariantOnGenome/Frequency"), "11/10000");
......@@ -55,8 +53,8 @@ class PostFinishAddVariantOnlyDescribedOnGenomicLevelToCMTIndividualTest extends
$option->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Create variant entry']"));
$element->click();
$this->assertTrue((bool)preg_match('/^Successfully processed your submission and sent an email notification to the relevant curator[\s\S]*$/', $this->driver->findElement(WebDriverBy::cssSelector("table[class=info]"))->getText()));
}
}
......@@ -39,7 +39,7 @@ class AddSummaryVariantLocatedWithinGeneTest extends LOVDSeleniumWebdriverBaseTe
{
$element = $this->driver->findElement(WebDriverBy::id("tab_submit"));
$element->click();