Skip to content

Commit 0b9cddc

Browse files
Workflow (#6)
* Added workflow and some minor UI fix
1 parent 23b08ca commit 0b9cddc

26 files changed

+198
-172
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Validate Gradle Wrapper
2+
on:
3+
push:
4+
branches: [main, main-okta]
5+
pull_request:
6+
branches: [main, main-okta]
7+
8+
jobs:
9+
validation:
10+
name: Validation
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: gradle/wrapper-validation-action@v1
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Integration Tests
2+
on:
3+
push:
4+
branches: [main, main-okta]
5+
pull_request:
6+
branches: [main, main-okta]
7+
8+
jobs:
9+
run-test:
10+
name: Run tests and build frontend
11+
timeout-minutes: 60
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
persist-credentials: false
17+
fetch-depth: 0
18+
19+
- name: Get changed files in the frontend folder
20+
id: was-any-frontend-files-changed
21+
uses: tj-actions/changed-files@v34
22+
with:
23+
files: frontend/**
24+
25+
- name: Setup packages
26+
if: steps.was-any-frontend-files-changed.outputs.any_changed == 'true'
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: 18
30+
cache: 'npm'
31+
cache-dependency-path: frontend/package-lock.json
32+
33+
- name: Install packages
34+
if: steps.was-any-frontend-files-changed.outputs.any_changed == 'true'
35+
working-directory: ./frontend
36+
run: npm ci
37+
38+
- name: Run lint
39+
if: steps.was-any-frontend-files-changed.outputs.any_changed == 'true'
40+
working-directory: ./frontend
41+
run: npm run lint
42+
43+
- name: Run unit tests
44+
if: steps.was-any-frontend-files-changed.outputs.any_changed == 'true'
45+
working-directory: ./frontend
46+
run: npm run test:unit:ci
47+
48+
- name: Run build
49+
if: steps.was-any-frontend-files-changed.outputs.any_changed == 'true'
50+
working-directory: ./frontend
51+
run: npm run build
52+
53+
- name: Set up JDK 17
54+
uses: actions/setup-java@v3
55+
with:
56+
java-version: '17'
57+
distribution: 'temurin'
58+
cache: 'gradle'
59+
60+
- run: ./gradlew build --no-daemon

.github/workflows/main.yaml

Whitespace-only changes.

.github/workflows/pr-checks.yaml

Lines changed: 0 additions & 15 deletions
This file was deleted.

frontend/.eslintrc.cjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ module.exports = {
77
'plugin:vue/vue3-essential',
88
'eslint:recommended',
99
'@vue/eslint-config-typescript',
10-
'@vue/eslint-config-prettier'
10+
'@vue/eslint-config-prettier',
1111
],
1212
parserOptions: {
13-
ecmaVersion: 'latest'
13+
ecmaVersion: 'latest',
1414
},
1515
rules: {
1616
'vue/multi-word-component-names': 0,
@@ -39,5 +39,5 @@ module.exports = {
3939
ignoreHTMLTextContents: false,
4040
},
4141
],
42-
}
42+
},
4343
}

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"test:e2e": "playwright test",
1313
"build-only": "vite build",
1414
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
15-
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
15+
"lint": "eslint . --ext .vue,.js,.jsx,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
1616
},
1717
"dependencies": {
1818
"@codemirror/lang-json": "^6.0.0",

frontend/playwright.config.ts

Lines changed: 85 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -11,102 +11,102 @@ import { devices } from '@playwright/test'
1111
* See https://playwright.dev/docs/test-configuration.
1212
*/
1313
const config: PlaywrightTestConfig = {
14-
testDir: './e2e',
15-
/* Maximum time one test can run for. */
16-
timeout: 30 * 1000,
17-
expect: {
18-
/**
19-
* Maximum time expect() should wait for the condition to be met.
20-
* For example in `await expect(locator).toHaveText();`
21-
*/
22-
timeout: 5000
23-
},
24-
/* Fail the build on CI if you accidentally left test.only in the source code. */
25-
forbidOnly: !!process.env.CI,
26-
/* Retry on CI only */
27-
retries: process.env.CI ? 2 : 0,
28-
/* Opt out of parallel tests on CI. */
29-
workers: process.env.CI ? 1 : undefined,
30-
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
31-
reporter: 'html',
32-
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
33-
use: {
34-
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
35-
actionTimeout: 0,
36-
/* Base URL to use in actions like `await page.goto('/')`. */
37-
baseURL: 'http://localhost:5173',
38-
39-
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
40-
trace: 'on-first-retry',
14+
testDir: './e2e',
15+
/* Maximum time one test can run for. */
16+
timeout: 30 * 1000,
17+
expect: {
18+
/**
19+
* Maximum time expect() should wait for the condition to be met.
20+
* For example in `await expect(locator).toHaveText();`
21+
*/
22+
timeout: 5000,
23+
},
24+
/* Fail the build on CI if you accidentally left test.only in the source code. */
25+
forbidOnly: !!process.env.CI,
26+
/* Retry on CI only */
27+
retries: process.env.CI ? 2 : 0,
28+
/* Opt out of parallel tests on CI. */
29+
workers: process.env.CI ? 1 : undefined,
30+
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
31+
reporter: 'html',
32+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
33+
use: {
34+
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
35+
actionTimeout: 0,
36+
/* Base URL to use in actions like `await page.goto('/')`. */
37+
baseURL: 'http://localhost:5173',
4138

42-
/* Only on CI systems run the tests headless */
43-
headless: !!process.env.CI
44-
},
39+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
40+
trace: 'on-first-retry',
4541

46-
/* Configure projects for major browsers */
47-
projects: [
48-
{
49-
name: 'chromium',
50-
use: {
51-
...devices['Desktop Chrome']
52-
}
42+
/* Only on CI systems run the tests headless */
43+
headless: !!process.env.CI,
5344
},
54-
{
55-
name: 'firefox',
56-
use: {
57-
...devices['Desktop Firefox']
58-
}
59-
},
60-
{
61-
name: 'webkit',
62-
use: {
63-
...devices['Desktop Safari']
64-
}
65-
}
6645

67-
/* Test against mobile viewports. */
68-
// {
69-
// name: 'Mobile Chrome',
70-
// use: {
71-
// ...devices['Pixel 5'],
72-
// },
73-
// },
74-
// {
75-
// name: 'Mobile Safari',
76-
// use: {
77-
// ...devices['iPhone 12'],
78-
// },
79-
// },
46+
/* Configure projects for major browsers */
47+
projects: [
48+
{
49+
name: 'chromium',
50+
use: {
51+
...devices['Desktop Chrome'],
52+
},
53+
},
54+
{
55+
name: 'firefox',
56+
use: {
57+
...devices['Desktop Firefox'],
58+
},
59+
},
60+
{
61+
name: 'webkit',
62+
use: {
63+
...devices['Desktop Safari'],
64+
},
65+
},
66+
67+
/* Test against mobile viewports. */
68+
// {
69+
// name: 'Mobile Chrome',
70+
// use: {
71+
// ...devices['Pixel 5'],
72+
// },
73+
// },
74+
// {
75+
// name: 'Mobile Safari',
76+
// use: {
77+
// ...devices['iPhone 12'],
78+
// },
79+
// },
8080

81-
/* Test against branded browsers. */
82-
// {
83-
// name: 'Microsoft Edge',
84-
// use: {
85-
// channel: 'msedge',
86-
// },
87-
// },
88-
// {
89-
// name: 'Google Chrome',
90-
// use: {
91-
// channel: 'chrome',
92-
// },
93-
// },
94-
],
81+
/* Test against branded browsers. */
82+
// {
83+
// name: 'Microsoft Edge',
84+
// use: {
85+
// channel: 'msedge',
86+
// },
87+
// },
88+
// {
89+
// name: 'Google Chrome',
90+
// use: {
91+
// channel: 'chrome',
92+
// },
93+
// },
94+
],
9595

96-
/* Folder for test artifacts such as screenshots, videos, traces, etc. */
97-
// outputDir: 'test-results/',
96+
/* Folder for test artifacts such as screenshots, videos, traces, etc. */
97+
// outputDir: 'test-results/',
9898

99-
/* Run your local dev server before starting the tests */
100-
webServer: {
101-
/**
99+
/* Run your local dev server before starting the tests */
100+
webServer: {
101+
/**
102102
* Use the dev server by default for faster feedback loop.
103103
* Use the preview server on CI for more realistic testing.
104104
Playwright will re-use the local server if there is already a dev-server running.
105105
*/
106-
command: process.env.CI ? 'vite preview --port 5173' : 'vite dev',
107-
port: 5173,
108-
reuseExistingServer: !process.env.CI
109-
}
106+
command: process.env.CI ? 'vite preview --port 5173' : 'vite dev',
107+
port: 5173,
108+
reuseExistingServer: !process.env.CI,
109+
},
110110
}
111111

112112
export default config

frontend/src/components/BaseButton.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
</div>
1212
<div
1313
v-else-if="!loading && disabled"
14-
class="flex h-full w-full cursor-not-allowed select-none items-center justify-center rounded border border-transparent bg-gray-400 py-2 px-4 text-center text-white dark:border-gray-600 dark:bg-gray-600"
14+
class="flex h-full w-full cursor-not-allowed select-none items-center justify-center rounded border border-transparent bg-gray-400 px-4 py-2 text-center text-white dark:border-gray-600 dark:bg-gray-600"
1515
>
1616
<div class="block text-center dark:text-gray-500">{{ label }}</div>
1717
</div>
1818
<button
1919
v-else
2020
@mousedown="$emit('click')"
21-
class="relative flex h-full w-full items-center justify-center overflow-hidden rounded border border-green-600 bg-green-500 py-2 px-4 text-white transition duration-200 ease-linear hover:bg-green-600 hover:shadow-lg dark:hover:shadow-black"
21+
class="relative flex h-full w-full items-center justify-center overflow-hidden rounded border border-green-600 bg-green-500 px-4 py-2 text-white transition duration-200 ease-linear hover:bg-green-600 hover:shadow-lg dark:hover:shadow-black"
2222
@click="$emit('click')"
2323
:type="type"
2424
>

frontend/src/components/BaseInputField.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@input="handleInput"
2828
class="block rounded border bg-white text-black transition-shadow duration-200 ease-linear focus:shadow-lg dark:bg-transparent dark:text-gray-100"
2929
:class="[
30-
{ 'px-2 py-1': size === 'small', 'px-2 py-3': size === 'medium', 'py-4 px-2': size === 'large' },
30+
{ 'px-2 py-1': size === 'small', 'px-2 py-3': size === 'medium', 'px-2 py-4': size === 'large' },
3131
[
3232
hasError
3333
? 'border-red-400 hover:border-red-500 focus:border-red-500 focus:shadow-red-100 focus:ring-red-500 dark:focus:shadow-red-900'

frontend/src/components/BaseRadioField.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@
4343
* file that was distributed with this source code.
4444
*/
4545
import { getId } from '@/util/Util'
46-
import { defineEmits, defineProps, type PropType, ref } from 'vue'
46+
import { defineEmits, defineProps, type PropType } from 'vue'
4747
import InformationIcon from '@/icons/InformationIcon.vue'
4848
49-
const props = defineProps({
49+
defineProps({
5050
name: {
5151
type: String,
5252
default: () => getId(),

0 commit comments

Comments
 (0)