Skip to content

Commit

Permalink
chore: update cucumber version
Browse files Browse the repository at this point in the history
  • Loading branch information
gabbloquet committed Feb 17, 2024
1 parent 4979273 commit 9fe186c
Show file tree
Hide file tree
Showing 96 changed files with 497 additions and 430 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
node-version: 16
- name: Install dependencies
run: npm ci
# TODO: add step to launch service
working-directory: front
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
Expand Down
7 changes: 7 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions doc/calls.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Get todolist
GET localhost:8080/todolist
Content-Type: application/json
Accept: application/prs.hal-forms+json

### Add task
POST localhost:8080/todolist/add/task
Content-Type: application/json
Accept: application/prs.hal-forms+json

{
"description": "Aller al pec'"
}
7 changes: 6 additions & 1 deletion front/src/Todolist/repository/todolist.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ interface TaskToCreate {
}

export const getTodolist = async () => {
const { data: todolistResource } = await axios.get(`${process.env.SERVICE_URL}/todolist`);
const { data: todolistResource } = await axios.get(`${process.env.SERVICE_URL}/todolist`, {
headers: {
'Content-Type': 'application/json',
'Accept': 'application/prs.hal-forms+json'
}
});
return toTodolist(todolistResource);
};

Expand Down
68 changes: 43 additions & 25 deletions service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<description>Todolist API using exposes REST Endpoint (Hateoas)</description>

<properties>
<cucumber.version>7.8.0</cucumber.version>
<cucumber.version>7.15.0</cucumber.version>
<junit.version>5.9.1</junit.version>
<java.version>21</java.version>
</properties>
Expand All @@ -31,6 +31,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-bom</artifactId>
<version>${cucumber.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -70,36 +77,47 @@
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>

<!-- Cucumber : will boost your engineering team's performance by employing Behavior-Driven Development (BDD) -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit-platform-engine</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-spring</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-spring</artifactId>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit-platform-engine</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<properties>
<configurationParameters>
cucumber.junit-platform.naming-strategy=long
</configurationParameters>
</properties>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package io.github.gabbloquet.todolist.configuration;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("*")
.allowedMethods("GET", "POST", "PUT", "DELETE")
.allowedHeaders("*");
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.github.gabbloquet.todolist.domain.task;
package io.github.gabbloquet.todolist.task;

import io.github.gabbloquet.todolist.annotations.DomainCommand;
import io.github.gabbloquet.todolist.domain.task.model.TaskId;
import io.github.gabbloquet.todolist.domain.todolist.TodolistCommand;
import io.github.gabbloquet.todolist.task.model.TaskId;
import io.github.gabbloquet.todolist.todolist.TodolistCommand;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
import lombok.ToString;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package io.github.gabbloquet.todolist.task;

import io.github.gabbloquet.todolist.task.model.Task;
import io.github.gabbloquet.todolist.task.model.TaskId;

import java.util.List;
import java.util.Optional;

public interface TaskRepository {

List<Task> get();

Optional<Task> get(TaskId taskId);

void save(Task task);
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.github.gabbloquet.todolist.domain.task;
package io.github.gabbloquet.todolist.task;

import io.github.gabbloquet.todolist.annotations.DomainService;
import io.github.gabbloquet.todolist.domain.task.addTask.OpenTask;
import io.github.gabbloquet.todolist.domain.task.model.TaskId;
import io.github.gabbloquet.todolist.domain.task.model.TaskState;
import io.github.gabbloquet.todolist.domain.todolist.model.TodolistCommandBus;
import io.github.gabbloquet.todolist.task.addTask.OpenTask;
import io.github.gabbloquet.todolist.task.model.TaskId;
import io.github.gabbloquet.todolist.task.model.TaskState;
import io.github.gabbloquet.todolist.todolist.model.TodolistCommandBus;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.github.gabbloquet.todolist.domain.task;
package io.github.gabbloquet.todolist.task;

import io.github.gabbloquet.todolist.domain.task.addTask.TaskCreated;
import io.github.gabbloquet.todolist.domain.task.model.Task;
import io.github.gabbloquet.todolist.domain.task.model.TaskEvent;
import io.github.gabbloquet.todolist.domain.task.model.TaskId;
import io.github.gabbloquet.todolist.domain.task.model.TaskNotFound;
import io.github.gabbloquet.todolist.task.addTask.TaskCreated;
import io.github.gabbloquet.todolist.task.model.Task;
import io.github.gabbloquet.todolist.task.model.TaskEvent;
import io.github.gabbloquet.todolist.task.model.TaskId;
import io.github.gabbloquet.todolist.task.model.TaskNotFound;
import lombok.NonNull;
import org.springframework.context.event.EventListener;
import org.springframework.core.annotation.Order;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.gabbloquet.todolist.domain.task.addTask;
package io.github.gabbloquet.todolist.task.addTask;

import io.github.gabbloquet.todolist.annotations.DomainCommand;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.github.gabbloquet.todolist.domain.task.addTask;
package io.github.gabbloquet.todolist.task.addTask;

import io.github.gabbloquet.todolist.annotations.DomainService;
import io.github.gabbloquet.todolist.domain.task.model.TaskEventBus;
import io.github.gabbloquet.todolist.domain.task.model.TaskId;
import io.github.gabbloquet.todolist.domain.todolist.model.LocalDateTimeSupplier;
import io.github.gabbloquet.todolist.domain.todolist.model.TodolistCommandReceiver;
import io.github.gabbloquet.todolist.task.model.TaskEventBus;
import io.github.gabbloquet.todolist.task.model.TaskId;
import io.github.gabbloquet.todolist.todolist.model.LocalDateTimeSupplier;
import io.github.gabbloquet.todolist.todolist.model.TodolistCommandReceiver;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import org.springframework.context.event.EventListener;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package io.github.gabbloquet.todolist.task.addTask;

import io.github.gabbloquet.todolist.annotations.DomainCommand;
import io.github.gabbloquet.todolist.todolist.TodolistCommand;

@DomainCommand
public interface OpenTask extends TodolistCommand {
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.github.gabbloquet.todolist.domain.task.addTask;
package io.github.gabbloquet.todolist.task.addTask;

import io.github.gabbloquet.todolist.annotations.DomainEvent;
import io.github.gabbloquet.todolist.domain.task.model.TaskEvent;
import io.github.gabbloquet.todolist.domain.task.model.TaskId;
import io.github.gabbloquet.todolist.task.model.TaskEvent;
import io.github.gabbloquet.todolist.task.model.TaskId;
import lombok.*;

import java.time.LocalDateTime;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.gabbloquet.todolist.domain.task.completeTask;
package io.github.gabbloquet.todolist.task.completeTask;

import io.github.gabbloquet.todolist.annotations.DomainCommand;
import io.github.gabbloquet.todolist.domain.task.TaskCommand;
import io.github.gabbloquet.todolist.task.TaskCommand;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.github.gabbloquet.todolist.domain.task.completeTask;
package io.github.gabbloquet.todolist.task.completeTask;

import io.github.gabbloquet.todolist.annotations.DomainService;
import io.github.gabbloquet.todolist.domain.task.model.TaskEventBus;
import io.github.gabbloquet.todolist.domain.todolist.model.LocalDateTimeSupplier;
import io.github.gabbloquet.todolist.domain.todolist.model.TodolistCommandReceiver;
import io.github.gabbloquet.todolist.task.model.TaskEventBus;
import io.github.gabbloquet.todolist.todolist.model.LocalDateTimeSupplier;
import io.github.gabbloquet.todolist.todolist.model.TodolistCommandReceiver;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import org.springframework.context.event.EventListener;
Expand Down
Loading

0 comments on commit 9fe186c

Please sign in to comment.