Skip to content
Open
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
52 changes: 52 additions & 0 deletions src/test/resources/features/Clockify.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
@Clockify
Feature: Clockify

Background:
And header Content-Type = application/json
And header Accept = */*
And header x-api-key = NGY2NGQ1N2ItZWY0NC00OWFiLWIzNjktY2ZmMzE3MmU0ZTU0

@WorkSpace @200
Scenario: Traer Workspaces
Given base url env.base_url_clockify
And endpoint /v1/workspaces
When execute method GET
Then the status code should be 200
* define workspaceId = $.[0].id

@CrearProyecto @201
Scenario: Crear un proyecto
Given call Clockify.feature@WorkSpace
And base url env.base_url_clockify
And endpoint /v1/workspaces/{{workspaceId}}/projects
And set value "Proyecto" of key name in body agregarProyecto.json
When execute method POST
Then the status code should be 201

@TraerProyecto @Exitoso @200
Scenario: Traer proyecto
Given call Clockify.feature@WorkSpace
And base url env.base_url_clockify
And endpoint /v1/workspaces/{{workspaceId}}/projects/
When execute method GET
Then the status code should be 200
* define projectId = $.[0].id

@BuscarporID @200
Scenario: Buscar proyecto por ID
Given call Clockify.feature@TraerProyecto
And base url env.base_url_clockify
And endpoint /v1/workspaces/{{workspaceId}}/projects/{{projectId}}
When execute method GET
Then the status code should be 200

@RenombrarProyecto @200
Scenario: Renombrar un proyecto
Given call Clockify.feature@TraerProyecto
And base url env.base_url_clockify
And endpoint /v1/workspaces/{{workspaceId}}/projects/{{projectId}}
And set value "ProyectoRenombrado" of key name in body agregarProyecto.json
When execute method PUT
Then the status code should be 200
And response should be name = ProyectoRenombrado

60 changes: 0 additions & 60 deletions src/test/resources/features/Sample.feature

This file was deleted.

3 changes: 3 additions & 0 deletions src/test/resources/jsons/bodies/agregarProyecto.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name": "string"
}
9 changes: 3 additions & 6 deletions src/test/resources/lippia.conf
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
environments {
default {
"base_url_rickAndMorty" = "https://rickandmortyapi.com/api/"
"base_url_petstore" = "https://petstore.swagger.io/v2/"
"base_url_clockify" = "https://api.clockify.me/api"

}

test {
"base_url_rickAndMorty" = "https://rickandmortyapi.com/api/"
"base_url_petstore" = "https://petstore.swagger.io/v2/"
"base_url_clockify" = "https://api.clockify.me/api"
}

dev {
"base_url_rickAndMorty" = "https://rickandmortyapi.com/api/"
"base_url_petstore" = "https://petstore.swagger.io/v2/"
"base_url_clockify" = "https://api.clockify.me/api"
}
}