Skip to content

Commit 5120751

Browse files
authored
chore(deps-dev): bump cucumber to v3.2.1 (#1073)
1 parent 96ec3d0 commit 5120751

File tree

70 files changed

+978
-944
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+978
-944
lines changed

features/acm/step_definitions/acm.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
var { ACM } = require("../../../clients/client-acm");
2+
var { defineSupportCode } = require("cucumber");
23

3-
module.exports = function() {
4-
this.Before({ tags: ["@acm"] }, function(scenario, callback) {
4+
defineSupportCode(function({ Before, Given, Then, When }) {
5+
Before({ tags: "@acm" }, function(scenario, callback) {
56
this.service = new ACM({});
67
callback();
78
});
89

910
// Add step definitions
10-
};
11+
});
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
var { APIGateway } = require("../../../clients/client-api-gateway");
2+
var { defineSupportCode } = require("cucumber");
23

3-
module.exports = function() {
4-
this.Before({ tags: ["@apigateway"] }, function(scenario, callback) {
4+
defineSupportCode(function({ Before, Given, Then, When }) {
5+
Before({ tags: "@apigateway" }, function(scenario, callback) {
56
this.service = new APIGateway({});
67
callback();
78
});
89

910
// Add step definitions
10-
};
11+
});
Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
var { AutoScaling } = require("../../../clients/client-auto-scaling");
2+
var { defineSupportCode } = require("cucumber");
23

3-
module.exports = function() {
4-
this.Before({ tags: ["@autoscaling"] }, function(scenario, callback) {
4+
defineSupportCode(function({ Before, Given, Then, When }) {
5+
Before({ tags: "@autoscaling" }, function(scenario, callback) {
56
this.service = new AutoScaling({ region: "us-east-1" });
67
callback();
78
});
89

9-
this.Given(/^I create a launch configuration with name "([^"]*)"$/, function(
10+
Given(/^I create a launch configuration with name "([^"]*)"$/, function(
1011
name,
1112
callback
1213
) {
@@ -18,27 +19,27 @@ module.exports = function() {
1819
this.request(null, "createLaunchConfiguration", params, callback, false);
1920
});
2021

21-
this.Given(/^I describe launch configurations$/, function(callback) {
22+
Given(/^I describe launch configurations$/, function(callback) {
2223
this.request(null, "describeLaunchConfigurations", {}, callback);
2324
});
2425

25-
this.Then(
26-
/^the list should contain the launch configuration "([^"]*)"$/,
27-
function(name, callback) {
28-
this.assert.contains(this.data.LaunchConfigurations, function(
29-
configuration
30-
) {
31-
return configuration.LaunchConfigurationName === name;
32-
});
33-
callback();
34-
}
35-
);
26+
Then(/^the list should contain the launch configuration "([^"]*)"$/, function(
27+
name,
28+
callback
29+
) {
30+
this.assert.contains(this.data.LaunchConfigurations, function(
31+
configuration
32+
) {
33+
return configuration.LaunchConfigurationName === name;
34+
});
35+
callback();
36+
});
3637

37-
this.Then(/^I delete the launch configuration "([^"]*)"$/, function(
38+
Then(/^I delete the launch configuration "([^"]*)"$/, function(
3839
name,
3940
callback
4041
) {
4142
var params = { LaunchConfigurationName: name };
4243
this.request(null, "deleteLaunchConfiguration", params, callback);
4344
});
44-
};
45+
});
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
var { CloudFormation } = require("../../../clients/client-cloudformation");
2+
var { defineSupportCode } = require("cucumber");
23

3-
module.exports = function() {
4-
this.Before({ tags: ["@cloudformation"] }, function(scenario, callback) {
4+
defineSupportCode(function({ Before, Given, Then, When }) {
5+
Before({ tags: "@cloudformation" }, function(scenario, callback) {
56
this.service = new CloudFormation({});
67
callback();
78
});
89

9-
this.Given(
10+
Given(
1011
/^I create a CloudFormation stack with name prefix "([^"]*)"$/,
1112
function(prefix, callback) {
1213
this.stackName = this.uniqueName(prefix);
@@ -18,4 +19,4 @@ module.exports = function() {
1819
this.request(null, "createStack", params, callback, false);
1920
}
2021
);
21-
};
22+
});

features/cloudfront/step_definitions/cloudfront.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
var { CloudFront } = require("../../../clients/client-cloudfront");
2+
var { defineSupportCode } = require("cucumber");
23

3-
module.exports = function() {
4+
defineSupportCode(function({ Before, Given, Then, When }) {
45
var createParams = {
56
CallerReference: "",
67
Aliases: {
@@ -52,13 +53,13 @@ module.exports = function() {
5253
Enabled: false
5354
};
5455

55-
this.Before({ tags: ["@cloudfront"] }, function(scenario, callback) {
56+
Before({ tags: "@cloudfront" }, function(scenario, callback) {
5657
this.service = new CloudFront({});
5758
this.cfCreateParams = createParams;
5859
callback();
5960
});
6061

61-
this.Given(
62+
Given(
6263
/^I create a CloudFront distribution with name prefix "([^"]*)"$/,
6364
function(prefix, callback) {
6465
this.cfName = this.uniqueName(prefix);
@@ -75,7 +76,7 @@ module.exports = function() {
7576
}
7677
);
7778

78-
this.Given(/^I list CloudFront distributions$/, function(callback) {
79+
Given(/^I list CloudFront distributions$/, function(callback) {
7980
this.request(null, "listDistributions", {}, callback);
8081
});
81-
};
82+
});

features/cloudsearch/step_definitions/cloudsearch.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
var { CloudSearch } = require("../../../clients/client-cloudsearch");
2+
var { defineSupportCode } = require("cucumber");
23

3-
module.exports = function() {
4-
this.Before({ tags: ["@cloudsearch"] }, function(scenario, callback) {
4+
defineSupportCode(function({ Before, Given, Then, When }) {
5+
Before({ tags: "@cloudsearch" }, function(scenario, callback) {
56
this.service = new CloudSearch({});
67
callback();
78
});
89

9-
this.Given(/^I create a domain with name prefix "([^"]*)"$/, function(
10+
Given(/^I create a domain with name prefix "([^"]*)"$/, function(
1011
prefix,
1112
callback
1213
) {
@@ -19,4 +20,4 @@ module.exports = function() {
1920
false
2021
);
2122
});
22-
};
23+
});
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
var { CloudTrail } = require("../../../clients/client-cloudtrail");
2+
var { defineSupportCode } = require("cucumber");
23

3-
module.exports = function() {
4-
this.Before({ tags: ["@cloudtrail"] }, function(scenario, callback) {
4+
defineSupportCode(function({ Before, Given, Then, When }) {
5+
Before({ tags: "@cloudtrail" }, function(scenario, callback) {
56
this.service = new CloudTrail({});
67
callback();
78
});
89

9-
this.Given(/^I describe trails$/, function(callback) {
10+
Given(/^I describe trails$/, function(callback) {
1011
this.request(null, "describeTrails", {}, callback);
1112
});
1213

13-
this.Given(/^I create a trail with an invalid name$/, function(callback) {
14+
Given(/^I create a trail with an invalid name$/, function(callback) {
1415
this.request(
1516
null,
1617
"createTrail",
@@ -19,4 +20,4 @@ module.exports = function() {
1920
false
2021
);
2122
});
22-
};
23+
});
Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,64 @@
11
var { CloudWatch } = require("../../../clients/client-cloudwatch");
2+
var { defineSupportCode } = require("cucumber");
23

3-
module.exports = function() {
4-
this.Before({ tags: ["@cloudwatch"] }, function(scenario, callback) {
4+
defineSupportCode(function({ Before, Given, Then, When }) {
5+
Before({ tags: "@cloudwatch" }, function(scenario, callback) {
56
this.service = new CloudWatch({});
67
callback();
78
});
89

9-
this.Given(
10-
/^I create a CloudWatch alarm with (prefix|name) "([^"]*)"$/,
11-
function(prefix, name, callback) {
12-
var timestamp = new Date().getTime();
13-
this.cloudWatchAlarm = {
14-
AlarmName: name,
15-
MetricName: "aws-sdk-js-metric-" + timestamp,
16-
Namespace: "aws-sdk-js-namespace" + timestamp,
17-
ComparisonOperator: "GreaterThanThreshold",
18-
EvaluationPeriods: 5,
19-
Period: 60,
20-
Statistic: "Average",
21-
Threshold: 50.0
22-
};
23-
24-
if (prefix === "prefix") {
25-
this.cloudWatchAlarm.AlarmName += "-" + timestamp;
26-
}
10+
Given(/^I create a CloudWatch alarm with (prefix|name) "([^"]*)"$/, function(
11+
prefix,
12+
name,
13+
callback
14+
) {
15+
var timestamp = new Date().getTime();
16+
this.cloudWatchAlarm = {
17+
AlarmName: name,
18+
MetricName: "aws-sdk-js-metric-" + timestamp,
19+
Namespace: "aws-sdk-js-namespace" + timestamp,
20+
ComparisonOperator: "GreaterThanThreshold",
21+
EvaluationPeriods: 5,
22+
Period: 60,
23+
Statistic: "Average",
24+
Threshold: 50.0
25+
};
2726

28-
this.request(
29-
null,
30-
"putMetricAlarm",
31-
this.cloudWatchAlarm,
32-
callback,
33-
prefix === "name" ? false : undefined
34-
);
27+
if (prefix === "prefix") {
28+
this.cloudWatchAlarm.AlarmName += "-" + timestamp;
3529
}
36-
);
3730

38-
this.Given(/^I list the CloudWatch alarms$/, function(callback) {
31+
this.request(
32+
null,
33+
"putMetricAlarm",
34+
this.cloudWatchAlarm,
35+
callback,
36+
prefix === "name" ? false : undefined
37+
);
38+
});
39+
40+
Given(/^I list the CloudWatch alarms$/, function(callback) {
3941
var params = {
4042
MetricName: this.cloudWatchAlarm.MetricName,
4143
Namespace: this.cloudWatchAlarm.Namespace
4244
};
4345
this.request(null, "describeAlarmsForMetric", params, callback);
4446
});
4547

46-
this.Then(/^the list should contain the CloudWatch alarm$/, function(
47-
callback
48-
) {
48+
Then(/^the list should contain the CloudWatch alarm$/, function(callback) {
4949
var name = this.cloudWatchAlarm.AlarmName;
5050
this.assert.contains(this.data.MetricAlarms, function(alarm) {
5151
return alarm.AlarmName === name;
5252
});
5353
callback();
5454
});
5555

56-
this.Then(/^I delete the CloudWatch alarm$/, function(callback) {
56+
Then(/^I delete the CloudWatch alarm$/, function(callback) {
5757
this.request(
5858
null,
5959
"deleteAlarms",
6060
{ AlarmNames: [this.cloudWatchAlarm.AlarmName] },
6161
callback
6262
);
6363
});
64-
};
64+
});
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
var { CloudWatchEvents } = require("../../../clients/client-cloudwatch-events");
2+
var { defineSupportCode } = require("cucumber");
23

3-
module.exports = function() {
4-
this.Before({ tags: ["@cloudwatchevents"] }, function(scenario, callback) {
4+
defineSupportCode(function({ Before, Given, Then, When }) {
5+
Before({ tags: "@cloudwatchevents" }, function(scenario, callback) {
56
this.service = new CloudWatchEvents({});
67
callback();
78
});
89

910
// Add step definitions
10-
};
11+
});
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
var { CloudWatchLogs } = require("../../../clients/client-cloudwatch-logs");
2+
var { defineSupportCode } = require("cucumber");
23

3-
module.exports = function() {
4-
this.Before({ tags: ["@cloudwatchlogs"] }, function(scenario, callback) {
4+
defineSupportCode(function({ Before, Given, Then, When }) {
5+
Before({ tags: "@cloudwatchlogs" }, function(scenario, callback) {
56
this.service = new CloudWatchLogs({});
67
callback();
78
});
89

9-
this.Given(/^I create a CloudWatch logGroup with prefix "([^"]*)"$/, function(
10+
Given(/^I create a CloudWatch logGroup with prefix "([^"]*)"$/, function(
1011
prefix,
1112
callback
1213
) {
@@ -21,26 +22,24 @@ module.exports = function() {
2122
);
2223
});
2324

24-
this.Given(/^I list the CloudWatch logGroups$/, function(callback) {
25+
Given(/^I list the CloudWatch logGroups$/, function(callback) {
2526
this.request(null, "describeLogGroups", {}, callback);
2627
});
2728

28-
this.Then(/^the list should contain the CloudWatch logGroup$/, function(
29-
callback
30-
) {
29+
Then(/^the list should contain the CloudWatch logGroup$/, function(callback) {
3130
var name = this.logGroupName;
3231
this.assert.contains(this.data.logGroups, function(alarm) {
3332
return alarm.logGroupName === name;
3433
});
3534
callback();
3635
});
3736

38-
this.Then(/^I delete the CloudWatch logGroup$/, function(callback) {
37+
Then(/^I delete the CloudWatch logGroup$/, function(callback) {
3938
this.request(
4039
null,
4140
"deleteLogGroup",
4241
{ logGroupName: this.logGroupName },
4342
callback
4443
);
4544
});
46-
};
45+
});
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
var { CodeCommit } = require("../../../clients/client-codecommit");
2+
var { defineSupportCode } = require("cucumber");
23

3-
module.exports = function() {
4-
this.Before({ tags: ["@codecommit"] }, function(scenario, callback) {
4+
defineSupportCode(function({ Before, Given, Then, When }) {
5+
Before({ tags: "@codecommit" }, function(scenario, callback) {
56
this.service = new CodeCommit({ region: "us-east-1" });
67
callback();
78
});
89

910
// Add step definitions
10-
};
11+
});
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
var { CodeDeploy } = require("../../../clients/client-codedeploy");
2+
var { defineSupportCode } = require("cucumber");
23

3-
module.exports = function() {
4-
this.Before({ tags: ["@codedeploy"] }, function(scenario, callback) {
4+
defineSupportCode(function({ Before, Given, Then, When }) {
5+
Before({ tags: "@codedeploy" }, function(scenario, callback) {
56
this.service = new CodeDeploy({});
67
callback();
78
});
89

910
// Add step definitions
10-
};
11+
});

0 commit comments

Comments
 (0)