@forsakringskassan/cypress-config 1.1.0 → 1.2.0
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 +12 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.mjs +11 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Sharable Cypress configuration building blocks for Försäkringskassan.
|
|
4
4
|
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install --save-dev @forsakringskassan/cypress-config
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
If you previously had these packages installed, they can be uninstalled:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm rm mocha-multi-reporter
|
|
15
|
+
```
|
|
16
|
+
|
|
5
17
|
## Usage
|
|
6
18
|
|
|
7
19
|
In `cypress.config.ts`, replace the vanilla `defineConfig()` helper from `cypress` with `@forsakringskassan/cypress-config` and pass in `import.meta.dirname` as the first parameter:
|
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,14 @@ export declare type ConfigOptions = Parameters<typeof defineConfig_2>[0];
|
|
|
16
16
|
export declare const defaultConfig: Readonly<{
|
|
17
17
|
allowCypressEnv: false;
|
|
18
18
|
video: false;
|
|
19
|
+
defaultBrowser: string;
|
|
20
|
+
reporter: string;
|
|
21
|
+
reporterOptions: {
|
|
22
|
+
reporterEnabled: string;
|
|
23
|
+
mochaJunitReporterReporterOptions: {
|
|
24
|
+
mochaFile: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
19
27
|
component: {
|
|
20
28
|
devServer: {
|
|
21
29
|
framework: "vue";
|
package/dist/index.mjs
CHANGED
|
@@ -197,11 +197,22 @@ function htmlValidatePlugin(on, cypressConfig, userConfig, userOptions) {
|
|
|
197
197
|
// src/default-config.ts
|
|
198
198
|
import { createRequire as createRequire2 } from "node:module";
|
|
199
199
|
var require3 = createRequire2(import.meta.url);
|
|
200
|
+
var isGithub = Boolean(process.env["GITHUB_ACTION"]);
|
|
200
201
|
var defaultConfig = Object.freeze({
|
|
201
202
|
allowCypressEnv: false,
|
|
202
203
|
/* disable video recording, it is to slow both on remote machines and on
|
|
203
204
|
* CI/CD testing. */
|
|
204
205
|
video: false,
|
|
206
|
+
/* use chrome instead of electron as default browser */
|
|
207
|
+
defaultBrowser: "chrome",
|
|
208
|
+
/* reporter configuration */
|
|
209
|
+
reporter: require3.resolve("mocha-multi-reporters"),
|
|
210
|
+
reporterOptions: {
|
|
211
|
+
reporterEnabled: isGithub ? "spec, github-actions, mocha-junit-reporter" : "spec, mocha-junit-reporter",
|
|
212
|
+
mochaJunitReporterReporterOptions: {
|
|
213
|
+
mochaFile: "test-results/cypress-test-output_[hash].xml"
|
|
214
|
+
}
|
|
215
|
+
},
|
|
205
216
|
component: {
|
|
206
217
|
devServer: {
|
|
207
218
|
framework: "vue",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forsakringskassan/cypress-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Sharable Cypress configuration building blocks for Försäkringskassan",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cypress"
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"dist"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"cypress-html-validate": "9.0.0"
|
|
42
|
+
"cypress-html-validate": "9.0.0",
|
|
43
|
+
"mocha-multi-reporters": "1.5.1"
|
|
43
44
|
},
|
|
44
45
|
"peerDependencies": {
|
|
45
46
|
"@fkui/vue": ">= 6.0.0",
|