@luomus/laji-form-builder 1.0.29 → 1.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -16
- package/client-test.Dockerfile +11 -0
- package/config.prod.json +10 -0
- package/docker-test-results/client.xml +566 -0
- package/lib/client/components/Editor/ElemPicker.js +1 -1
- package/lib/client/components/Editor/ElemPicker.js.map +1 -1
- package/lib/client/styles.css +310 -223
- package/lib/client/styles.css.map +1 -0
- package/lib/utils.d.ts +1 -1
- package/lib/utils.js.map +1 -1
- package/package.json +17 -14
- package/playwright.config.ts +76 -0
- package/dist/laji-form-builder.js +0 -2
- package/dist/laji-form-builder.js.LICENSE.txt +0 -82
- package/dist/main.js +0 -2
- package/dist/main.js.LICENSE.txt +0 -86
- package/dist/styles.css +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luomus/laji-form-builder",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.31",
|
|
4
4
|
"description": "UI for building laji.fi forms",
|
|
5
5
|
"main": "lib/client/app.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,20 +8,23 @@
|
|
|
8
8
|
"start:dev": "nodemon src/server/start-dev.ts --ignore test --ignore src/client",
|
|
9
9
|
"start:prod": "node build/main.js",
|
|
10
10
|
"test": "npm run test:server && npm run test:client",
|
|
11
|
-
"test:client": "
|
|
12
|
-
"test:client:
|
|
13
|
-
"test:client:
|
|
11
|
+
"test:client": "npx playwright test",
|
|
12
|
+
"test:client:lightweight": "npx playwright test --project chromium",
|
|
13
|
+
"test:client:docker": "npm run test:client:docker:build && npm run test:client:docker:run",
|
|
14
|
+
"test:client:docker:build": "docker build -t laji-form-builder-client-test -f client-test.Dockerfile .",
|
|
15
|
+
"test:client:docker:run": "docker run laji-form-builder-client-test:latest",
|
|
14
16
|
"test:server": "ts-node node_modules/jasmine-xml-reporter/bin/jasmine.js --conf=jasmine.json \"test/server/*-spec.ts\"",
|
|
15
17
|
"test:server:ci": "npm run test:server -- --junitreport --output=test-results/server",
|
|
16
|
-
"test:ci": "npm run test:server:ci
|
|
18
|
+
"test:ci": "npm run test:server:ci",
|
|
17
19
|
"lint": "eslint -c .eslintrc.prod.json src",
|
|
18
|
-
"build:client": "rimraf lib && NODE_ENV=production tsc -p tsconfig.client.json &&
|
|
20
|
+
"build:client": "rimraf lib && NODE_ENV=production tsc -p tsconfig.client.json && sass src/client/styles.scss lib/client/styles.css",
|
|
19
21
|
"build:dist": "rimraf dist && NODE_ENV=production webpack --config webpack.config.dist.js && rimraf dist/styles.js",
|
|
20
22
|
"build:build": "rimraf build && NODE_ENV=production webpack --config webpack.config.build.js",
|
|
21
23
|
"build:static": "rimraf static && NODE_ENV=production webpack --config webpack.config.static.js",
|
|
22
24
|
"build:server": "npm run build:static && npm run build:build",
|
|
23
|
-
"preversion": "npm run lint && npm test",
|
|
24
|
-
"postversion": "npm
|
|
25
|
+
"preversion": "npm run lint && npm run test:client:lightweight",
|
|
26
|
+
"postversion": "npm publish",
|
|
27
|
+
"prepublishOnly": "npm run build:client && git push && git push --tags"
|
|
25
28
|
},
|
|
26
29
|
"keywords": [
|
|
27
30
|
"laji-form",
|
|
@@ -31,7 +34,7 @@
|
|
|
31
34
|
"react-jsonschema-form"
|
|
32
35
|
],
|
|
33
36
|
"dependencies": {
|
|
34
|
-
"@luomus/laji-form": "^
|
|
37
|
+
"@luomus/laji-form": "^15.1.8",
|
|
35
38
|
"@luomus/parse-prop-types": "^0.3.0",
|
|
36
39
|
"@types/deep-diff": "^1.0.2",
|
|
37
40
|
"@types/memoizee": "^0.4.3",
|
|
@@ -51,6 +54,7 @@
|
|
|
51
54
|
"react-spinner": "^0.2.7"
|
|
52
55
|
},
|
|
53
56
|
"devDependencies": {
|
|
57
|
+
"@playwright/test": "^1.40.1",
|
|
54
58
|
"@types/connect-history-api-fallback": "^1.3.5",
|
|
55
59
|
"@types/cron": "^2.0.0",
|
|
56
60
|
"@types/express": "^4.17.13",
|
|
@@ -65,21 +69,20 @@
|
|
|
65
69
|
"cron": "^2.2.0",
|
|
66
70
|
"css-loader": "^6.7.1",
|
|
67
71
|
"eslint": "^7.32.0",
|
|
68
|
-
"eslint-plugin-protractor": "^2.1.1",
|
|
69
72
|
"eslint-plugin-react": "^7.25.1",
|
|
70
73
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
71
74
|
"express": "^5.0.0-beta.1",
|
|
72
75
|
"html-webpack-plugin": "^5.5.0",
|
|
73
76
|
"ignore-loader": "^0.1.2",
|
|
77
|
+
"jasmine": "2.8",
|
|
74
78
|
"jasmine-reporters": "^2.5.0",
|
|
75
79
|
"jasmine-spec-reporter": "^7.0.0",
|
|
76
80
|
"jasmine-xml-reporter": "^1.2.1",
|
|
77
81
|
"mini-css-extract-plugin": "^2.6.0",
|
|
78
|
-
"node-sass": "^6.0.1",
|
|
79
82
|
"nodemon": "^2.0.15",
|
|
80
83
|
"notus": "^0.3.2",
|
|
81
|
-
"
|
|
82
|
-
"
|
|
84
|
+
"rimraf": "^5.0.5",
|
|
85
|
+
"sass": "^1.69.5",
|
|
83
86
|
"sass-loader": "^12.6.0",
|
|
84
87
|
"source-map-loader": "^3.0.1",
|
|
85
88
|
"style-loader": "^3.3.1",
|
|
@@ -109,6 +112,6 @@
|
|
|
109
112
|
"access": "public"
|
|
110
113
|
},
|
|
111
114
|
"volta": {
|
|
112
|
-
"node": "
|
|
115
|
+
"node": "20.10.0"
|
|
113
116
|
}
|
|
114
117
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { defineConfig, devices } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Read environment variables from file.
|
|
5
|
+
* https://github.com/motdotla/dotenv
|
|
6
|
+
*/
|
|
7
|
+
// require('dotenv').config();
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* See https://playwright.dev/docs/test-configuration.
|
|
11
|
+
*/
|
|
12
|
+
export default defineConfig({
|
|
13
|
+
testDir: './test/client',
|
|
14
|
+
/* Run tests in files in parallel */
|
|
15
|
+
fullyParallel: true,
|
|
16
|
+
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
17
|
+
forbidOnly: !!process.env.CI,
|
|
18
|
+
/* Retry on CI only */
|
|
19
|
+
retries: process.env.CI ? 2 : 0,
|
|
20
|
+
/* Opt out of parallel tests on CI. */
|
|
21
|
+
workers: (process.env.CI || process.env.DOCKER_TEST_RUN) ? 1 : undefined,
|
|
22
|
+
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
23
|
+
reporter: 'line',
|
|
24
|
+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
25
|
+
use: {
|
|
26
|
+
/* Base URL to use in actions like `await page.goto('/')`. */
|
|
27
|
+
baseURL: 'http://localhost:8082',
|
|
28
|
+
|
|
29
|
+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
|
30
|
+
trace: 'on-first-retry',
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
/* Configure projects for major browsers */
|
|
34
|
+
projects: [
|
|
35
|
+
{
|
|
36
|
+
name: 'chromium',
|
|
37
|
+
use: { ...devices['Desktop Chrome'] },
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
{
|
|
41
|
+
name: 'firefox',
|
|
42
|
+
use: { ...devices['Desktop Firefox'] },
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'webkit',
|
|
46
|
+
use: { ...devices['Desktop Safari'] },
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
/* Test against mobile viewports. */
|
|
50
|
+
// {
|
|
51
|
+
// name: 'Mobile Chrome',
|
|
52
|
+
// use: { ...devices['Pixel 5'] },
|
|
53
|
+
// },
|
|
54
|
+
// {
|
|
55
|
+
// name: 'Mobile Safari',
|
|
56
|
+
// use: { ...devices['iPhone 12'] },
|
|
57
|
+
// },
|
|
58
|
+
|
|
59
|
+
/* Test against branded browsers. */
|
|
60
|
+
// {
|
|
61
|
+
// name: 'Microsoft Edge',
|
|
62
|
+
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
63
|
+
// },
|
|
64
|
+
// {
|
|
65
|
+
// name: 'Google Chrome',
|
|
66
|
+
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
67
|
+
// },
|
|
68
|
+
],
|
|
69
|
+
|
|
70
|
+
/* Run your local dev server before starting the tests */
|
|
71
|
+
webServer: {
|
|
72
|
+
command: 'npm run start',
|
|
73
|
+
url: 'http://localhost:8082',
|
|
74
|
+
reuseExistingServer: !process.env.CI,
|
|
75
|
+
},
|
|
76
|
+
});
|