Skip to content

Commit 358202a

Browse files
committed
rewritten specifications strings to match readable specs
1 parent d787ea5 commit 358202a

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

spec/DomSpec.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* Unit testing of DOM manipulation
2222
*/
2323
describe("DOM manipulation", function() {
24-
it("Parsing a DOM from a string", function() {
24+
it("Parses a DOM from a string", function() {
2525
var s = "<HTML><BODY><H1>Some title</H1><P>Hello</P></BODY></HTML>";
2626
var dd = DomNode.parseFromString(s);
2727
expect(dd).toBeDefined();
@@ -33,13 +33,13 @@ describe("DOM manipulation", function() {
3333
expect(dd.m_children[0].m_children[1].getName()).toEqual("P");
3434
});
3535

36-
it("Parsing a DOM from a document", function() {
36+
it("Parses a DOM from a document", function() {
3737
var dd = DomNode.parseFromDom(document);
3838
// Not much we can test without knowing what is in document
3939
expect(dd).toBeDefined();
4040
});
4141

42-
it("Parsing a PathExpression from a string", function() {
42+
it("Parses a PathExpression from a string", function() {
4343
var pe = new PathExpression();
4444
pe.parseFromString("#document/HTML/BODY/P[1]");
4545
expect(pe.getLength()).toEqual(4);
@@ -57,11 +57,11 @@ describe("DOM manipulation", function() {
5757
expect(segment.getPosition()).toEqual(1);
5858
});
5959

60-
it("Getting document element from PathExpression", function() {
60+
it("Gets document element from PathExpression", function() {
6161
// Hard to test, we need a page to do that
6262
});
6363

64-
it("Getting DOM element from PathExpression", function() {
64+
it("Gets DOM element from PathExpression", function() {
6565
var s = "<#document><a><b><c>1</c><c>2</c></b><d>3</d><b><c>4</c></b></a></#document>";
6666
var dd = DomNode.parseFromString(s);
6767
var path_s = "#document/a/b[1]/c[0]";
@@ -72,7 +72,7 @@ describe("DOM manipulation", function() {
7272
expect(el.m_children[0].getName()).toEqual("4");
7373
});
7474

75-
it("Getting root DOM element from PathExpression", function() {
75+
it("Gets root DOM element from PathExpression", function() {
7676
var s = "<#document><a><b><c>1</c><c>2</c></b><d>3</d><b><c>4</c></b></a></#document>";
7777
var dd = DomNode.parseFromString(s);
7878
var path_s = "#document";
@@ -83,7 +83,7 @@ describe("DOM manipulation", function() {
8383
});
8484

8585
describe("Element marking and finding", function() {
86-
it("Finding a marked element", function() {
86+
it("Finds a marked element", function() {
8787
var s = "<#document><a><b><c>1</c><c>2</c></b><d>3</d><b><c>4</c></b></a></#document>";
8888
var dd = DomNode.parseFromString(s);
8989
var el = null;
@@ -100,7 +100,7 @@ describe("DOM manipulation", function() {
100100
expect(path_to).toEqual("#document/a[0]/b[1]");
101101
});
102102

103-
it("Finding a marked element (when only one exists)", function() {
103+
it("Finds a marked element (when only one exists)", function() {
104104
var new_page = DomNode.parseFromString("<#document><html><h1>Page 1</h1><p><a>To page 2</a><a>To page 3</a></p></html></#document>");
105105
new_page.setAllMarks(1);
106106
var el = new_page.getElementFromPathString("#document/html/p/a[1]");
@@ -110,13 +110,13 @@ describe("DOM manipulation", function() {
110110
});
111111
});
112112

113-
it("Comparing identical DOMs", function() {
113+
it("Compares identical DOMs", function() {
114114
var s = "<#document><a><b><c>1</c><c>2</c></b><d>3</d><b><c>4</c></b></a></#document>";
115115
var dd = DomNode.parseFromString(s);
116116
expect(dd.equals(dd)).toEqual(true);
117117
});
118118

119-
it("Comparing different DOMs", function() {
119+
it("Compares different DOMs", function() {
120120
var dd1 = null;
121121
var dd2 = null;
122122
var s1 = "<#document><a><b><c>1</c><c>2</c></b><d>3</d><b><c>4</c></b></a></#document>";
@@ -126,7 +126,7 @@ describe("DOM manipulation", function() {
126126
expect(dd1.equals(dd2)).toEqual(false);
127127
});
128128

129-
it("Comparing a DOM to null", function() {
129+
it("Compares a DOM to null", function() {
130130
var dd1 = null;
131131
var s1 = "<#document><a><b><c>1</c><c>2</c></b><d>3</d><b><c>4</c></b></a></#document>";
132132
dd1 = DomNode.parseFromString(s1);

spec/NoBacktrackWsmSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe("NoBacktrackWsm behaviour", function() {
3131
wsm = new NoBacktrackWsm();
3232
});
3333

34-
it("Computing the reset path", function() {
34+
it("Computes the reset path", function() {
3535
var p = null, el = null, el_to_click = null;
3636
p = new DomNode(pages[1]);
3737
p.setAllMarks(WsmNode.CLICKED);

spec/VanillaWsmSpec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe("VanillaWsm behaviour", function() {
3131
expect(WsmNode.NOT_CLICKED).toBeDefined();
3232
});
3333

34-
it("Recording a transition to a new node", function() {
34+
it("Records a transition to a new node", function() {
3535
wsm.setCurrentDom(pages[1]);
3636
wsm.setCurrentDom(pages[2], "#document/html/body/p/a[0]");
3737
expect(wsm.m_nodes.length).toEqual(2);
@@ -42,7 +42,7 @@ describe("VanillaWsm behaviour", function() {
4242
expect(wsm.m_pathToFollow.isEmpty()).toEqual(true);
4343
});
4444

45-
it("Returning the next click", function() {
45+
it("Returns the next click", function() {
4646
var new_page = new DomNode(pages[1]);
4747
new_page.setAllMarks(WsmNode.CLICKED);
4848
var el = new_page.getElementFromPathString("#document/html/body[0]/p[0]/a[1]");
@@ -53,7 +53,7 @@ describe("VanillaWsm behaviour", function() {
5353
expect(next_path).toEqual("#document/html[0]/body[0]/p[0]/a[1]");
5454
});
5555

56-
it("Recognizing a dead end", function() {
56+
it("Recognizes a dead end", function() {
5757
var new_page = new DomNode(pages[1]);
5858
new_page.setAllMarks(WsmNode.CLICKED);
5959
wsm.setCurrentDom(new_page);

spec/WsmSpec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ describe("WSM manipulation", function() {
2727
pages[1] = DomNode.parseFromString("<#document><html><h1>Page 1</h1><p><a>To page 2</a><a>To page 3</a></p></html></#document>");
2828
pages[2] = DomNode.parseFromString("<#document><html><h1>Page 2</h1><a>To page 3</a><a>To page 4</a></html></#document>");
2929
wsm = new WebStateMachine();
30-
wsm.abstractNode = function(dom) { return dom; }
30+
wsm.abstractNode = function(dom) { return dom; };
3131
});
3232

33-
it("Setting the initial node", function() {
33+
it("Sets the initial node", function() {
3434
wsm.setCurrentDom(pages[1]);
3535
expect(wsm.m_nodes.length).toEqual(1);
3636
expect(wsm.m_domTree.equals(pages[1])).toEqual(true);

0 commit comments

Comments
 (0)