Skip to content

Commit babf275

Browse files
committed
Updated stepfiles to work with changes in feature files
1 parent 7a56f89 commit babf275

File tree

2 files changed

+18
-33
lines changed

2 files changed

+18
-33
lines changed

test/v1/tck/steps/equalitysteps.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,6 @@ module.exports = function () {
3535
}
3636
});
3737

38-
this.Given(/^`(.*)` is a copy of `(.*)` path with flipped relationship direction$/, function (key2, key1) {
39-
var value1 = this.savedValues[key1];
40-
var newSegments = []
41-
for (var i = 0; i < value1.segments.length; i++) {
42-
var segment = value1.segments[i];
43-
var n1 = segment.start;
44-
var n2 = segment.end;
45-
var oldr = segment.relationship;
46-
var r = new GraphType.Relationship(oldr.identity, oldr.end, oldr.start, oldr.type, oldr.properties);
47-
newSegments.push(new GraphType.PathSegment(n1, r, n2))
48-
}
49-
this.savedValues[key2] = new GraphType.Path(newSegments);
50-
});
51-
5238

5339
function getSingleValue(res) {
5440
var values = []

test/v1/tck/steps/resultapisteps.js

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,19 @@ var util = require("./util")
44

55
module.exports = function () {
66

7-
this.When(/^the `Result Cursor` is summarized$/, function (callback) {
7+
this.When(/^the `Statement Result` is consumed a `Result Summary` is returned$/, function (callback) {
88
self = this;
99
this.rc.then(function(res) {
1010
self.summary = res.summary;
1111
callback();
1212
}).catch(function(err) {callback(new Error("Rejected Promise: " + err))});
1313
});
1414

15-
this.Then(/^the `Result Cursor` is fully consumed$/, function () {
15+
this.Then(/^the `Statement Result` is closed$/, function () {
1616
//No result cursor in JavaScript Driver
1717
});
1818

19-
this.Then(/^a `Result Summary` is returned$/, function () {
20-
//skip this boring part
21-
});
22-
23-
this.When(/^I request a `statement` from the `Result Summary`$/, function () {
19+
this.When(/^I request a `Statement` from the `Result Summary`$/, function () {
2420
this.statement = this.summary.statement
2521
});
2622

@@ -40,10 +36,10 @@ module.exports = function () {
4036
}
4137
});
4238

43-
this.Then(/^requesting `update statistics` from it should give$/, function (table) {
39+
this.Then(/^requesting `Counters` from `Result Summary` should give$/, function (table) {
4440
var updateStatistics = this.summary.updateStatistics
4541
for ( var i = 0 ; i < table.hashes().length; i++) {
46-
var statistic = table.hashes()[i].statistic;
42+
var statistic = table.hashes()[i].counter;
4743
var expected = util.literalValueToTestValueNormalIntegers(table.hashes()[i].result);
4844
var given = getStatistic(statistic, updateStatistics)
4945
if (!util.compareValues(given, expected)) {
@@ -60,53 +56,53 @@ module.exports = function () {
6056
}
6157
});
6258

63-
this.Then(/^the summary has a `plan`$/, function () {
59+
this.Then(/^the `Result Summary` has a `Plan`$/, function () {
6460
if(! this.summary.hasPlan()) {
6561
throw Error("Expected summary to have a `plan`. It did not...");
6662
}
6763
});
6864

69-
this.Then(/^the summary does not have a `plan`$/, function () {
65+
this.Then(/^the `Result Summary` does not have a `Plan`$/, function () {
7066
if(this.summary.hasPlan()) {
7167
throw Error("Expected summary to NOT have a `plan`. It did not...");
7268
}
7369
});
7470

75-
this.Then(/^the summary has a `profile`$/, function () {
71+
this.Then(/^the `Result Summary` has a `Profile`$/, function () {
7672
if(! this.summary.hasProfile()) {
7773
throw Error("Expected summary to have a `profile plan`. It did not...");
7874
}
7975
});
8076

81-
this.Then(/^the summary does not have a `profile`$/, function () {
77+
this.Then(/^the `Result Summary` does not have a `Profile`$/, function () {
8278
if( this.summary.hasProfile()) {
8379
throw Error("Expected summary to NOT have a `profile plan`. It did...");
8480
}
8581
});
8682

87-
this.Then(/^requesting the `plan` it contains$/, function (table) {
83+
this.Then(/^requesting the `Plan` it contains$/, function (table) {
8884
checkPlanExact(table, this.summary.plan)
8985
});
9086

91-
this.Then(/^the `plan` also contains method calls for:$/, function (table) {
87+
this.Then(/^the `Plan` also contains method calls for:$/, function (table) {
9288
checkPlan(table, this.summary.plan)
9389
});
9490

95-
this.Then(/^requesting the `profile` it contains:$/, function (table) {
91+
this.Then(/^requesting the `Profile` it contains:$/, function (table) {
9692
checkPlanExact(table, this.summary.profile)
9793
});
9894

99-
this.Then(/^the `profile` also contains method calls for:$/, function (table) {
95+
this.Then(/^the `Profile` also contains method calls for:$/, function (table) {
10096
checkPlan(table, this.summary.profile)
10197
});
10298

103-
this.Then(/^the summaries `notifications` is empty list$/, function (table) {
99+
this.Then(/^the `Result Summary` `Notifications` is empty$/, function () {
104100
if (! this.summary.notifications.length == 0) {
105101
throw Error("Expected no notifications. Got: " + this.summary.notifications.length)
106102
}
107103
});
108104

109-
this.Then(/^the summaries `notifications` has one notification with$/, function (table) {
105+
this.Then(/^the `Result Summary` `Notifications` has one notification with$/, function (table) {
110106

111107
var expected = {};
112108
if (this.summary.notifications.length > 1) {
@@ -156,6 +152,9 @@ this.Then(/^the summaries `notifications` has one notification with$/, function
156152
if (key == 'db hits') {
157153
return 'dbHits'
158154
}
155+
if (key == 'records') {
156+
return 'rows'
157+
}
159158
else {
160159
return key
161160
}

0 commit comments

Comments
 (0)