This repository has been archived by the owner on Apr 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
variables_test.js
102 lines (86 loc) · 3.14 KB
/
variables_test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*global describe it before bar */
"use client";
require(["lib/architect/architect", "lib/chai/chai", "/vfs-root"],
function (architect, chai, baseProc) {
var expect = chai.expect;
expect.setupArchitectTest([
{
packagePath: "plugins/c9.core/c9",
startdate: new Date(),
debug: true,
hosted: true,
davPrefix: "/",
local: false,
projectName: "Test Project"
},
"plugins/c9.core/ext",
"plugins/c9.core/http-xhr",
"plugins/c9.core/util",
"plugins/c9.core/settings",
{
packagePath: "plugins/c9.ide.ui/ui",
staticPrefix: "plugins/c9.ide.ui"
},
"plugins/c9.ide.ui/lib_apf",
{
packagePath: "plugins/c9.fs/fs",
baseProc: baseProc
},
"plugins/c9.vfs.client/vfs_client",
"plugins/c9.vfs.client/endpoint",
"plugins/c9.ide.auth/auth",
"plugins/c9.core/api",
"plugins/c9.ide.run.debug/variables",
"plugins/c9.ide.run.debug/debugpanel",
"plugins/c9.ide.run.debug/callstack",
{
consumes: ["variables"],
provides: [],
setup: main
}
], architect);
function main(options, imports, register) {
var variables = imports.variables;
var datagrid;
function countEvents(count, expected, done) {
if (count == expected)
done();
else
throw new Error("Wrong Event Count: "
+ count + " of " + expected);
}
describe('breakpoints', function() {
before(function(done) {
var datagrid = variables.getElement("datagrid");
bar.$ext.style.background = "rgba(220, 220, 220, 0.93)";
bar.$ext.style.position = "fixed";
bar.$ext.style.top = "75px";
bar.$ext.style.right = "20px";
bar.$ext.style.left = "";
bar.$ext.style.bottom = "20px";
bar.$ext.style.width = "300px";
bar.$ext.style.height = "";
variables.show({
html: bar.$ext
});
done();
});
it('should add a frame', function(done) {
breakpoints.addFrame({
});
expect.html(datagrid, "Missing caption").text("/file.txt");
expect.html(datagrid, "Missing content").text("This is the content");
expect.html(datagrid.getFirstTraverseNode(), "Checked").className("checked");
done();
});
describe("unload()", function() {
it('should destroy all ui elements when it is unloaded', function(done) {
variables.unload();
expect(datagrid.$amlDestroyed).to.equal(true);
done();
});
});
});
register();
}
});