Skip to content

chore(deps-dev): bump cucumber to v3.2.1 #1073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Apr 2, 2020
7 changes: 4 additions & 3 deletions features/acm/step_definitions/acm.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
var { ACM } = require("../../../clients/client-acm");
var { defineSupportCode } = require("cucumber");

module.exports = function() {
this.Before({ tags: ["@acm"] }, function(scenario, callback) {
defineSupportCode(function({ Before, Given, Then, When }) {
Before({ tags: "@acm" }, function(scenario, callback) {
this.service = new ACM({});
callback();
});

// Add step definitions
};
});
7 changes: 4 additions & 3 deletions features/apigateway/step_definitions/apigateway.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
var { APIGateway } = require("../../../clients/client-api-gateway");
var { defineSupportCode } = require("cucumber");

module.exports = function() {
this.Before({ tags: ["@apigateway"] }, function(scenario, callback) {
defineSupportCode(function({ Before, Given, Then, When }) {
Before({ tags: "@apigateway" }, function(scenario, callback) {
this.service = new APIGateway({});
callback();
});

// Add step definitions
};
});
35 changes: 18 additions & 17 deletions features/autoscaling/step_definitions/autoscaling.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
var { AutoScaling } = require("../../../clients/client-auto-scaling");
var { defineSupportCode } = require("cucumber");

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

this.Given(/^I create a launch configuration with name "([^"]*)"$/, function(
Given(/^I create a launch configuration with name "([^"]*)"$/, function(
name,
callback
) {
Expand All @@ -18,27 +19,27 @@ module.exports = function() {
this.request(null, "createLaunchConfiguration", params, callback, false);
});

this.Given(/^I describe launch configurations$/, function(callback) {
Given(/^I describe launch configurations$/, function(callback) {
this.request(null, "describeLaunchConfigurations", {}, callback);
});

this.Then(
/^the list should contain the launch configuration "([^"]*)"$/,
function(name, callback) {
this.assert.contains(this.data.LaunchConfigurations, function(
configuration
) {
return configuration.LaunchConfigurationName === name;
});
callback();
}
);
Then(/^the list should contain the launch configuration "([^"]*)"$/, function(
name,
callback
) {
this.assert.contains(this.data.LaunchConfigurations, function(
configuration
) {
return configuration.LaunchConfigurationName === name;
});
callback();
});

this.Then(/^I delete the launch configuration "([^"]*)"$/, function(
Then(/^I delete the launch configuration "([^"]*)"$/, function(
name,
callback
) {
var params = { LaunchConfigurationName: name };
this.request(null, "deleteLaunchConfiguration", params, callback);
});
};
});
9 changes: 5 additions & 4 deletions features/cloudformation/step_definitions/cloudformation.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
var { CloudFormation } = require("../../../clients/client-cloudformation");
var { defineSupportCode } = require("cucumber");

module.exports = function() {
this.Before({ tags: ["@cloudformation"] }, function(scenario, callback) {
defineSupportCode(function({ Before, Given, Then, When }) {
Before({ tags: "@cloudformation" }, function(scenario, callback) {
this.service = new CloudFormation({});
callback();
});

this.Given(
Given(
/^I create a CloudFormation stack with name prefix "([^"]*)"$/,
function(prefix, callback) {
this.stackName = this.uniqueName(prefix);
Expand All @@ -18,4 +19,4 @@ module.exports = function() {
this.request(null, "createStack", params, callback, false);
}
);
};
});
11 changes: 6 additions & 5 deletions features/cloudfront/step_definitions/cloudfront.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var { CloudFront } = require("../../../clients/client-cloudfront");
var { defineSupportCode } = require("cucumber");

module.exports = function() {
defineSupportCode(function({ Before, Given, Then, When }) {
var createParams = {
CallerReference: "",
Aliases: {
Expand Down Expand Up @@ -52,13 +53,13 @@ module.exports = function() {
Enabled: false
};

this.Before({ tags: ["@cloudfront"] }, function(scenario, callback) {
Before({ tags: "@cloudfront" }, function(scenario, callback) {
this.service = new CloudFront({});
this.cfCreateParams = createParams;
callback();
});

this.Given(
Given(
/^I create a CloudFront distribution with name prefix "([^"]*)"$/,
function(prefix, callback) {
this.cfName = this.uniqueName(prefix);
Expand All @@ -75,7 +76,7 @@ module.exports = function() {
}
);

this.Given(/^I list CloudFront distributions$/, function(callback) {
Given(/^I list CloudFront distributions$/, function(callback) {
this.request(null, "listDistributions", {}, callback);
});
};
});
9 changes: 5 additions & 4 deletions features/cloudsearch/step_definitions/cloudsearch.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
var { CloudSearch } = require("../../../clients/client-cloudsearch");
var { defineSupportCode } = require("cucumber");

module.exports = function() {
this.Before({ tags: ["@cloudsearch"] }, function(scenario, callback) {
defineSupportCode(function({ Before, Given, Then, When }) {
Before({ tags: "@cloudsearch" }, function(scenario, callback) {
this.service = new CloudSearch({});
callback();
});

this.Given(/^I create a domain with name prefix "([^"]*)"$/, function(
Given(/^I create a domain with name prefix "([^"]*)"$/, function(
prefix,
callback
) {
Expand All @@ -19,4 +20,4 @@ module.exports = function() {
false
);
});
};
});
11 changes: 6 additions & 5 deletions features/cloudtrail/step_definitions/cloudtrail.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
var { CloudTrail } = require("../../../clients/client-cloudtrail");
var { defineSupportCode } = require("cucumber");

module.exports = function() {
this.Before({ tags: ["@cloudtrail"] }, function(scenario, callback) {
defineSupportCode(function({ Before, Given, Then, When }) {
Before({ tags: "@cloudtrail" }, function(scenario, callback) {
this.service = new CloudTrail({});
callback();
});

this.Given(/^I describe trails$/, function(callback) {
Given(/^I describe trails$/, function(callback) {
this.request(null, "describeTrails", {}, callback);
});

this.Given(/^I create a trail with an invalid name$/, function(callback) {
Given(/^I create a trail with an invalid name$/, function(callback) {
this.request(
null,
"createTrail",
Expand All @@ -19,4 +20,4 @@ module.exports = function() {
false
);
});
};
});
68 changes: 34 additions & 34 deletions features/cloudwatch/step_definitions/cloudwatch.js
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
var { CloudWatch } = require("../../../clients/client-cloudwatch");
var { defineSupportCode } = require("cucumber");

module.exports = function() {
this.Before({ tags: ["@cloudwatch"] }, function(scenario, callback) {
defineSupportCode(function({ Before, Given, Then, When }) {
Before({ tags: "@cloudwatch" }, function(scenario, callback) {
this.service = new CloudWatch({});
callback();
});

this.Given(
/^I create a CloudWatch alarm with (prefix|name) "([^"]*)"$/,
function(prefix, name, callback) {
var timestamp = new Date().getTime();
this.cloudWatchAlarm = {
AlarmName: name,
MetricName: "aws-sdk-js-metric-" + timestamp,
Namespace: "aws-sdk-js-namespace" + timestamp,
ComparisonOperator: "GreaterThanThreshold",
EvaluationPeriods: 5,
Period: 60,
Statistic: "Average",
Threshold: 50.0
};

if (prefix === "prefix") {
this.cloudWatchAlarm.AlarmName += "-" + timestamp;
}
Given(/^I create a CloudWatch alarm with (prefix|name) "([^"]*)"$/, function(
prefix,
name,
callback
) {
var timestamp = new Date().getTime();
this.cloudWatchAlarm = {
AlarmName: name,
MetricName: "aws-sdk-js-metric-" + timestamp,
Namespace: "aws-sdk-js-namespace" + timestamp,
ComparisonOperator: "GreaterThanThreshold",
EvaluationPeriods: 5,
Period: 60,
Statistic: "Average",
Threshold: 50.0
};

this.request(
null,
"putMetricAlarm",
this.cloudWatchAlarm,
callback,
prefix === "name" ? false : undefined
);
if (prefix === "prefix") {
this.cloudWatchAlarm.AlarmName += "-" + timestamp;
}
);

this.Given(/^I list the CloudWatch alarms$/, function(callback) {
this.request(
null,
"putMetricAlarm",
this.cloudWatchAlarm,
callback,
prefix === "name" ? false : undefined
);
});

Given(/^I list the CloudWatch alarms$/, function(callback) {
var params = {
MetricName: this.cloudWatchAlarm.MetricName,
Namespace: this.cloudWatchAlarm.Namespace
};
this.request(null, "describeAlarmsForMetric", params, callback);
});

this.Then(/^the list should contain the CloudWatch alarm$/, function(
callback
) {
Then(/^the list should contain the CloudWatch alarm$/, function(callback) {
var name = this.cloudWatchAlarm.AlarmName;
this.assert.contains(this.data.MetricAlarms, function(alarm) {
return alarm.AlarmName === name;
});
callback();
});

this.Then(/^I delete the CloudWatch alarm$/, function(callback) {
Then(/^I delete the CloudWatch alarm$/, function(callback) {
this.request(
null,
"deleteAlarms",
{ AlarmNames: [this.cloudWatchAlarm.AlarmName] },
callback
);
});
};
});
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
var { CloudWatchEvents } = require("../../../clients/client-cloudwatch-events");
var { defineSupportCode } = require("cucumber");

module.exports = function() {
this.Before({ tags: ["@cloudwatchevents"] }, function(scenario, callback) {
defineSupportCode(function({ Before, Given, Then, When }) {
Before({ tags: "@cloudwatchevents" }, function(scenario, callback) {
this.service = new CloudWatchEvents({});
callback();
});

// Add step definitions
};
});
17 changes: 8 additions & 9 deletions features/cloudwatchlogs/step_definitions/cloudwatchlogs.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
var { CloudWatchLogs } = require("../../../clients/client-cloudwatch-logs");
var { defineSupportCode } = require("cucumber");

module.exports = function() {
this.Before({ tags: ["@cloudwatchlogs"] }, function(scenario, callback) {
defineSupportCode(function({ Before, Given, Then, When }) {
Before({ tags: "@cloudwatchlogs" }, function(scenario, callback) {
this.service = new CloudWatchLogs({});
callback();
});

this.Given(/^I create a CloudWatch logGroup with prefix "([^"]*)"$/, function(
Given(/^I create a CloudWatch logGroup with prefix "([^"]*)"$/, function(
prefix,
callback
) {
Expand All @@ -21,26 +22,24 @@ module.exports = function() {
);
});

this.Given(/^I list the CloudWatch logGroups$/, function(callback) {
Given(/^I list the CloudWatch logGroups$/, function(callback) {
this.request(null, "describeLogGroups", {}, callback);
});

this.Then(/^the list should contain the CloudWatch logGroup$/, function(
callback
) {
Then(/^the list should contain the CloudWatch logGroup$/, function(callback) {
var name = this.logGroupName;
this.assert.contains(this.data.logGroups, function(alarm) {
return alarm.logGroupName === name;
});
callback();
});

this.Then(/^I delete the CloudWatch logGroup$/, function(callback) {
Then(/^I delete the CloudWatch logGroup$/, function(callback) {
this.request(
null,
"deleteLogGroup",
{ logGroupName: this.logGroupName },
callback
);
});
};
});
7 changes: 4 additions & 3 deletions features/codecommit/step_definitions/codecommit.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
var { CodeCommit } = require("../../../clients/client-codecommit");
var { defineSupportCode } = require("cucumber");

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

// Add step definitions
};
});
7 changes: 4 additions & 3 deletions features/codedeploy/step_definitions/codedeploy.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
var { CodeDeploy } = require("../../../clients/client-codedeploy");
var { defineSupportCode } = require("cucumber");

module.exports = function() {
this.Before({ tags: ["@codedeploy"] }, function(scenario, callback) {
defineSupportCode(function({ Before, Given, Then, When }) {
Before({ tags: "@codedeploy" }, function(scenario, callback) {
this.service = new CodeDeploy({});
callback();
});

// Add step definitions
};
});
Loading