mirror of https://gitee.com/bigwinds/arangodb
karma tests changed
This commit is contained in:
parent
33a208796d
commit
1ceb929483
|
@ -55,8 +55,7 @@
|
||||||
_id: "_graphs/g1",
|
_id: "_graphs/g1",
|
||||||
_key: "g1",
|
_key: "g1",
|
||||||
_rev: "123",
|
_rev: "123",
|
||||||
edgeDefinitions:
|
edgeDefinitions: [
|
||||||
[
|
|
||||||
{
|
{
|
||||||
collection: e1,
|
collection: e1,
|
||||||
from: ["f1"],
|
from: ["f1"],
|
||||||
|
@ -70,8 +69,7 @@
|
||||||
_id: "_graphs/g2",
|
_id: "_graphs/g2",
|
||||||
_key: "g2",
|
_key: "g2",
|
||||||
_rev: "321",
|
_rev: "321",
|
||||||
edgeDefinitions:
|
edgeDefinitions: [
|
||||||
[
|
|
||||||
{
|
{
|
||||||
collection: e2,
|
collection: e2,
|
||||||
from: ["f2"],
|
from: ["f2"],
|
||||||
|
@ -85,8 +83,7 @@
|
||||||
_id: "_graphs/g3",
|
_id: "_graphs/g3",
|
||||||
_key: "g3",
|
_key: "g3",
|
||||||
_rev: "111",
|
_rev: "111",
|
||||||
edgeDefinitions:
|
edgeDefinitions: [
|
||||||
[
|
|
||||||
{
|
{
|
||||||
collection: e3,
|
collection: e3,
|
||||||
from: ["f3"],
|
from: ["f3"],
|
||||||
|
@ -123,16 +120,25 @@
|
||||||
});
|
});
|
||||||
runs(function () {
|
runs(function () {
|
||||||
$("#createNewGraphName").val("newGraph");
|
$("#createNewGraphName").val("newGraph");
|
||||||
$("#s2id_newEdgeDefinitions0").val(["newEdgeCol"]);
|
$("#s2id_newEdgeDefinitions0").select2("val", ["newEdgeCol"]);
|
||||||
|
$("#s2id_fromCollections0").select2("val", ["newFrom1", "newFrom2"]);
|
||||||
|
$("#s2id_toCollections0").select2("val", ["newTo1", "newTo2"]);
|
||||||
|
$("#s2id_newVertexCollections").select2("val", ["newOrphan1", "newOrphan2"]);
|
||||||
$("#newGraphEdges").val("newEdges");
|
$("#newGraphEdges").val("newEdges");
|
||||||
spyOn($, "ajax").andCallFake(function (opts) {
|
spyOn($, "ajax").andCallFake(function (opts) {
|
||||||
expect(opts.type).toEqual("POST");
|
expect(opts.type).toEqual("POST");
|
||||||
expect(opts.url).toEqual("/_api/gharial");
|
expect(opts.url).toEqual("/_api/gharial");
|
||||||
expect(opts.data).toEqual(JSON.stringify(
|
expect(opts.data).toEqual(JSON.stringify(
|
||||||
{
|
{
|
||||||
"name":"newGraph",
|
"name": "newGraph",
|
||||||
"edgeDefinitions":[],
|
"edgeDefinitions": [
|
||||||
"orphanCollections":[]
|
{
|
||||||
|
collection: "newEdgeCol",
|
||||||
|
from: ["newFrom1", "newFrom2"],
|
||||||
|
to: ["newTo1", "newTo2"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"orphanCollections": ["newOrphan1", "newOrphan2"]
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
$("#modalButton1").click();
|
$("#modalButton1").click();
|
||||||
|
|
Loading…
Reference in New Issue