Commit 8c68b3a1 authored by Ivo Fokkema's avatar Ivo Fokkema

Merge branch 'master' into feat/LOVD+.

parents bb54dd23 4a3d3cbb
......@@ -45,6 +45,7 @@ addons:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
- mutt
before_install:
- ./tests/travis/setup/setup_chrome.sh
......
This diff is collapsed.
......@@ -3,12 +3,13 @@
*
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2016
* Modified : 2017-09-18
* For LOVD : 3.0-20
* Created : 2015-06-05
* Modified : 2019-08-29
* For LOVD : 3.0-22
*
* Copyright : 2016-2017 Leiden University Medical Center; http://www.LUMC.nl/
* Copyright : 2016-2019 Leiden University Medical Center; http://www.LUMC.nl/
* Programmers : M. Kroon <m.kroon@lumc.nl>
* Ivo F.A.C. Fokkema <I.F.A.C.Fokkema@LUMC.nl>
*
*
* This file is part of LOVD.
......@@ -45,12 +46,13 @@ class FalseInsertImportTest extends LOVDSeleniumWebdriverBaseTestCase
$element->click();
$element = $this->driver->findElement(WebDriverBy::xpath("//input[@value='Import file']"));
$element->click();
$element = $this->driver->findElement(WebDriverBy::linkText("Show 5 warnings"));
$element->click();
$bodyText = $this->driver->findElement(WebDriverBy::tagName("body"))->getText();
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Columns, line 9\): The field [\s\S]col_order[\s\S] must contain a positive integer, "abc" does not match\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Columns, line 9\): Incorrect value for field [\s\S]col_order[\s\S], which needs to be numeric, between 0 and 255\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Columns, line 9\): Incorrect value for field [\s\S]standard[\s\S], which should be 0 or 1\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Columns, line 9\): Select option #3 "yes\(\)[\s\S]* = Consanguineous parents" not understood\.[\s\S]*$/', $bodyText));
......@@ -72,9 +74,7 @@ class FalseInsertImportTest extends LOVDSeleniumWebdriverBaseTestCase
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 48\): Panel size of Individual "00000006" must be lower than the panel size of Individual "00000002"\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 49\): Individual "00000022" does not exist in the database and is not defined \(properly\) in this import file\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 49\): Individual "00000022" does not exist in the database and is not defined \(properly\) in this import file\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 50\): Individual "00000008" does not exist in the database and is not defined \(properly\) in this import file\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 50\): The [\s\S]fatherid[\s\S] can not link to itself; this field is used to indicate which individual in the database is the parent of the given individual\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 50\): Individual "00000008" does not exist in the database and is not defined \(properly\) in this import file\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 50\): The [\s\S]motherid[\s\S] can not link to itself; this field is used to indicate which individual in the database is the parent of the given individual\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 51\): The fatherid "00000002" refers to an panel \(group of individuals\), not an individual\. If you want to configure that panel as an individual, set its [\s\S]Panel size[\s\S] field to value 1\.[\s\S]*$/', $bodyText));
$this->assertTrue((bool)preg_match('/^[\s\S]*Error \(Individuals, line 51\): The motherid "00000002" refers to an panel \(group of individuals\), not an individual\. If you want to configure that panel as an individual, set its [\s\S]Panel size[\s\S] field to value 1\.[\s\S]*$/', $bodyText));
......
......@@ -39,7 +39,7 @@
"00000001" "" "" "00000022" "1" "00001" "9" "00001" "2015-06-03 11:30:26" "00001" "2015-06-03 11:30:26" "12345IVA" "{PMID:Fokkema et al (2011):21520333}" "No Remarks" "Still no remarks" ""
"00000002" "" "" "00000002" "11" "00001" "9" "00001" "2015-06-03 11:30:33" "" "" "12345IVA" "{PMID:Fokkema et al (2011):21520333}" "No Remarks" "Still no remarks" ""
"00000003" "00000003" "00000022" "00000001" "1" "00001" "9" "00001" "2015-06-03 11:30:41" "" "" "12345IVA" "{PMID:Fokkema et al (2011):21520333}" "No Remarks" "Still no remarks" "F"
"00000004" "" "00000002" "" "1" "00001" "9" "00001" "2015-06-03 11:30:48" "" "" "12345IVA" "{PMID:Fokkema et al (2011):21520333}" "No Remarks" "Still no remarks" "M"
"00000004" "00000003" "00000002" "" "1" "00001" "9" "00001" "2015-06-03 11:30:48" "" "" "12345IVA" "{PMID:Fokkema et al (2011):21520333}" "No Remarks" "Still no remarks" "M"
"00000005" "" "" "00000002" "1" "00001" "9" "00001" "2015-06-03 11:30:41" "" "" "12345IVA" "{PMID:Fokkema et al (2011):21520333}" "No Remarks" "Still no remarks" "F"
## Individuals_To_Diseases ## Do not remove or alter this header ##
......
......@@ -4,12 +4,19 @@
GLOB="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Loop through screenshot files (oldest to newest).
for file in `ls -1 -t -r ${GLOB}/test_results/error_screenshots/*.png`; do
for file in `ls -1 -t -r ${GLOB}/test_results/error_screenshots/ | grep -F .png`; do
echo "Uploading file: ${file}";
# Upload to transfer.sh, this command will output the URL on which the
# uploaded file can be reached.
curl --upload-file "${file}" https://transfer.sh
RETURN=`curl -s -H "Max-Days: 2" --upload-file "${GLOB}/test_results/error_screenshots/${file}" https://transfer.sh`;
echo $RETURN;
if [[ $RETURN == "Could not save metadata" ]];
then
# Transfer.sh service often fails.
echo "Transfer.sh failed, emailing file...";
mutt -s "Travis failure" -a "${GLOB}/test_results/error_screenshots/${file}" -- I.F.A.C.Fokkema@LUMC.nl < <(echo "Travis run failed. Screenshot attached.")
fi
rm -f "${file}"
rm -f "${GLOB}/test_results/error_screenshots/${file}"
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment