@forsakringskassan/cypress-config 1.0.0 → 1.1.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 +7 -6
- package/dist/index.d.ts +5 -4
- package/dist/index.mjs +1 -1
- package/dist/support.d.ts +1 -1
- package/dist/support.mjs +0 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,13 +4,14 @@ Sharable Cypress configuration building blocks for Försäkringskassan.
|
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
|
-
In `cypress.config.ts`, replace the vanilla `defineConfig()` helper from `cypress` with `@forsakringskassan/cypress-config
|
|
7
|
+
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:
|
|
8
8
|
|
|
9
9
|
```diff
|
|
10
10
|
-import { defineConfig } from "cypress";
|
|
11
11
|
+import { defineConfig } from "@forsakringskassan/cypress-config";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
-export default defineConfig({
|
|
14
|
+
+export default defineConfig(import.meta.dirname, {
|
|
14
15
|
/* ... */
|
|
15
16
|
});
|
|
16
17
|
```
|
|
@@ -18,11 +19,11 @@ In `cypress.config.ts`, replace the vanilla `defineConfig()` helper from `cypres
|
|
|
18
19
|
It works the same but is preconfigured with new defaults.
|
|
19
20
|
|
|
20
21
|
> [!TIP]
|
|
21
|
-
> The `defineConfig()` helper does not require
|
|
22
|
-
> Unless you are explicitly overwriting the default configuration it is recommended to call `defineConfig()` without
|
|
22
|
+
> The `defineConfig()` helper does not require the configuration object as the second parameter.
|
|
23
|
+
> Unless you are explicitly overwriting the default configuration it is recommended to call `defineConfig()` without it.
|
|
23
24
|
>
|
|
24
25
|
> ```ts
|
|
25
|
-
> export default defineConfig();
|
|
26
|
+
> export default defineConfig(import.meta.dirname);
|
|
26
27
|
> ```
|
|
27
28
|
>
|
|
28
29
|
> This ensures maximum compatibility with future releases.
|
|
@@ -56,7 +57,7 @@ import {
|
|
|
56
57
|
htmlValidatePlugin,
|
|
57
58
|
} from "@forsakringskassan/cypress-config";
|
|
58
59
|
|
|
59
|
-
export default defineConfig({
|
|
60
|
+
export default defineConfig(import.meta.dirname, {
|
|
60
61
|
component: {
|
|
61
62
|
async setupNodeEvents(on, config) {
|
|
62
63
|
config = await htmlValidatePlugin(on, config);
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare type ConfigOptions = Parameters<typeof defineConfig_2>[0];
|
|
|
11
11
|
* Default cypress configuration.
|
|
12
12
|
*
|
|
13
13
|
* @public
|
|
14
|
-
* @since v1.
|
|
14
|
+
* @since v1.1.0
|
|
15
15
|
*/
|
|
16
16
|
export declare const defaultConfig: Readonly<{
|
|
17
17
|
allowCypressEnv: false;
|
|
@@ -27,9 +27,10 @@ export declare const defaultConfig: Readonly<{
|
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* @public
|
|
30
|
-
* @since v1.
|
|
30
|
+
* @since v1.1.0
|
|
31
|
+
* @param _rootDir - path to the root directory (containing the `cypress.config.ts` file).
|
|
31
32
|
*/
|
|
32
|
-
export declare function defineConfig(userConfig?: Omit<ConfigOptions, "component"> & {
|
|
33
|
+
export declare function defineConfig(_rootDir: string, userConfig?: Omit<ConfigOptions, "component"> & {
|
|
33
34
|
component?: Partial<ConfigOptions["component"]>;
|
|
34
35
|
}): Readonly<ConfigOptions>;
|
|
35
36
|
|
|
@@ -37,7 +38,7 @@ export declare function defineConfig(userConfig?: Omit<ConfigOptions, "component
|
|
|
37
38
|
* Preconfigured `cypress-html-validate` plugin.
|
|
38
39
|
*
|
|
39
40
|
* @public
|
|
40
|
-
* @since v1.
|
|
41
|
+
* @since v1.1.0
|
|
41
42
|
* @param on - Cypress `on` callback from `setupNodeEvents`.
|
|
42
43
|
* @param cypressConfig - Cypress `config` parameter from `setupNodeEvents`.
|
|
43
44
|
* @param userConfig - Custom configuration to pass to `html-validate`.
|
package/dist/index.mjs
CHANGED
package/dist/support.d.ts
CHANGED
package/dist/support.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forsakringskassan/cypress-config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Sharable Cypress configuration building blocks for Försäkringskassan",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cypress"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@fkui/vue": ">= 6.0.0",
|
|
46
|
-
"cypress": "^15.
|
|
46
|
+
"cypress": "^15.17.0",
|
|
47
47
|
"html-validate": ">= 8.0.0"
|
|
48
48
|
},
|
|
49
49
|
"engines": {
|