add regression test read from file
This commit is contained in:
parent
ce19b61584
commit
74dbf60830
7 changed files with 3878 additions and 0 deletions
|
|
@ -239,3 +239,16 @@ md: |md
|
||||||
a -> md -> b
|
a -> md -> b
|
||||||
`, md)
|
`, md)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func loadFromFile(t *testing.T, name string) testCase {
|
||||||
|
fn := filepath.Join("testdata", "files", fmt.Sprintf("%s.d2", name))
|
||||||
|
d2Text, err := ioutil.ReadFile(fn)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("failed to load test from file:%s. %s", name, err.Error())
|
||||||
|
}
|
||||||
|
|
||||||
|
return testCase{
|
||||||
|
name: name,
|
||||||
|
script: string(d2Text),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -573,6 +573,7 @@ b
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
loadFromFile(t, "unconnected"),
|
||||||
}
|
}
|
||||||
|
|
||||||
runa(t, tcs)
|
runa(t, tcs)
|
||||||
|
|
|
||||||
35
e2etests/testdata/files/unconnected.d2
vendored
Normal file
35
e2etests/testdata/files/unconnected.d2
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
title: Workflow-I (Warehousing, Installation) {
|
||||||
|
near: top-center
|
||||||
|
shape: text
|
||||||
|
style: {
|
||||||
|
font-size: 40
|
||||||
|
bold: false
|
||||||
|
underline: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
OEM Factory
|
||||||
|
OEM Factory -> OEM Warehouse
|
||||||
|
OEM Factory -> Distributor Warehouse
|
||||||
|
OEM Factory -> Gos Warehouse
|
||||||
|
direction: right
|
||||||
|
Gos Warehouse.Master -> Gos Warehouse.Regional-1
|
||||||
|
Gos Warehouse.Master -> Gos Warehouse.Regional-2
|
||||||
|
Gos Warehouse.Master -> Gos Warehouse.Regional-N
|
||||||
|
Gos Warehouse.Regional-1 -> Gos Warehouse.Regional-2
|
||||||
|
Gos Warehouse.Regional-2 -> Gos Warehouse.Regional-N
|
||||||
|
Gos Warehouse.Regional-N -> Gos Warehouse.Regional-1
|
||||||
|
|
||||||
|
Gos Warehouse.explaination: |`md
|
||||||
|
- Asset Tagging
|
||||||
|
- Inventory
|
||||||
|
- Staging
|
||||||
|
- Dispatch to Site
|
||||||
|
`|
|
||||||
|
|
||||||
|
OEM Warehouse -> Gos Warehouse
|
||||||
|
Distributor Warehouse -> Gos Warehouse
|
||||||
|
|
||||||
|
Customer Site: {
|
||||||
|
Installation
|
||||||
|
Support
|
||||||
|
}
|
||||||
1192
e2etests/testdata/regression/unconnected/dagre/board.exp.json
generated
vendored
Normal file
1192
e2etests/testdata/regression/unconnected/dagre/board.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
778
e2etests/testdata/regression/unconnected/dagre/sketch.exp.svg
vendored
Normal file
778
e2etests/testdata/regression/unconnected/dagre/sketch.exp.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 669 KiB |
1081
e2etests/testdata/regression/unconnected/elk/board.exp.json
generated
vendored
Normal file
1081
e2etests/testdata/regression/unconnected/elk/board.exp.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
778
e2etests/testdata/regression/unconnected/elk/sketch.exp.svg
vendored
Normal file
778
e2etests/testdata/regression/unconnected/elk/sketch.exp.svg
vendored
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 670 KiB |
Loading…
Reference in a new issue