@ui5/webcomponents-tools 2.7.0 → 2.8.0-rc.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,14 @@
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.8.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.7.0...v2.8.0-rc.0) (2025-02-06)
7
+
8
+ **Note:** Version bump only for package @ui5/webcomponents-tools
9
+
10
+
11
+
12
+
13
+
6
14
  # [2.7.0](https://github.com/SAP/ui5-webcomponents/compare/v2.7.0-rc.2...v2.7.0) (2025-02-03)
7
15
 
8
16
  **Note:** Version bump only for package @ui5/webcomponents-tools
@@ -42,9 +42,7 @@ const realEventCmdCallback = (originalFn, element, ...args) => {
42
42
  cy.get(element)
43
43
  .should($el => {
44
44
  if ($el[0].tagName.includes("-") && $el[0].shadowRoot) {
45
- expect($el[0].shadowRoot.hasChildNodes()).to.be.true;
46
- } else {
47
- expect(true).to.be.true;
45
+ expect($el[0].shadowRoot.hasChildNodes(), "Custom elements with shadow DOM have content in their shadow DOM").to.be.true;
48
46
  }
49
47
  })
50
48
  .and("be.visible")
@@ -6,7 +6,7 @@ export interface MountUI5Options extends MountLitTemplateOptions {
6
6
  ui5Configuration: object;
7
7
  }
8
8
  export type MountOptions = Partial<MountUI5Options>;
9
- export declare function mount<T extends keyof HTMLElementTagNameMap = any>(component: JSX.Element, options?: MountOptions): Cypress.Chainable<JQuery<HTMLElementTagNameMap[T]>>;
9
+ export declare function mount(component: JSX.Element, options?: MountOptions): CypressChainable<JQuery<HTMLElement>>;
10
10
  declare global {
11
11
  namespace Cypress {
12
12
  interface Chainable {
@@ -22,23 +22,23 @@ function mount(component, options = {}) {
22
22
  applyConfiguration(options);
23
23
 
24
24
  // Mount JSX Element
25
- return cy.wrap({ preactMount })
26
- .invoke("preactMount", component, container)
27
- .then(() => {
28
- cy.get(container)
29
- .find("*")
30
- .should($el => {
31
- const shadowrootsExist = [...$el].every(el => {
32
- if (el.tagName.includes("-") && el.shadowRoot) {
33
- return el.shadowRoot.hasChildNodes();
34
- }
35
-
36
- return true;
37
- })
38
-
39
- expect(shadowrootsExist, "Custom elements with shadow DOM have content in their shadow DOM").to.be.true;
40
- })
41
- });
25
+ preactMount(component, container);
26
+
27
+ cy.get(container)
28
+ .find("*")
29
+ .should($el => {
30
+ const shadowrootsExist = [...$el].every(el => {
31
+ if (el.tagName.includes("-") && el.shadowRoot) {
32
+ return el.shadowRoot.hasChildNodes();
33
+ }
34
+
35
+ return true;
36
+ })
37
+
38
+ expect(shadowrootsExist, "Custom elements with shadow DOM have content in their shadow DOM").to.be.true;
39
+ })
40
+
41
+ return cy.get(container);
42
42
  }
43
43
 
44
44
  setupHooks(cleanup);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-tools",
3
- "version": "2.7.0",
3
+ "version": "2.8.0-rc.0",
4
4
  "description": "UI5 Web Components: webcomponents.tools",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -90,5 +90,5 @@
90
90
  "esbuild": "^0.19.9",
91
91
  "yargs": "^17.5.1"
92
92
  },
93
- "gitHead": "91c56c48e906a28c476cfe304bf13edbbbad34a5"
93
+ "gitHead": "8ec6a8928a1f691e8ca272f0f2c32f49e46c6992"
94
94
  }