This commit is contained in:
2024-07-19 17:04:42 +02:00
commit 5e0d0ec69f
71 changed files with 3316 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package godog
import cucumber "github.com/cucumber/godog"
func Setup(ctx *cucumber.ScenarioContext, testCenter TestCenter) {
gtc := genericTestCenter{testCenter: testCenter}
ctx.Step(`^the resource is created`, gtc.theResourceIsCreated)
ctx.Step(`^the response indicates that the ([^\s]+) already exists`, gtc.theResourceAlreadyExists)
ctx.Step(`^the response indicates that the user doesn't have right`, gtc.theUserMissRight)
ctx.Step(`^the response indicates that this a bad request`, gtc.badRequest)
ctx.Step(`^the response indicates that this a forbidden request`, gtc.forbiddenRequest)
ctx.Step(`^the response has status (\d+)$`, gtc.theResponseHasStatus)
ctx.Step(`^the ([^\s]+) ([^\s]+) doesn\'t exist yet`, gtc.resourceDoesntExist)
ctx.Step(`^the field ([^\s]+) is (\d+)$`, gtc.theFieldHasValue)
ctx.Step(`^the field ([^\s]+) has value "([^"]*)"$`, gtc.theFieldHasValue)
ctx.Step(`^the user create a[n]* ([^\s]+) with the following data:$`, gtc.theUserCreatesAResourcesWithTheFollowingData)
ctx.Step(`^the user update a[n]* ([^\s]+) with the following data:$`, gtc.theUserUpdatesAResourcesWithTheFollowingData)
ctx.Step(`^the user patch a[n]* ([^\s]+) with the following data:$`, gtc.theUserUpdatesAResourcesWithTheFollowingData)
ctx.Step(`^the ([^\s]+) exists with the following data:$`, gtc.theResourceExistWithTheFollowingData)
}