- Добавил интеграционные тесты с помощью Testcontainers
- Убрал сохранение данных сессии в БД, с ним не работало тестирования логина пользователя. - Изменил стратегию генерации Id для сообщений с 'AUTO' на `IDENTITY`. Без этого ругалось на дублирования id при добавлении нового сообщения в тестах. https://www.youtube.com/watch?v=Lnc3o8cCwZY&list=PLU2ftbIeotGpAYRP9Iv2KLIwK36-o_qYk&index=26
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
<head>
|
||||
<title>Sweater</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
||||
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"/>
|
||||
<script src="https://www.google.com/recaptcha/api.js" async="async" defer="defer"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control ${(tagError??)?string('is-invalid', '')}"
|
||||
value="<#if message??>${message.tag}</#if>" name="tag" placeholder="Tag">
|
||||
value="<#if message??>${message.tag}</#if>" name="tag" placeholder="Tag"/>
|
||||
<#if tagError??>
|
||||
<div class="invalid-feedback">
|
||||
${tagError}
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="custom-file">
|
||||
<input type="file" name="file" id="customFile">
|
||||
<input type="file" name="file" id="customFile"/>
|
||||
<label class="custom-file-label" for="customFile">Choose file</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<#include "security.ftl">
|
||||
|
||||
<div class="row row-cols-1 row-cols-md-3 g-4">
|
||||
<div class="row row-cols-1 row-cols-md-3 g-4" id="message-list">
|
||||
<#list messages as message>
|
||||
<div class="col">
|
||||
<div class="card h-100"> <!-- h-100 делает карточки одинаковой высоты -->
|
||||
<div class="card h-100" data-id="${message.id}"> <!-- h-100 делает карточки одинаковой высоты -->
|
||||
<#if message.filename??>
|
||||
<img src="/img/${message.filename}" class="card-img-top">
|
||||
</#if>
|
||||
<div class="card-body">
|
||||
<span>${message.text}</span><br>
|
||||
<span>${message.text}</span><br/>
|
||||
<i>#${message.tag}</i>
|
||||
</div>
|
||||
<div class="card-footer d-flex justify-content-between">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<#import "login.ftl" as l>
|
||||
|
||||
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
||||
<link href="/static/custom.css" rel="stylesheet">
|
||||
<link href="/static/custom.css" rel="stylesheet"/>
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="/">Sweater</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
|
||||
|
||||
Reference in New Issue
Block a user