@@ -30,48 +30,46 @@ describe('LOAD CSV', () => {
3030 cy . connect ( 'neo4j' , password )
3131 } )
3232 it ( 'imports without periodic commit' , ( ) => {
33- if ( ! Cypress . config ( 'includeImportTests' ) ) {
34- return
35- }
36- cy . executeCommand ( ':clear' )
37- cy . executeCommand ( 'MATCH (n) DETACH DELETE n' )
38- cy . executeCommand ( `LOAD CSV WITH HEADERS FROM 'file:///import.csv' AS row{shift}{enter}
33+ if ( Cypress . config ( 'includeImportTests' ) ) {
34+ cy . executeCommand ( ':clear' )
35+ cy . executeCommand ( 'MATCH (n) DETACH DELETE n' )
36+ cy . executeCommand ( `LOAD CSV WITH HEADERS FROM 'file:///import.csv' AS row{shift}{enter}
3937 CREATE (p:Person {{}name: row.name, born: toInteger(row.born), city: row.city, comment:row.comment});` )
4038
41- cy . resultContains ( 'Added 3 labels, created 3 nodes, set 11 properties,' )
39+ cy . resultContains ( 'Added 3 labels, created 3 nodes, set 11 properties,' )
4240
43- cy . executeCommand (
44- 'MATCH (n:Person {{}born: 2012}) RETURN n.city, n.comment'
45- )
46- cy . resultContains ( '"Borås"' )
47- cy . resultContains ( '"I like unicorns, and "flying unicorns""' )
41+ cy . executeCommand (
42+ 'MATCH (n:Person {{}born: 2012}) RETURN n.city, n.comment'
43+ )
44+ cy . resultContains ( '"Borås"' )
45+ cy . resultContains ( '"I like unicorns, and "flying unicorns""' )
46+ }
4847 } )
4948 it ( 'imports with periodic commit' , ( ) => {
5049 if (
51- ! Cypress . config ( 'includeImportTests' ) &&
50+ Cypress . config ( 'includeImportTests' ) &&
5251 Cypress . config ( 'serverVersion' ) < 5
5352 ) {
54- return
55- }
56- const periodicQuery = `USING PERIODIC COMMIT 1{shift}{enter}
53+ const periodicQuery = `USING PERIODIC COMMIT 1{shift}{enter}
5754 LOAD CSV WITH HEADERS FROM 'file:///import.csv' AS row
5855 CREATE (p:Person {{}name: row.name, born: toInteger(row.born), city: row.city, comment:row.comment});`
5956
60- // Let's see it fail when not using auto-committed tx's first
61- cy . executeCommand ( ':clear' )
62- cy . executeCommand ( periodicQuery )
63- cy . resultContains ( 'Neo.ClientError.Statement.SemanticError' )
57+ // Let's see it fail when not using auto-committed tx's first
58+ cy . executeCommand ( ':clear' )
59+ cy . executeCommand ( periodicQuery )
60+ cy . resultContains ( 'Neo.ClientError.Statement.SemanticError' )
6461
65- cy . executeCommand ( ':clear' )
66- cy . executeCommand ( 'MATCH (n) DETACH DELETE n' )
67- cy . executeCommand ( `:auto ${ periodicQuery } ` )
62+ cy . executeCommand ( ':clear' )
63+ cy . executeCommand ( 'MATCH (n) DETACH DELETE n' )
64+ cy . executeCommand ( `:auto ${ periodicQuery } ` )
6865
69- cy . resultContains ( 'Added 3 labels, created 3 nodes, set 11 properties,' )
66+ cy . resultContains ( 'Added 3 labels, created 3 nodes, set 11 properties,' )
7067
71- cy . executeCommand (
72- 'MATCH (n:Person {{}born: 2012}) RETURN n.city, n.comment'
73- )
74- cy . resultContains ( '"Borås"' )
75- cy . resultContains ( '"I like unicorns, and "flying unicorns""' )
68+ cy . executeCommand (
69+ 'MATCH (n:Person {{}born: 2012}) RETURN n.city, n.comment'
70+ )
71+ cy . resultContains ( '"Borås"' )
72+ cy . resultContains ( '"I like unicorns, and "flying unicorns""' )
73+ }
7674 } )
7775} )
0 commit comments