Skip to content

chore(deps-dev): bump cucumber to v5.1.0 #1074

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 7 commits into from
Apr 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions features/acm/step_definitions/acm.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
var { ACM } = require("../../../clients/client-acm");
var { defineSupportCode } = require("cucumber");
const { ACM } = require("../../../clients/client-acm");
const { Before } = require("cucumber");

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

// Add step definitions
Before({ tags: "@acm" }, function(scenario, callback) {
this.service = new ACM({});
callback();
});
14 changes: 5 additions & 9 deletions features/apigateway/step_definitions/apigateway.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
var { APIGateway } = require("../../../clients/client-api-gateway");
var { defineSupportCode } = require("cucumber");
const { APIGateway } = require("../../../clients/client-api-gateway");
const { Before } = require("cucumber");

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

// Add step definitions
Before({ tags: "@apigateway" }, function(scenario, callback) {
this.service = new APIGateway({});
callback();
});
69 changes: 31 additions & 38 deletions features/autoscaling/step_definitions/autoscaling.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,38 @@
var { AutoScaling } = require("../../../clients/client-auto-scaling");
var { defineSupportCode } = require("cucumber");
const { AutoScaling } = require("../../../clients/client-auto-scaling");
const { Before, Given, Then } = require("cucumber");

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

Given(/^I create a launch configuration with name "([^"]*)"$/, function(
name,
callback
) {
var params = {
ImageId: "ami-1624987f",
InstanceType: "m1.small",
LaunchConfigurationName: name
};
this.request(null, "createLaunchConfiguration", params, callback, false);
});
Given(/^I create a launch configuration with name "([^"]*)"$/, function(
name,
callback
) {
const params = {
ImageId: "ami-1624987f",
InstanceType: "m1.small",
LaunchConfigurationName: name
};
this.request(null, "createLaunchConfiguration", params, callback, false);
});

Given(/^I describe launch configurations$/, function(callback) {
this.request(null, "describeLaunchConfigurations", {}, callback);
});
Given(/^I describe launch configurations$/, function(callback) {
this.request(null, "describeLaunchConfigurations", {}, 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();
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(/^I delete the launch configuration "([^"]*)"$/, function(
name,
callback
) {
var params = { LaunchConfigurationName: name };
this.request(null, "deleteLaunchConfiguration", params, callback);
});
Then(/^I delete the launch configuration "([^"]*)"$/, function(name, callback) {
const params = { LaunchConfigurationName: name };
this.request(null, "deleteLaunchConfiguration", params, callback);
});
36 changes: 17 additions & 19 deletions features/cloudformation/step_definitions/cloudformation.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
var { CloudFormation } = require("../../../clients/client-cloudformation");
var { defineSupportCode } = require("cucumber");
const { CloudFormation } = require("../../../clients/client-cloudformation");
const { Before, Given } = require("cucumber");

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

Given(
/^I create a CloudFormation stack with name prefix "([^"]*)"$/,
function(prefix, callback) {
this.stackName = this.uniqueName(prefix);
this.templateBody = '{"Resources":{"member":{"Type":"AWS::SQS::Queue"}}}';
var params = {
TemplateBody: this.templateBody,
StackName: this.stackName
};
this.request(null, "createStack", params, callback, false);
}
);
Given(/^I create a CloudFormation stack with name prefix "([^"]*)"$/, function(
prefix,
callback
) {
this.stackName = this.uniqueName(prefix);
this.templateBody = '{"Resources":{"member":{"Type":"AWS::SQS::Queue"}}}';
const params = {
TemplateBody: this.templateBody,
StackName: this.stackName
};
this.request(null, "createStack", params, callback, false);
});
142 changes: 70 additions & 72 deletions features/cloudfront/step_definitions/cloudfront.js
Original file line number Diff line number Diff line change
@@ -1,82 +1,80 @@
var { CloudFront } = require("../../../clients/client-cloudfront");
var { defineSupportCode } = require("cucumber");
const { CloudFront } = require("../../../clients/client-cloudfront");
const { Before, Given, Then, When } = require("cucumber");

defineSupportCode(function({ Before, Given, Then, When }) {
var createParams = {
CallerReference: "",
Aliases: {
Quantity: 0
},
DefaultRootObject: "",
Origins: {
Items: [
{
Id: "origin",
DomainName: "example.com",
CustomOriginConfig: {
HTTPPort: 80,
HTTPSPort: 443,
OriginProtocolPolicy: "match-viewer"
}
}
],
Quantity: 1
},
DefaultCacheBehavior: {
TargetOriginId: "origin",
ForwardedValues: {
QueryString: false,
Cookies: {
Forward: "all"
const createParams = {
CallerReference: "",
Aliases: {
Quantity: 0
},
DefaultRootObject: "",
Origins: {
Items: [
{
Id: "origin",
DomainName: "example.com",
CustomOriginConfig: {
HTTPPort: 80,
HTTPSPort: 443,
OriginProtocolPolicy: "match-viewer"
}
},
TrustedSigners: {
Items: [],
Enabled: false,
Quantity: 0
},
ViewerProtocolPolicy: "allow-all",
MinTTL: 0
}
],
Quantity: 1
},
DefaultCacheBehavior: {
TargetOriginId: "origin",
ForwardedValues: {
QueryString: false,
Cookies: {
Forward: "all"
}
},
CacheBehaviors: {
TrustedSigners: {
Items: [],
Quantity: 0
},
Comment: "",
Logging: {
Enabled: false,
Bucket: "invalidbucket.s3.amazonaws.com",
Prefix: "prefix",
IncludeCookies: false
Quantity: 0
},
PriceClass: "PriceClass_All",
Enabled: false
};
ViewerProtocolPolicy: "allow-all",
MinTTL: 0
},
CacheBehaviors: {
Items: [],
Quantity: 0
},
Comment: "",
Logging: {
Enabled: false,
Bucket: "invalidbucket.s3.amazonaws.com",
Prefix: "prefix",
IncludeCookies: false
},
PriceClass: "PriceClass_All",
Enabled: false
};

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

Given(
/^I create a CloudFront distribution with name prefix "([^"]*)"$/,
function(prefix, callback) {
this.cfName = this.uniqueName(prefix);
this.cfCreateParams.CallerReference = this.cfName;
this.cfCreateParams.Origins.Items[0].Id =
this.cfName === "" ? "origin" : "InvalidOrigin";
this.request(
null,
"createDistribution",
{ DistributionConfig: this.cfCreateParams },
callback,
false
);
}
);
Given(
/^I create a CloudFront distribution with name prefix "([^"]*)"$/,
function(prefix, callback) {
this.cfName = this.uniqueName(prefix);
this.cfCreateParams.CallerReference = this.cfName;
this.cfCreateParams.Origins.Items[0].Id =
this.cfName === "" ? "origin" : "InvalidOrigin";
this.request(
null,
"createDistribution",
{ DistributionConfig: this.cfCreateParams },
callback,
false
);
}
);

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

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

Given(/^I create a domain with name prefix "([^"]*)"$/, function(
prefix,
callback
) {
this.domainName = this.uniqueName(prefix);
this.request(
null,
"createDomain",
{ DomainName: this.domainName },
callback,
false
);
});
Given(/^I create a domain with name prefix "([^"]*)"$/, function(
prefix,
callback
) {
this.domainName = this.uniqueName(prefix);
this.request(
null,
"createDomain",
{ DomainName: this.domainName },
callback,
false
);
});
36 changes: 17 additions & 19 deletions features/cloudtrail/step_definitions/cloudtrail.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
var { CloudTrail } = require("../../../clients/client-cloudtrail");
var { defineSupportCode } = require("cucumber");
const { CloudTrail } = require("../../../clients/client-cloudtrail");
const { Before, Given } = require("cucumber");

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

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

Given(/^I create a trail with an invalid name$/, function(callback) {
this.request(
null,
"createTrail",
{ Name: "", S3BucketName: "" },
callback,
false
);
});
Given(/^I create a trail with an invalid name$/, function(callback) {
this.request(
null,
"createTrail",
{ Name: "", S3BucketName: "" },
callback,
false
);
});
Loading