@luomus/laji-form 15.1.3 → 15.1.5
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/package.json +2 -2
- package/protractor.conf.js +59 -0
- package/jsonconfig.json +0 -26
- package/playwright.config.ts +0 -77
- package/tsconfig.json +0 -25
- package/tsconfig.lib.json +0 -11
- package/tsconfig.test.json +0 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luomus/laji-form",
|
|
3
|
-
"version": "15.1.
|
|
3
|
+
"version": "15.1.5",
|
|
4
4
|
"description": "React module capable of building dynamic forms from Laji form json schemas",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"preversion": "npm run lint && npm test",
|
|
15
15
|
"version": "bin/update-changelog.sh",
|
|
16
16
|
"postversion": "npm publish",
|
|
17
|
-
"
|
|
17
|
+
"prepublishOnly": "npm run build && git push & git push --tags",
|
|
18
18
|
"lint": "eslint -c .eslintrc.prod.json src playground",
|
|
19
19
|
"test": "npx playwright test"
|
|
20
20
|
},
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Firefox isn't run default since it has a bug with mousemove (See https://github.com/angular/protractor/issues/4715 )
|
|
2
|
+
|
|
3
|
+
const [width, height] = [800, 1000];
|
|
4
|
+
const common = {
|
|
5
|
+
shardTestFiles: parseInt(process.env.THREADS) !== 1,
|
|
6
|
+
maxInstances: process.env.THREADS ? parseInt(process.env.THREADS) : 4
|
|
7
|
+
};
|
|
8
|
+
const chrome = {
|
|
9
|
+
...common,
|
|
10
|
+
browserName: "chrome",
|
|
11
|
+
chromeOptions: {
|
|
12
|
+
args: ["--headless", "--disable-gpu", `window-size=${width}x${height}`, "--no-sandbox", "--disable-dev-shm-usage"]
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const firefox = {
|
|
17
|
+
...common,
|
|
18
|
+
browserName: "firefox",
|
|
19
|
+
"firefoxOptions": {
|
|
20
|
+
args: ["--headless", `--width=${width}', '--height=${height}`]
|
|
21
|
+
},
|
|
22
|
+
"moz:firefoxOptions": {
|
|
23
|
+
args: ["--headless", `--width=${width}', '--height=${height}`]
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
let multiCapabilities = [chrome];
|
|
28
|
+
if (process.env.TEST_BROWSER === "firefox") {
|
|
29
|
+
multiCapabilities = [firefox];
|
|
30
|
+
} else if (process.env.TEST_BROWSER === "multi") {
|
|
31
|
+
multiCapabilities = [chrome, firefox];
|
|
32
|
+
}
|
|
33
|
+
if (process.env.HEADLESS && process.env.HEADLESS !== "true") multiCapabilities.forEach(capabilities => {
|
|
34
|
+
const options = [capabilities["chromeOptions"], capabilities["firefoxOptions"], capabilities["moz:firefoxOptions"]];
|
|
35
|
+
options.filter(o => o).forEach(_options => {
|
|
36
|
+
_options.args = _options.args.filter(a => a !== "--headless");
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
exports.config = {
|
|
41
|
+
specs: ["test/*-spec.ts"],
|
|
42
|
+
multiCapabilities,
|
|
43
|
+
maxSessions: 4,
|
|
44
|
+
SELENIUM_PROMISE_MANAGER: false,
|
|
45
|
+
onPrepare: async () => {
|
|
46
|
+
require("ts-node").register({
|
|
47
|
+
project: require("path").join(__dirname, "./tsconfig.json")
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
browser.waitForAngularEnabled(false);
|
|
51
|
+
|
|
52
|
+
// Set manually since Firefox cli size options don't work.
|
|
53
|
+
await browser.driver.manage().window().setSize(width, height);
|
|
54
|
+
},
|
|
55
|
+
plugins: multiCapabilities.length === 1 && multiCapabilities[0] === chrome && [{
|
|
56
|
+
package: "protractor-console-plugin",
|
|
57
|
+
exclude: [/Uncaught \(in promise\)/]
|
|
58
|
+
}]
|
|
59
|
+
};
|
package/jsonconfig.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"outDir": "./build",
|
|
4
|
-
"module": "es6",
|
|
5
|
-
"target": "es6",
|
|
6
|
-
"lib": [
|
|
7
|
-
"dom",
|
|
8
|
-
"es7",
|
|
9
|
-
"es2016.array.include"
|
|
10
|
-
],
|
|
11
|
-
"allowJs": true,
|
|
12
|
-
"jsx": "react",
|
|
13
|
-
"moduleResolution": "node",
|
|
14
|
-
"noImplicitReturns": true,
|
|
15
|
-
"noImplicitThis": false,
|
|
16
|
-
"noImplicitAny": true,
|
|
17
|
-
"strictNullChecks": true,
|
|
18
|
-
"allowSyntheticDefaultImports": true,
|
|
19
|
-
"esModuleInterop": true,
|
|
20
|
-
"experimentalDecorators": true,
|
|
21
|
-
"resolveJsonModule": true
|
|
22
|
-
},
|
|
23
|
-
"include": [
|
|
24
|
-
"./src/**/*"
|
|
25
|
-
]
|
|
26
|
-
}
|
package/playwright.config.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
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',
|
|
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 ? 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://127.0.0.1:8083',
|
|
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
|
-
// {
|
|
46
|
-
// name: 'webkit',
|
|
47
|
-
// use: { ...devices['Desktop Safari'] },
|
|
48
|
-
// },
|
|
49
|
-
|
|
50
|
-
/* Test against mobile viewports. */
|
|
51
|
-
// {
|
|
52
|
-
// name: 'Mobile Chrome',
|
|
53
|
-
// use: { ...devices['Pixel 5'] },
|
|
54
|
-
// },
|
|
55
|
-
// {
|
|
56
|
-
// name: 'Mobile Safari',
|
|
57
|
-
// use: { ...devices['iPhone 12'] },
|
|
58
|
-
// },
|
|
59
|
-
|
|
60
|
-
/* Test against branded browsers. */
|
|
61
|
-
// {
|
|
62
|
-
// name: 'Microsoft Edge',
|
|
63
|
-
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
64
|
-
// },
|
|
65
|
-
// {
|
|
66
|
-
// name: 'Google Chrome',
|
|
67
|
-
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
|
68
|
-
// },
|
|
69
|
-
],
|
|
70
|
-
|
|
71
|
-
/* Run your local dev server before starting the tests */
|
|
72
|
-
// webServer: {
|
|
73
|
-
// command: 'npm run start',
|
|
74
|
-
// url: 'http://127.0.0.1:3000',
|
|
75
|
-
// reuseExistingServer: !process.env.CI,
|
|
76
|
-
// },
|
|
77
|
-
});
|
package/tsconfig.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"outDir": "./build",
|
|
4
|
-
"module": "commonjs",
|
|
5
|
-
"target": "es6",
|
|
6
|
-
"lib": [
|
|
7
|
-
"dom",
|
|
8
|
-
"es7",
|
|
9
|
-
"es2016.array.include"
|
|
10
|
-
],
|
|
11
|
-
"allowJs": true,
|
|
12
|
-
"jsx": "react",
|
|
13
|
-
"moduleResolution": "node",
|
|
14
|
-
"noImplicitReturns": true,
|
|
15
|
-
"noImplicitThis": false,
|
|
16
|
-
"noImplicitAny": true,
|
|
17
|
-
"strictNullChecks": true,
|
|
18
|
-
"allowSyntheticDefaultImports": true,
|
|
19
|
-
"experimentalDecorators": true,
|
|
20
|
-
"resolveJsonModule": true
|
|
21
|
-
},
|
|
22
|
-
"include": [
|
|
23
|
-
"./src/**/*"
|
|
24
|
-
]
|
|
25
|
-
}
|
package/tsconfig.lib.json
DELETED