Skip to content

Instantly share code, notes, and snippets.

@colinfwren
Last active April 17, 2022 23:07
Show Gist options
  • Save colinfwren/73e06646b18a2afb6dbe26751fe581b3 to your computer and use it in GitHub Desktop.
Save colinfwren/73e06646b18a2afb6dbe26751fe581b3 to your computer and use it in GitHub Desktop.
Test data to add nodes and edges to Neo4J database
// Create Product
CREATE (ChocolateBox:Product {id: 'PRODUCT-1', name:'Chocolate Box'})
// Create Figma mockups
CREATE (LandingPage:Mockup {id: 'MOCKUP-1', name:'Landing Page', nodeId:'424:1224'})
CREATE (ChocolatePLP:Mockup {id: 'MOCKUP-2', name:'Chocolate PLP', nodeId:'424:1233'})
CREATE (FlowerPLP:Mockup {id: 'MOCKUP-4', name:'Flower PLP', nodeId:'424:1242'})
// Create User Stories
CREATE (ViewFlowersList:UserStory {id:'USER-STORY-1', name:'Customer Views Flowers Product List'})
CREATE (ViewChocolatesList:UserStory {id:'USER-STORY-2', name:'Customer Views Chocolates Product List'})
// Create Test Cases
CREATE (TD1:Test {id:'TEST-1', name:'User Adds Flowers to Basket'})
CREATE (TD2:Test {id:'TEST-2', name:'User Adds Chocolates to Basket'})
CREATE (TD3:Test {id:'TEST-3', name:'New User buys Chocolates'})
CREATE (TD4:Test {id:'TEST-4', name:'New User buys Flowers'})
CREATE (TD5:Test {id:'TEST-5', name:'Existing User buys Chocolates'})
CREATE (TD6:Test {id:'TEST-6', name:'Existing User buys Flowers'})
// Link User Stories to Product
CREATE (ViewFlowersList)-[:DEFINES {author: 'Colin'}]->(ChocolateBox)
CREATE (ViewChocolatesList)-[:DEFINES {author: 'Not Colin'}]->(ChocolateBox)
// Link Mockups to Story
CREATE (LandingPage)-[:VISUALISES]->(ViewFlowersList)
CREATE (LandingPage)-[:VISUALISES]->(ViewChocolatesList)
CREATE (ChocolatePLP)-[:VISUALISES]->(ViewChocolatesList)
CREATE (FlowerPLP)-[:VISUALISES]->(ViewFlowersList)
// Link Tests to user story
CREATE (TD1)-[:TESTS]->(ViewFlowersList)
CREATE (TD2)-[:TESTS]->(ViewChocolatesList)
CREATE (TD3)-[:TESTS]->(ViewChocolatesList)
CREATE (TD4)-[:TESTS]->(ViewChocolatesList)
CREATE (TD5)-[:TESTS]->(ViewChocolatesList)
CREATE (TD6)-[:TESTS]->(ViewChocolatesList)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment