@ui5/webcomponents-tools 2.2.0-rc.2 → 2.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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.2.0](https://github.com/SAP/ui5-webcomponents/compare/v2.2.0-rc.3...v2.2.0) (2024-09-03)
7
+
8
+ **Note:** Version bump only for package @ui5/webcomponents-tools
9
+
10
+
11
+
12
+
13
+
14
+ # [2.2.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v2.2.0-rc.2...v2.2.0-rc.3) (2024-08-29)
15
+
16
+ **Note:** Version bump only for package @ui5/webcomponents-tools
17
+
18
+
19
+
20
+
21
+
6
22
  # [2.2.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v2.2.0-rc.1...v2.2.0-rc.2) (2024-08-22)
7
23
 
8
24
  **Note:** Version bump only for package @ui5/webcomponents-tools
@@ -2,16 +2,16 @@
2
2
  <html>
3
3
 
4
4
  <head>
5
- <meta charset="utf-8">
6
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
8
- <meta name="sap-allowedThemeOrigins" content="https://example.com">
9
- <title>Components App</title>
10
- <script data-ui5-config type="application/json">{}</script>
5
+ <meta charset="utf-8">
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
+ <meta name="viewport" content="width=device-width,initial-scale=1.0">
8
+ <meta name="sap-allowedThemeOrigins" content="https://example.com">
9
+ <title>Components App</title>
10
+ <script data-ui5-config type="application/json">{}</script>
11
11
  </head>
12
12
 
13
13
  <body>
14
- <div data-cy-root></div>
14
+ <div data-cy-root></div>
15
15
  </body>
16
16
 
17
17
  </html>
@@ -1,20 +1,23 @@
1
1
  /// <reference types="cypress" />
2
2
  import { RenderOptions, HTMLTemplateResult } from 'lit';
3
+ import "cypress-real-events";
4
+
3
5
  export type Renderable = HTMLTemplateResult;
4
6
  export interface MountUI5Options extends MountLitTemplateOptions {
5
- ui5Configuration: object;
7
+ ui5Configuration: object;
6
8
  }
7
9
  export type MountOptions = Partial<MountUI5Options>;
8
10
  export declare function mount<T extends keyof HTMLElementTagNameMap = any>(component: string | Renderable, options?: MountOptions): Cypress.Chainable<JQuery<HTMLElementTagNameMap[T]>>;
9
11
  declare global {
10
- namespace Cypress {
11
- interface Chainable {
12
- /**
13
- * Mount your component into Cypress sandbox
14
- * @param component content to render by lit-html render function
15
- * @param options render options for custom rendering
16
- */
17
- mount: typeof mount;
18
- }
19
- }
12
+ namespace Cypress {
13
+ interface Chainable {
14
+ /**
15
+ * Mount your component into Cypress sandbox
16
+ * @param component content to render by lit-html render function
17
+ * @param options render options for custom rendering
18
+ */
19
+ mount: typeof mount;
20
+ }
21
+ }
20
22
  }
23
+
@@ -3,17 +3,19 @@ const path = require("path");
3
3
  const rootConfig = require("../../../vite.config.js");
4
4
 
5
5
  module.exports = defineConfig({
6
- component: {
7
- supportFile: path.join(__dirname, "cypress/support/component.js"),
8
- indexHtmlFile: path.join(__dirname, "cypress/support/component-index.html"),
9
- specPattern: "**/specs/*.cy.{js,ts}",
10
- devServer: {
11
- framework: 'cypress-ct-lit',
12
- bundler: 'vite',
13
- viteConfig: rootConfig,
14
- }
15
- },
16
- video: false,
17
- screenshotOnRunFailure: false,
18
- scrollBehavior: false
6
+ component: {
7
+ supportFile: path.join(__dirname, "cypress/support/component.js"),
8
+ indexHtmlFile: path.join(__dirname, "cypress/support/component-index.html"),
9
+ specPattern: "**/specs/*.cy.{js,ts}",
10
+ devServer: {
11
+ framework: 'cypress-ct-lit',
12
+ bundler: 'vite',
13
+ viteConfig: rootConfig,
14
+ }
15
+ },
16
+ video: false,
17
+ screenshotOnRunFailure: false,
18
+ scrollBehavior: false,
19
+ viewportHeight: 1080,
20
+ viewportWidth: 1440,
19
21
  })
@@ -5,37 +5,71 @@ const tsMode = fs.existsSync(path.join(process.cwd(), "tsconfig.json"));
5
5
  /**
6
6
  * Typescript Rules
7
7
  */
8
- const overrides = tsMode ? [{
9
- files: ["*.ts"],
10
- parser: "@typescript-eslint/parser",
11
- plugins: ["@typescript-eslint"],
12
- extends: [
13
- "plugin:@typescript-eslint/recommended",
14
- "plugin:@typescript-eslint/recommended-requiring-type-checking"
15
- ],
16
- parserOptions: {
17
- "project": [
18
- "./tsconfig.json",
19
- "./cypress/tsconfig.json",
20
- ],
21
- EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true,
8
+ const overrides = tsMode ? [
9
+ {
10
+ files: ["*.ts"],
11
+ parser: "@typescript-eslint/parser",
12
+ plugins: ["@typescript-eslint"],
13
+ extends: [
14
+ "plugin:@typescript-eslint/recommended",
15
+ "plugin:@typescript-eslint/recommended-requiring-type-checking"
16
+ ],
17
+ parserOptions: {
18
+ "project": [
19
+ "./tsconfig.json",
20
+ "./cypress/tsconfig.json",
21
+ ],
22
+ EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true,
23
+ },
24
+ rules: {
25
+ "no-shadow": "off",
26
+ "@typescript-eslint/consistent-type-imports": "error",
27
+ "@typescript-eslint/no-shadow": ["error"],
28
+ "@typescript-eslint/no-unsafe-member-access": "off",
29
+ "@typescript-eslint/no-floating-promises": "off",
30
+ "@typescript-eslint/no-explicit-any": "off",
31
+ "@typescript-eslint/no-unsafe-assignment": "off",
32
+ "@typescript-eslint/ban-ts-comment": "off",
33
+ "@typescript-eslint/no-unsafe-call": "off",
34
+ "@typescript-eslint/no-non-null-assertion": "off",
35
+ "@typescript-eslint/no-empty-function": "off",
36
+ "@typescript-eslint/no-empty-interface": "off",
37
+ "lines-between-class-members": "off",
38
+ }
22
39
  },
23
- rules: {
24
- "no-shadow": "off",
25
- "@typescript-eslint/consistent-type-imports": "error",
26
- "@typescript-eslint/no-shadow": ["error"],
27
- "@typescript-eslint/no-unsafe-member-access": "off",
28
- "@typescript-eslint/no-floating-promises": "off",
29
- "@typescript-eslint/no-explicit-any": "off",
30
- "@typescript-eslint/no-unsafe-assignment": "off",
31
- "@typescript-eslint/ban-ts-comment": "off",
32
- "@typescript-eslint/no-unsafe-call": "off",
33
- "@typescript-eslint/no-non-null-assertion": "off",
34
- "@typescript-eslint/no-empty-function": "off",
35
- "@typescript-eslint/no-empty-interface": "off",
36
- "lines-between-class-members": "off",
40
+ {
41
+ "files": ["**/cypress/**/*.ts"],
42
+
43
+ "plugins": [
44
+ "cypress"
45
+ ],
46
+ extends: [
47
+ "plugin:cypress/recommended"
48
+ ],
49
+ "env": {
50
+ "cypress/globals": true
51
+ },
52
+ "rules": {
53
+ "max-nested-callbacks": 0,
54
+ "@typescript-eslint/no-namespace": "off",
55
+ "cypress/no-assigning-return-values": "error",
56
+ "cypress/no-unnecessary-waiting": "error",
57
+ "cypress/assertion-before-screenshot": "warn",
58
+ "cypress/no-force": "warn",
59
+ "cypress/no-async-tests": "error",
60
+ "cypress/no-async-before": "error",
61
+ "cypress/no-pause": "error",
62
+ "import/no-extraneous-dependencies": [
63
+ "error",
64
+ {
65
+ "devDependencies": [
66
+ "**/cypress/**/*.ts"
67
+ ]
68
+ }
69
+ ]
70
+ }
37
71
  }
38
- }] : [];
72
+ ] : [];
39
73
 
40
74
  module.exports = {
41
75
  "env": {
@@ -128,7 +162,7 @@ module.exports = {
128
162
  "no-shadow-restricted-names": 2,
129
163
  "no-undef-init": 2,
130
164
  "no-undef": 2,
131
- "no-unused-vars": [2, {"vars":"all", "args":"none"}],
165
+ "no-unused-vars": [2, { "vars": "all", "args": "none" }],
132
166
 
133
167
  "brace-style": [2, "1tbs", { "allowSingleLine": true }],
134
168
  "camelcase": [1, { "properties": "never" }], // added for UI5 WebComponents
@@ -144,7 +178,7 @@ module.exports = {
144
178
  "no-new-object": 2,
145
179
  "no-spaced-func": 2,
146
180
  "quote-props": [2, "as-needed", { "keywords": true, "unnecessary": false }],
147
- "semi-spacing": [1, {"before": false, "after": true}],
181
+ "semi-spacing": [1, { "before": false, "after": true }],
148
182
  "semi": 2,
149
183
  "keyword-spacing": 2,
150
184
  "space-infix-ops": 2,
@@ -116,8 +116,8 @@ const getScripts = (options) => {
116
116
  },
117
117
  start: "nps prepare watch.devServer",
118
118
  test: `node "${LIB}/test-runner/test-runner.js"`,
119
- "test-cy-ci": `yarn cypress run --component --browser chrome --config-file config/cypress.config.js`,
120
- "test-cy-open": `yarn cypress open --component --browser chrome --config-file config/cypress.config.js`,
119
+ "test-cy-ci": `yarn cypress run --component --browser chrome`,
120
+ "test-cy-open": `yarn cypress open --component --browser chrome`,
121
121
  "test-suite-1": `node "${LIB}/test-runner/test-runner.js" --suite suite1`,
122
122
  "test-suite-2": `node "${LIB}/test-runner/test-runner.js" --suite suite2`,
123
123
  startWithScope: "nps scope.prepare scope.watchWithBundle",
@@ -60,7 +60,8 @@ exports.config = {
60
60
  // to run chrome headless the following flags are required
61
61
  // (see https://developers.google.com/web/updates/2017/04/headless-chrome)
62
62
  args: [
63
- '--headless',
63
+ '--headless=old',
64
+ '--disable-search-engine-choice-screen',
64
65
  '--start-maximized',
65
66
  '--no-sandbox',
66
67
  '--disable-gpu',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-tools",
3
- "version": "2.2.0-rc.2",
3
+ "version": "2.2.0",
4
4
  "description": "UI5 Web Components: webcomponents.tools",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -47,6 +47,7 @@
47
47
  "escodegen": "^2.0.0",
48
48
  "eslint": "^7.22.0",
49
49
  "eslint-config-airbnb-base": "^14.2.1",
50
+ "eslint-plugin-cypress": "^3.4.0",
50
51
  "eslint-plugin-import": "^2.22.1",
51
52
  "esprima": "^4.0.1",
52
53
  "getopts": "^2.3.0",
@@ -85,5 +86,5 @@
85
86
  "esbuild": "^0.19.9",
86
87
  "yargs": "^17.5.1"
87
88
  },
88
- "gitHead": "2c1b6c66d0abba9532115b63acd68c81e62acf66"
89
+ "gitHead": "15c5f5eba0d2d366c3022c99dbeb2a60658b0759"
89
90
  }
package/types/index.d.ts CHANGED
@@ -1 +1 @@
1
- import "../components-package/cypress/support/component"
1
+ import "../components-package/cypress/support/component"