Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
simasch committed Oct 11, 2022
2 parents 5de6646 + cb8a7e2 commit 6f6e53b
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 37 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ error-screenshots/
/dance.txt

/src/test/resources/secrets/
/pom.xml.versionsBackup
12 changes: 12 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
image: gitpod/workspace-java-17

tasks:
- name: Build and test
init: mvn test

- name: Start Postgresql
command: docker run --name postgres-jtaf -d -p5432:5432 -e POSTGRES_DB=jtaf4 -e POSTGRES_USER=jtaf4 -e POSTGRES_PASSWORD=jtaf420 -d postgres:12.7

ports:
- port: 8484
onOpen: open-browser
21 changes: 21 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Launch Current File",
"request": "launch",
"mainClass": "${file}"
},
{
"type": "java",
"name": "Launch Jtaf4Application",
"request": "launch",
"mainClass": "ch.jtaf.Jtaf4Application",
"projectName": "jtaf4"
}
]
}
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"java.configuration.updateBuildConfiguration": "interactive",
"sqltools.connections": [
{
"previewLimit": 50,
"server": "localhost",
"port": 5432,
"driver": "PostgreSQL",
"name": "jtaf4",
"database": "jtaf4",
"username": "jtaf4",
"password": "jtaf420"
}
]
}
42 changes: 26 additions & 16 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,33 @@
<!DOCTYPE html>
<!--
This file is auto-generated by Vaadin.
-->

<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
body, #outlet {
height: 100vh;
width: 100%;
margin: 0;
}
</style>
<!-- index.ts is included here automatically (either by the dev server or during the build) -->
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<style>
body, #outlet {
height: 100vh;
width: 100%;
margin: 0;
}
</style>
<!-- index.ts is included here automatically (either by the dev server or during the build) -->
</head>
<body>
<!-- This outlet div is where the views are rendered -->
<div id="outlet"></div>
<!-- This outlet div is where the views are rendered -->
<div id="outlet"></div>

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-PH4RL4J6YT"></script>
<script>
window.dataLayer = window.dataLayer || [];

function gtag() {
dataLayer.push(arguments);
}

gtag('js', new Date());

gtag('config', 'G-PH4RL4J6YT');
</script>
</body>
</html>
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@rollup/plugin-replace": "3.1.0",
"async": "3.2.2",
"mkdirp": "1.0.4",
"vite": "v3.0.9",
"vite": "v3.1.0",
"workbox-core": "6.5.0",
"rollup-plugin-brotli": "3.1.0",
"@rollup/pluginutils": "4.1.0",
Expand All @@ -40,7 +40,7 @@
"@rollup/plugin-replace": "3.1.0",
"async": "3.2.2",
"mkdirp": "1.0.4",
"vite": "v3.0.9",
"vite": "v3.1.0",
"workbox-core": "6.5.0",
"rollup-plugin-brotli": "3.1.0",
"@rollup/pluginutils": "4.1.0",
Expand Down
16 changes: 5 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>ch.jtaf</groupId>
<artifactId>jtaf4</artifactId>
<version>4.4.0</version>
<version>4.4.1</version>

<name>JTAF 4</name>
<description>JTAF - Track And Field</description>
Expand Down Expand Up @@ -51,12 +51,12 @@
<properties>
<java.version>17</java.version>

<vaadin.version>23.2.0</vaadin.version>
<vaadin.version>23.2.1</vaadin.version>
<jooq.version>3.17.2</jooq.version>
<openpdf.version>1.3.28</openpdf.version>

<testcontainers.version>1.17.2</testcontainers.version>
<karibu-testing.version>1.3.14</karibu-testing.version>
<karibu-testing.version>1.3.20</karibu-testing.version>
<archunit.version>0.23.1</archunit.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -172,12 +172,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-testbench</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.github.mvysny.kaributesting</groupId>
<artifactId>karibu-testing-v10-spring</artifactId>
Expand All @@ -188,7 +182,7 @@
<dependency>
<groupId>com.microsoft.playwright</groupId>
<artifactId>playwright</artifactId>
<version>1.22.0</version>
<version>1.25.0</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -336,7 +330,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.5</version>
<version>3.0.0</version>
<executions>
<execution>
<id>add-test-source</id>
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/ch/jtaf/ui/KaribuTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.test.annotation.DirtiesContext;

import java.util.List;
import java.util.Locale;
Expand All @@ -37,7 +36,6 @@
import static org.assertj.core.api.Assertions.assertThat;

@SpringBootTest
@DirtiesContext
public abstract class KaribuTest {

private static Routes routes;
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/ch/jtaf/ui/view/SeriesViewTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void add_competition() {
@Test
void add_category_and_assign_event() {
Tabs tabs = _get(Tabs.class);
Tab categories = _get(Tab.class, spec -> spec.withText("Categories"));
Tab categories = _get(Tab.class, spec -> spec.withCaption("Categories"));
tabs.setSelectedTab(categories);

// Check content of categories grid
Expand Down Expand Up @@ -170,7 +170,7 @@ void add_category_and_assign_event() {
@Test
void assign_athelete() {
Tabs tabs = _get(Tabs.class);
Tab athletes = _get(Tab.class, spec -> spec.withText("Athletes"));
Tab athletes = _get(Tab.class, spec -> spec.withCaption("Athletes"));
tabs.setSelectedTab(athletes);

// Check content of athletes grid
Expand Down
17 changes: 13 additions & 4 deletions vite.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,12 +407,12 @@ function lenientLitImportPlugin(): PluginOption {
name: 'vaadin:lenient-lit-import',
async transform(code, id) {
const decoratorImports = [
/import (.*) from (['"])(lit\/decorators)(['"])/,
/import (.*) from (['"])(lit-element\/decorators)(['"])/
/import (.*?) from (['"])(lit\/decorators)(['"])/,
/import (.*?) from (['"])(lit-element\/decorators)(['"])/
];
const directiveImports = [
/import (.*) from (['"])(lit\/directives\/)([^\\.]*)(['"])/,
/import (.*) from (['"])(lit-html\/directives\/)([^\\.]*)(['"])/
/import (.*?) from (['"])(lit\/directives\/)([^\\.]*?)(['"])/,
/import (.*?) from (['"])(lit-html\/directives\/)([^\\.]*?)(['"])/
];

decoratorImports.forEach((decoratorImport) => {
Expand Down Expand Up @@ -477,6 +477,14 @@ function setHmrPortToServerPort(): PluginOption {
}
};
}
function showRecompileReason(): PluginOption {
return {
name: 'vaadin:why-you-compile',
handleHotUpdate(context) {
console.log('Recompiling because', context.file, 'changed');
}
};
}

export const vaadinConfig: UserConfigFn = (env) => {
const devMode = env.mode === 'development';
Expand Down Expand Up @@ -539,6 +547,7 @@ export const vaadinConfig: UserConfigFn = (env) => {
!devMode && brotli(),
devMode && vaadinBundlesPlugin(),
devMode && setHmrPortToServerPort(),
devMode && showRecompileReason(),
settings.offlineEnabled && buildSWPlugin({ devMode }),
!devMode && statsExtracterPlugin(),
themePlugin({devMode}),
Expand Down

0 comments on commit 6f6e53b

Please sign in to comment.