Skip to content

Commit

Permalink
Rename webapp tests folder from src/test/javascript to src/test/webapp
Browse files Browse the repository at this point in the history
So src/main/webapp matches src/test/webapp
Also frontend tests are not limited to javascript code, this also includes components and e2e tests
  • Loading branch information
murdos committed May 28, 2024
1 parent 56dcba4 commit a2f4f40
Show file tree
Hide file tree
Showing 59 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
######################
/src/main/webapp/content/css/main.css
/target/classes/static/**
/src/test/javascript/coverage/
/src/test/webapp/coverage/

######################
# JHipster Lite
Expand Down
2 changes: 1 addition & 1 deletion .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
'src/{test/javascript,main/webapp}/**/*.{ts,vue}': ['eslint --fix'],
'src/{main,test}/webapp/**/*.{ts,vue}': ['eslint --fix'],
'{,src/*/resources/**/}*.{js,cjs,ts,tsx,vue}': ['prettier --write'],
'src/main/style/**/*.{css,scss}': ['stylelint --fix', 'prettier --write'],
'src/main/glyph/**/*.{css,scss}': ['prettier --write'],
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"scripts": {
"build": "vue-tsc -p tsconfig.build.json --noEmit && vite build --emptyOutDir && tikui-core build",
"dev": "npm run tikui:serve & npm run webapp:serve",
"e2e": "cypress open --config-file src/test/javascript/cypress/cypress-config.ts",
"e2e:headless": "cypress run --headless --config-file src/test/javascript/cypress/cypress-config.ts",
"e2e": "cypress open --config-file src/test/webapp/cypress/cypress-config.ts",
"e2e:headless": "cypress run --headless --config-file src/test/webapp/cypress/cypress-config.ts",
"format": "prettier . --write",
"glyph:build": "rimraf .fontello-session && fontello-cli install --config src/main/glyph/config.json --font src/main/glyph/font --css src/main/glyph/css",
"glyph:open": "rimraf .fontello-session && fontello-cli open --config src/main/glyph/config.json",
Expand All @@ -28,7 +28,7 @@
"lint:ci:pug": "eslint src/main/style --ext .pug",
"lint:ci:sass": "stylelint 'src/main/style/**/*.{css,scss}'",
"lint:js": "npm run lint:js:run -- --fix",
"lint:js:run": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src/main/webapp src/test/javascript",
"lint:js:run": "eslint --ext .js,.ts,.vue --ignore-path .gitignore src/main/webapp src/test/webapp",
"lint:pug": "npm run lint:ci:pug",
"lint:sass": "npm run lint:ci:sass -- --fix",
"prepare": "husky",
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@
<fileSet>
<name>test-sources</name>
<paths>
<path>${project.basedir}/src/test/javascript</path>
<path>${project.basedir}/src/test/webapp</path>
</paths>
<includes>
<include>**/*.*</include>
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ sonar.issue.ignore.multicriteria.S6206.ruleKey=java:S6206

# Rule: Add at least one assertion to this test case
# Waiting the fix at https://community.sonarsource.com/t/false-positive-s2699-add-at-least-one-assertion-to-this-test-case/99064
sonar.issue.ignore.multicriteria.S2699.resourceKey=src/test/javascript/**
sonar.issue.ignore.multicriteria.S2699.resourceKey=src/test/webapp/**
sonar.issue.ignore.multicriteria.S2699.ruleKey=typescript:S2699

# Rule: Remove this redundant type alias and replace its occurrences with "string"
Expand Down
12 changes: 0 additions & 12 deletions src/test/javascript/cypress/cypress-config.ts

This file was deleted.

File renamed without changes.
12 changes: 12 additions & 0 deletions src/test/webapp/cypress/cypress-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'cypress';

export default defineConfig({
e2e: {
baseUrl: 'http://localhost:7471',
specPattern: 'src/test/webapp/cypress/integration/**/*.spec.ts',
fixturesFolder: 'src/test/webapp/cypress/fixtures',
supportFolder: 'src/test/webapp/cypress/support',
supportFile: false,
video: false,
},
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["src/test/javascript/spec/**/*.ts"]
"exclude": ["src/test/webapp/spec/**/*.ts"]
}
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"src/main/webapp/**/*.d.ts",
"src/main/webapp/**/*.tsx",
"src/main/webapp/**/*.vue",
"src/test/javascript/spec/**/*.ts"
"src/test/webapp/spec/**/*.ts"
],
"exclude": ["./node_modules", "src/test/javascript/cypress/**/*.ts"]
"exclude": ["./node_modules", "src/test/webapp/cypress/**/*.ts"]
}
2 changes: 1 addition & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default defineConfig({
}),
],
test: {
include: ['src/test/javascript/spec/**/*.spec.ts'],
include: ['src/test/webapp/spec/**/*.spec.ts'],
logHeapUsage: true,
poolOptions: {
threads: {
Expand Down

0 comments on commit a2f4f40

Please sign in to comment.