@ui5/webcomponents-base 2.7.0-rc.1 → 2.7.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.
Files changed (59) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/cypress/specs/{Accessor.cy.ts → Accessor.cy.tsx} +4 -4
  3. package/cypress/specs/{ConfigurationScript.cy.ts → ConfigurationScript.cy.tsx} +2 -1
  4. package/cypress/specs/{ConfigurationURL.cy.ts → ConfigurationURL.cy.tsx} +7 -7
  5. package/cypress/specs/{CustomMount.cy.ts → CustomMount.cy.tsx} +2 -2
  6. package/cypress/specs/{CustomTheme.cy.ts → CustomTheme.cy.tsx} +2 -2
  7. package/cypress/specs/{UI5ElementInvalidation.cy.ts → UI5ElementInvalidation.cy.tsx} +55 -10
  8. package/cypress/specs/{UI5ElementLifecycle.cy.ts → UI5ElementLifecycle.cy.tsx} +4 -4
  9. package/cypress/specs/{UI5ElementListenForChildPropChanges.cy.ts → UI5ElementListenForChildPropChanges.cy.tsx} +32 -11
  10. package/cypress/specs/{UI5ElementMetadataExt.cy.ts → UI5ElementMetadataExt.cy.tsx} +3 -3
  11. package/cypress/specs/{UI5ElementPropertyValidation.cy.ts → UI5ElementPropertyValidation.cy.tsx} +2 -2
  12. package/cypress/specs/{UI5ElementPropsAndAttrs.cy.ts → UI5ElementPropsAndAttrs.cy.tsx} +8 -8
  13. package/cypress/specs/{UI5ElementShadowDOM.cy.ts → UI5ElementShadowDOM.cy.tsx} +4 -4
  14. package/cypress/specs/{UI5ElementSlots.cy.ts → UI5ElementSlots.cy.tsx} +47 -27
  15. package/cypress/specs/{WithComplexTemplate.cy.ts → WithComplexTemplate.cy.tsx} +2 -2
  16. package/cypress/tsconfig.json +2 -0
  17. package/dist/.tsbuildinfobuild +1 -1
  18. package/dist/FeaturesRegistry.d.ts +1 -16
  19. package/dist/FeaturesRegistry.js +1 -37
  20. package/dist/FeaturesRegistry.js.map +1 -1
  21. package/dist/UI5Element.js +0 -8
  22. package/dist/UI5Element.js.map +1 -1
  23. package/dist/UI5ElementMetadata.d.ts +0 -5
  24. package/dist/UI5ElementMetadata.js +0 -7
  25. package/dist/UI5ElementMetadata.js.map +1 -1
  26. package/dist/decorators/customElement.d.ts +1 -0
  27. package/dist/decorators/customElement.js +1 -4
  28. package/dist/decorators/customElement.js.map +1 -1
  29. package/dist/features/F6Navigation.d.ts +1 -0
  30. package/dist/features/F6Navigation.js +14 -1
  31. package/dist/features/F6Navigation.js.map +1 -1
  32. package/dist/features/patchPopup.js +10 -1
  33. package/dist/features/patchPopup.js.map +1 -1
  34. package/dist/generated/VersionInfo.js +3 -3
  35. package/dist/generated/VersionInfo.js.map +1 -1
  36. package/dist/prod/FeaturesRegistry.js +1 -1
  37. package/dist/prod/FeaturesRegistry.js.map +3 -3
  38. package/dist/prod/UI5Element.js +1 -1
  39. package/dist/prod/UI5Element.js.map +3 -3
  40. package/dist/prod/UI5ElementMetadata.js +1 -1
  41. package/dist/prod/UI5ElementMetadata.js.map +2 -2
  42. package/dist/prod/decorators/customElement.js +1 -1
  43. package/dist/prod/decorators/customElement.js.map +3 -3
  44. package/dist/prod/features/F6Navigation.js +1 -1
  45. package/dist/prod/features/F6Navigation.js.map +3 -3
  46. package/dist/prod/features/patchPopup.js +1 -1
  47. package/dist/prod/features/patchPopup.js.map +3 -3
  48. package/dist/prod/generated/VersionInfo.js +1 -1
  49. package/dist/prod/generated/VersionInfo.js.map +2 -2
  50. package/dist/prod/util/getFastNavigationGroups.js +1 -1
  51. package/dist/prod/util/getFastNavigationGroups.js.map +2 -2
  52. package/dist/util/getFastNavigationGroups.js +6 -1
  53. package/dist/util/getFastNavigationGroups.js.map +1 -1
  54. package/package.json +3 -3
  55. /package/cypress/specs/{Boot.cy.ts → Boot.cy.tsx} +0 -0
  56. /package/cypress/specs/{ConfigurationChange.cy.ts → ConfigurationChange.cy.tsx} +0 -0
  57. /package/cypress/specs/{EventProvider.cy.ts → EventProvider.cy.tsx} +0 -0
  58. /package/cypress/specs/{SystemDOMElements.cy.ts → SystemDOMElements.cy.tsx} +0 -0
  59. /package/cypress/specs/{Theming.cy.ts → Theming.cy.tsx} +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
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.7.0](https://github.com/SAP/ui5-webcomponents/compare/v2.7.0-rc.2...v2.7.0) (2025-02-03)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **framework:** improve check for native popovers ([#10745](https://github.com/SAP/ui5-webcomponents/issues/10745)) ([f21f9b8](https://github.com/SAP/ui5-webcomponents/commit/f21f9b8835c7081235acc79d067b6e0a77feccbd))
12
+
13
+
14
+
15
+
16
+
17
+ # [2.7.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v2.7.0-rc.1...v2.7.0-rc.2) (2025-01-30)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **f6navigation:** fast navigation in certain container only ([#10485](https://github.com/SAP/ui5-webcomponents/issues/10485)) ([4b2ab63](https://github.com/SAP/ui5-webcomponents/commit/4b2ab63cae9b175f07d266e4150a587756cd7f6c))
23
+
24
+
25
+
26
+
27
+
6
28
  # [2.7.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v2.7.0-rc.0...v2.7.0-rc.1) (2025-01-23)
7
29
 
8
30
 
@@ -1,8 +1,8 @@
1
- import "../../test/test-elements/Accessor.js";
1
+ import Accessor from "../../test/test-elements/Accessor.js";
2
2
 
3
3
  describe("Framework boot", () => {
4
4
  it("Setting property updates attribute, state and DOM", () => {
5
- cy.mount(`<ui5-test-accessor></ui5-test-accessor>`);
5
+ cy.mount(<Accessor></Accessor>);
6
6
 
7
7
  cy.get("[ui5-test-accessor]")
8
8
  .as("testAccessor")
@@ -36,7 +36,7 @@ describe("Framework boot", () => {
36
36
  });
37
37
 
38
38
  it("Setting attribute updates property, state and DOM", () => {
39
- cy.mount(`<ui5-test-accessor></ui5-test-accessor>`);
39
+ cy.mount(<Accessor></Accessor>);
40
40
 
41
41
  cy.get("[ui5-test-accessor]")
42
42
  .as("testAccessor")
@@ -70,7 +70,7 @@ describe("Framework boot", () => {
70
70
  });
71
71
 
72
72
  it("should stop searching for accessors when HTMLElement is reached", () => {
73
- cy.mount(`<ui5-test-accessor></ui5-test-accessor>`);
73
+ cy.mount(<Accessor></Accessor>);
74
74
 
75
75
  cy.get("[ui5-test-accessor]")
76
76
  .invoke("prop", "title")
@@ -1,6 +1,7 @@
1
1
  import { getAnimationMode } from "../../src/config/AnimationMode.js";
2
2
  import { getCalendarType } from "../../src/config/CalendarType.js";
3
3
  import { getDefaultFontLoading } from "../../src/config/Fonts.js";
4
+ import TestGeneric from "../../test/test-elements/Generic.js";
4
5
  import { getFirstDayOfWeek, getLegacyDateCalendarCustomizing } from "../../src/config/FormatSettings.js";
5
6
  import { getLanguage } from "../../src/config/Language.js";
6
7
  import { getNoConflict } from "../../src/config/NoConflict.js";
@@ -43,7 +44,7 @@ describe("Configuration script", () => {
43
44
  };
44
45
 
45
46
  before(() => {
46
- cy.mount(`<ui5-test-generic></ui5-test-generic>`, {
47
+ cy.mount(<TestGeneric />, {
47
48
  ui5Configuration: configurationObject,
48
49
  });
49
50
 
@@ -1,5 +1,5 @@
1
1
  import { internals } from "../../src/Location.js";
2
- import "../../test/test-elements/Generic.js";
2
+ import TestGeneric from "../../test/test-elements/Generic.js";
3
3
  import { resetConfiguration } from "../../src/InitialConfiguration.js";
4
4
  import { getLanguage } from "../../src/config/Language.js";
5
5
  import { getCalendarType } from "../../src/config/CalendarType.js";
@@ -23,7 +23,7 @@ describe("Some settings can be set via SAP UI URL params", () => {
23
23
  .invoke("search")
24
24
  .should("be.equal", searchParams);
25
25
 
26
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
26
+ cy.mount(<TestGeneric />);
27
27
  });
28
28
 
29
29
  it("Tests that language is applied", () => {
@@ -66,7 +66,7 @@ describe("Different themeRoot configurations", () => {
66
66
  .invoke("search")
67
67
  .should("be.equal", searchParams);
68
68
 
69
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
69
+ cy.mount(<TestGeneric />);
70
70
 
71
71
  cy.wrap({ getThemeRoot })
72
72
  .invoke("getThemeRoot")
@@ -87,7 +87,7 @@ describe("Different themeRoot configurations", () => {
87
87
  .invoke("search")
88
88
  .should("be.equal", searchParams);
89
89
 
90
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
90
+ cy.mount(<TestGeneric />);
91
91
 
92
92
  cy.wrap({ getThemeRoot })
93
93
  .invoke("getThemeRoot")
@@ -108,7 +108,7 @@ describe("Different themeRoot configurations", () => {
108
108
  .invoke("search")
109
109
  .should("be.equal", searchParams);
110
110
 
111
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
111
+ cy.mount(<TestGeneric />);
112
112
 
113
113
  cy.wrap({ getThemeRoot })
114
114
  .invoke("getThemeRoot")
@@ -134,7 +134,7 @@ describe("Some settings can be set via SAP URL params", () => {
134
134
  .invoke("search")
135
135
  .should("be.equal", searchParams);
136
136
 
137
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
137
+ cy.mount(<TestGeneric />);
138
138
  });
139
139
 
140
140
  it("Tests that language is applied via sap-ui-language", () => {
@@ -165,7 +165,7 @@ describe("Some settings can be set via SAP UI URL params", () => {
165
165
  .invoke("search")
166
166
  .should("be.equal", searchParams);
167
167
 
168
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
168
+ cy.mount(<TestGeneric />);
169
169
  });
170
170
 
171
171
  it("Tests that language is applied via sap-ui-language", () => {
@@ -2,7 +2,7 @@ import { getAnimationMode } from "../../src/config/AnimationMode.js";
2
2
 
3
3
  describe("Custom mount", () => {
4
4
  it("mount", () => {
5
- cy.mount(`<button>Test</button>`);
5
+ cy.mount(<button>Test</button>);
6
6
 
7
7
  cy.get("button")
8
8
  .should("exist")
@@ -12,7 +12,7 @@ describe("Custom mount", () => {
12
12
  it("mount with configuration", () => {
13
13
  const configurationObject = { "animationMode": "basic" };
14
14
 
15
- cy.mount(`<button>Test with configuration</button>`, {
15
+ cy.mount(<button>Test with configuration</button>, {
16
16
  ui5Configuration: configurationObject,
17
17
  });
18
18
 
@@ -1,7 +1,7 @@
1
1
  import { registerThemePropertiesLoader } from "../../src/AssetRegistry.js";
2
2
  import { setTheme } from "../../src/config/Theme.js";
3
3
  import { getCurrentRuntimeIndex } from "../../src/Runtimes.js";
4
- import "../../test/test-elements/Generic.js";
4
+ import TestGeneric from "../../test/test-elements/Generic.js";
5
5
 
6
6
  describe("Custom themes can be registered", () => {
7
7
  it("Tests that theme parameters are changed on theme change", () => {
@@ -10,7 +10,7 @@ describe("Custom themes can be registered", () => {
10
10
  const currentRuntime = 0;
11
11
  const dataPropAttr = `data-ui5-component-properties-${currentRuntime}`;
12
12
 
13
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
13
+ cy.mount(<TestGeneric />);
14
14
 
15
15
  cy.wrap({ getCurrentRuntimeIndex })
16
16
  .invoke("getCurrentRuntimeIndex")
@@ -1,9 +1,14 @@
1
1
  import type UI5Element from "../../src/UI5Element.js";
2
- import "../../test/test-elements/Generic.js";
2
+ import Generic from "../../test/test-elements/Generic.js";
3
3
 
4
4
  describe("Invalidation works", () => {
5
5
  it("Tests that changing a property invalidates", () => {
6
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
6
+ cy.mount(<Generic></Generic>);
7
+
8
+ cy.get<Generic>("[ui5-test-generic]")
9
+ .should($el => {
10
+ expect($el[0].getDomRef()).to.exist;
11
+ });
7
12
 
8
13
  cy.get("[ui5-test-generic]")
9
14
  .as("testGeneric")
@@ -22,10 +27,15 @@ describe("Invalidation works", () => {
22
27
  });
23
28
 
24
29
  it("Tests that setting a property to the same value does not invalidate", () => {
25
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
30
+ cy.mount(<Generic></Generic>);
26
31
 
27
32
  const text = "new value";
28
33
 
34
+ cy.get<Generic>("[ui5-test-generic]")
35
+ .should($el => {
36
+ expect($el[0].getDomRef()).to.exist;
37
+ });
38
+
29
39
  cy.get("[ui5-test-generic]")
30
40
  .as("testGeneric")
31
41
  .invoke("prop", "strProp", text)
@@ -41,11 +51,16 @@ describe("Invalidation works", () => {
41
51
  });
42
52
 
43
53
  it("Tests that setting a property of type Object always invalidates", () => {
44
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
54
+ cy.mount(<Generic></Generic>);
45
55
 
46
56
  const obj = {};
47
57
  const otherObj = {};
48
58
 
59
+ cy.get<Generic>("[ui5-test-generic]")
60
+ .should($el => {
61
+ expect($el[0].getDomRef()).to.exist;
62
+ });
63
+
49
64
  cy.get("[ui5-test-generic]")
50
65
  .as("testGeneric")
51
66
  .invoke("prop", "objectProp", obj)
@@ -61,11 +76,16 @@ describe("Invalidation works", () => {
61
76
  });
62
77
 
63
78
  it("Tests that setting an array property always invalidates", () => {
64
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
79
+ cy.mount(<Generic></Generic>);
65
80
 
66
81
  const arr: Array<string> = [];
67
82
  const otherArr: Array<string> = [];
68
83
 
84
+ cy.get<Generic>("[ui5-test-generic]")
85
+ .should($el => {
86
+ expect($el[0].getDomRef()).to.exist;
87
+ });
88
+
69
89
  cy.get("[ui5-test-generic]")
70
90
  .as("testGeneric")
71
91
  .invoke("prop", "multiProp", arr)
@@ -81,7 +101,12 @@ describe("Invalidation works", () => {
81
101
  });
82
102
 
83
103
  it("Tests that adding a child invalidates", () => {
84
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
104
+ cy.mount(<Generic></Generic>);
105
+
106
+ cy.get<Generic>("[ui5-test-generic]")
107
+ .should($el => {
108
+ expect($el[0].getDomRef()).to.exist;
109
+ });
85
110
 
86
111
  cy.get("[ui5-test-generic]")
87
112
  .as("testGeneric")
@@ -100,10 +125,15 @@ describe("Invalidation works", () => {
100
125
  });
101
126
 
102
127
  it("Tests that removing a child invalidates", () => {
103
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
128
+ cy.mount(<Generic></Generic>);
104
129
 
105
130
  const div = document.createElement("div");
106
131
 
132
+ cy.get<Generic>("[ui5-test-generic]")
133
+ .should($el => {
134
+ expect($el[0].getDomRef()).to.exist;
135
+ });
136
+
107
137
  cy.get("[ui5-test-generic]")
108
138
  .as("testGeneric")
109
139
  .then($testGeneric => {
@@ -128,7 +158,12 @@ describe("Invalidation works", () => {
128
158
  });
129
159
 
130
160
  it("Tests that modifying textContent invalidates", () => {
131
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
161
+ cy.mount(<Generic></Generic>);
162
+
163
+ cy.get<Generic>("[ui5-test-generic]")
164
+ .should($el => {
165
+ expect($el[0].getDomRef()).to.exist;
166
+ });
132
167
 
133
168
  cy.get("[ui5-test-generic]")
134
169
  .as("testGeneric")
@@ -154,7 +189,12 @@ describe("Invalidation works", () => {
154
189
  });
155
190
 
156
191
  it("Tests that modifying nodeValue invalidates", () => {
157
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
192
+ cy.mount(<Generic></Generic>);
193
+
194
+ cy.get<Generic>("[ui5-test-generic]")
195
+ .should($el => {
196
+ expect($el[0].getDomRef()).to.exist;
197
+ });
158
198
 
159
199
  cy.get("[ui5-test-generic]")
160
200
  .as("testGeneric")
@@ -180,7 +220,12 @@ describe("Invalidation works", () => {
180
220
  });
181
221
 
182
222
  it("Tests that multiple invalidations result in a single rendering", () => {
183
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
223
+ cy.mount(<Generic></Generic>);
224
+
225
+ cy.get<Generic>("[ui5-test-generic]")
226
+ .should($el => {
227
+ expect($el[0].getDomRef()).to.exist;
228
+ });
184
229
 
185
230
  cy.get("[ui5-test-generic]")
186
231
  .as("testGeneric");
@@ -1,11 +1,11 @@
1
1
  import type UI5Element from "../../src/UI5Element.js";
2
- import "../../test/test-elements/Generic.js";
2
+ import Generic from "../../test/test-elements/Generic.js";
3
3
 
4
4
  describe("Lifecycle works", () => {
5
5
  it("Tests that changing a property invalidates", () => {
6
6
  const el = document.createElement("ui5-test-generic");
7
7
 
8
- cy.mount(`<div id="container"></div>`);
8
+ cy.mount(<div id="container"></div>);
9
9
 
10
10
  cy.spy<UI5Element>((el as UI5Element), "onBeforeRendering").as("onBeforeRendering");
11
11
 
@@ -32,7 +32,7 @@ describe("Lifecycle works", () => {
32
32
  });
33
33
 
34
34
  it("Tests element invalidation callbacks", () => {
35
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
35
+ cy.mount(<Generic></Generic>);
36
36
 
37
37
  cy.get("[ui5-test-generic]")
38
38
  .as("testGeneric")
@@ -56,7 +56,7 @@ describe("Lifecycle works", () => {
56
56
  it("Tests element destruction callback", () => {
57
57
  const el = document.createElement("ui5-test-generic");
58
58
 
59
- cy.mount(`<div id="container"></div>`);
59
+ cy.mount(<div id="container"></div>);
60
60
 
61
61
  cy.spy<UI5Element>((el as UI5Element), "onExitDOM").as("onExitDOM");
62
62
  cy.spy<UI5Element>((el as UI5Element), "onEnterDOM").as("onEnterDOM");
@@ -1,13 +1,20 @@
1
1
  import type UI5Element from "../../src/UI5Element.js";
2
2
 
3
- import "../../test/test-elements/Parent.js";
4
- import "../../test/test-elements/Child.js";
3
+ import Parent from "../../test/test-elements/Parent.js";
4
+ import Child from "../../test/test-elements/Child.js";
5
5
 
6
6
  describe("Invalidation works", () => {
7
7
  it("Tests that changing a monitored property of a child invalidates the parent", () => {
8
- cy.mount(`<ui5-test-parent>
9
- <ui5-test-child></ui5-test-child>
10
- </ui5-test-parent>`);
8
+ cy.mount(
9
+ <Parent>
10
+ <Child></Child>
11
+ </Parent>
12
+ );
13
+
14
+ cy.get<Parent>("[ui5-test-parent]")
15
+ .should($el => {
16
+ expect($el[0].getDomRef()).to.exist;
17
+ });
11
18
 
12
19
  cy.get("[ui5-test-parent]")
13
20
  .as("testParent")
@@ -23,9 +30,16 @@ describe("Invalidation works", () => {
23
30
  });
24
31
 
25
32
  it("Tests that changing a non-monitored property of a child does not invalidate the parent", () => {
26
- cy.mount(`<ui5-test-parent>
27
- <ui5-test-child></ui5-test-child>
28
- </ui5-test-parent>`);
33
+ cy.mount(
34
+ <Parent>
35
+ <Child></Child>
36
+ </Parent>
37
+ );
38
+
39
+ cy.get<Parent>("[ui5-test-parent]")
40
+ .should($el => {
41
+ expect($el[0].getDomRef()).to.exist;
42
+ });
29
43
 
30
44
  cy.get("[ui5-test-parent]")
31
45
  .as("testParent")
@@ -41,9 +55,16 @@ describe("Invalidation works", () => {
41
55
  });
42
56
 
43
57
  it("Tests that changing a non-monitored property of a child does not invalidate the parent", () => {
44
- cy.mount(`<ui5-test-parent>
45
- <ui5-test-child slot="items"></ui5-test-child>
46
- </ui5-test-parent>`);
58
+ cy.mount(
59
+ <Parent>
60
+ <Child slot="items"></Child>
61
+ </Parent>
62
+ );
63
+
64
+ cy.get<Parent>("[ui5-test-parent]")
65
+ .should($el => {
66
+ expect($el[0].getDomRef()).to.exist;
67
+ });
47
68
 
48
69
  cy.get("[ui5-test-parent]")
49
70
  .as("testParent")
@@ -1,9 +1,9 @@
1
1
  import type UI5Element from "../../src/UI5Element.js";
2
- import "../../test/test-elements/GenericExt.js";
2
+ import GenericExt from "../../test/test-elements/GenericExt.js";
3
3
 
4
4
  describe("Invalidation works", () => {
5
5
  it("Tests that changing a monitored property of a child invalidates the parent", () => {
6
- cy.mount(`<ui5-test-generic-ext></ui5-test-generic-ext>`);
6
+ cy.mount(<GenericExt></GenericExt>);
7
7
 
8
8
  cy.get("[ui5-test-generic-ext]")
9
9
  .then($el => {
@@ -33,7 +33,7 @@ describe("Invalidation works", () => {
33
33
  });
34
34
 
35
35
  it("When extending metadata, property defaultValue can be modified", () => {
36
- cy.mount(`<ui5-test-generic-ext></ui5-test-generic-ext>`);
36
+ cy.mount(<GenericExt></GenericExt>);
37
37
 
38
38
  cy.get("[ui5-test-generic-ext]")
39
39
  .invoke("attr", "str-prop")
@@ -1,8 +1,8 @@
1
- import "../../test/test-elements/Generic.js";
1
+ import Generic from "../../test/test-elements/Generic.js";
2
2
 
3
3
  describe("Properties can only have values, restricted to their types", () => {
4
4
  it("String property enforced to string", () => {
5
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
5
+ cy.mount(<Generic></Generic>);
6
6
 
7
7
  cy.get("[ui5-test-generic]")
8
8
  .as("testGeneric");
@@ -1,8 +1,8 @@
1
- import "../../test/test-elements/Generic.js";
1
+ import Generic from "../../test/test-elements/Generic.js";
2
2
 
3
3
  describe("Properties and attributes convert to each other", () => {
4
4
  it("Tests that properties with default values are initialized with the default value", () => {
5
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
5
+ cy.mount(<Generic></Generic>);
6
6
 
7
7
  cy.get("[ui5-test-generic]")
8
8
  .as("testGeneric");
@@ -13,7 +13,7 @@ describe("Properties and attributes convert to each other", () => {
13
13
  });
14
14
 
15
15
  it("Tests that prop-attr conversion works for string properties", () => {
16
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
16
+ cy.mount(<Generic></Generic>);
17
17
 
18
18
  cy.get("[ui5-test-generic]")
19
19
  .as("testGeneric");
@@ -33,7 +33,7 @@ describe("Properties and attributes convert to each other", () => {
33
33
  });
34
34
 
35
35
  it("Tests that prop-attr conversion works for boolean properties", () => {
36
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
36
+ cy.mount(<Generic></Generic>);
37
37
 
38
38
  cy.get("[ui5-test-generic]")
39
39
  .as("testGeneric");
@@ -66,7 +66,7 @@ describe("Properties and attributes convert to each other", () => {
66
66
  });
67
67
 
68
68
  it("Tests that object properties have no attributes", () => {
69
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
69
+ cy.mount(<Generic></Generic>);
70
70
 
71
71
  cy.get("[ui5-test-generic]")
72
72
  .as("testGeneric");
@@ -79,7 +79,7 @@ describe("Properties and attributes convert to each other", () => {
79
79
  });
80
80
 
81
81
  it("Tests that array properties have no attributes", () => {
82
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
82
+ cy.mount(<Generic></Generic>);
83
83
 
84
84
  cy.get("[ui5-test-generic]")
85
85
  .as("testGeneric");
@@ -92,7 +92,7 @@ describe("Properties and attributes convert to each other", () => {
92
92
  });
93
93
 
94
94
  it("Tests that noAttribute properties have no attributes", () => {
95
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
95
+ cy.mount(<Generic></Generic>);
96
96
 
97
97
  cy.get("[ui5-test-generic]")
98
98
  .as("testGeneric");
@@ -105,7 +105,7 @@ describe("Properties and attributes convert to each other", () => {
105
105
  });
106
106
 
107
107
  it("Tests that properties with default values do automatically set attributes", () => {
108
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
108
+ cy.mount(<Generic></Generic>);
109
109
 
110
110
  cy.get("[ui5-test-generic]")
111
111
  .should("have.attr", "default-value-prop", "Hello");
@@ -1,9 +1,9 @@
1
- import "../../test/test-elements/Generic.js";
2
- import "../../test/test-elements/NoShadowDOM.js";
1
+ import Generic from "../../test/test-elements/Generic.js";
2
+ import NoShadowDOM from "../../test/test-elements/NoShadowDOM.js";
3
3
 
4
4
  describe("The framework can define web components", () => {
5
5
  it("Tests that element's Shadow DOM is rendered if it has a template", () => {
6
- cy.mount(`<ui5-test-generic></ui5-test-generic>`);
6
+ cy.mount(<Generic></Generic>);
7
7
 
8
8
  cy.get("[ui5-test-generic]")
9
9
  .as("testGeneric")
@@ -19,7 +19,7 @@ describe("The framework can define web components", () => {
19
19
  });
20
20
 
21
21
  it("Tests that element's Shadow DOM is not rendered if it has no template", () => {
22
- cy.mount(`<ui5-test-no-shadow></ui5-test-no-shadow>`);
22
+ cy.mount(<NoShadowDOM></NoShadowDOM>);
23
23
 
24
24
  cy.get("[ui5-test-no-shadow]")
25
25
  .then($element => {
@@ -1,20 +1,26 @@
1
- import "../../test/test-elements/Generic.js";
1
+ import Generic from "../../test/test-elements/Generic.js";
2
2
 
3
3
  describe("Slots work properly", () => {
4
4
  it("Tests that properties exist on the element for each slot", () => {
5
- cy.mount(`<ui5-test-generic>
6
- Default slot text
7
- <span>Default slot content</span>
8
- <span slot="other">Other slot content 1</span>
9
- <span slot="other">Other slot content 2</span>
10
- <span slot="individual">Individual slot content 1</span>
11
- <span slot="individual">Individual slot content 2</span>
12
- <span slot="named">Item in slot with propertyName</span>
13
- <span slot="named">Item in slot with propertyName</span>
14
- <span slot="row-header">Item in slot row-header</span>
15
- <span slot="row-header">Item in slot row-header</span>
16
- </ui5-test-generic>
17
- `);
5
+ cy.mount(
6
+ <Generic>
7
+ Default slot text
8
+ <span>Default slot content</span>
9
+ <span slot="other">Other slot content 1</span>
10
+ <span slot="other">Other slot content 2</span>
11
+ <span slot="individual">Individual slot content 1</span>
12
+ <span slot="individual">Individual slot content 2</span>
13
+ <span slot="named">Item in slot with propertyName</span>
14
+ <span slot="named">Item in slot with propertyName</span>
15
+ <span slot="row-header">Item in slot row-header</span>
16
+ <span slot="row-header">Item in slot row-header</span>
17
+ </Generic>
18
+ );
19
+
20
+ cy.get<Generic>("[ui5-test-generic]")
21
+ .should($el => {
22
+ expect($el[0].getDomRef()).to.exist;
23
+ });
18
24
 
19
25
  cy.get("[ui5-test-generic]")
20
26
  .as("testGeneric");
@@ -44,11 +50,19 @@ describe("Slots work properly", () => {
44
50
  });
45
51
 
46
52
  it("Tests that properties exist on the element for each slot", () => {
47
- cy.mount(`<ui5-test-generic>
48
- <span slot="individual">Individual slot content 1</span>
49
- <span slot="individual">Individual slot content 2</span>
50
- </ui5-test-generic>
51
- `);
53
+ cy.mount(
54
+ <Generic>
55
+ <span slot="individual">Individual slot content 1</span>
56
+ <span slot="individual">Individual slot content 2</span>
57
+ </Generic>
58
+ );
59
+
60
+ cy.get<Generic>("[ui5-test-generic]")
61
+ .should($el => {
62
+ expect($el[0].getDomRef()).to.exist;
63
+ });
64
+
65
+ cy.get("[ui5-test-generic]");
52
66
 
53
67
  cy.get("[slot=individual]")
54
68
  .should("not.exist");
@@ -63,14 +77,20 @@ describe("Slots work properly", () => {
63
77
  it("Tests that changing the slot attribute of children redistributes them across slot accessors", () => {
64
78
  let defaultSlotLength = 0;
65
79
 
66
- cy.mount(`<ui5-test-generic>
67
- <span>Default slot content</span>
68
- <span slot="other" id="o1">Other slot content 1</span>
69
- <span slot="other" id="o2">Other slot content 2</span>
70
- <span slot="named">Item in slot with propertyName</span>
71
- <span slot="named">Item in slot with propertyName</span>
72
- </ui5-test-generic>
73
- `);
80
+ cy.mount(
81
+ <Generic>
82
+ <span>Default slot content</span>
83
+ <span slot="other" id="o1">Other slot content 1</span>
84
+ <span slot="other" id="o2">Other slot content 2</span>
85
+ <span slot="named">Item in slot with propertyName</span>
86
+ <span slot="named">Item in slot with propertyName</span>
87
+ </Generic>
88
+ );
89
+
90
+ cy.get<Generic>("[ui5-test-generic]")
91
+ .should($el => {
92
+ expect($el[0].getDomRef()).to.exist;
93
+ });
74
94
 
75
95
  cy.get("[ui5-test-generic]")
76
96
  .as("testGeneric");
@@ -1,11 +1,11 @@
1
- import "../../test/test-elements/WithComplexTemplate.js";
1
+ import WithComplexTemplate from "../../test/test-elements/WithComplexTemplate.js";
2
2
 
3
3
  describe("Complex templates", () => {
4
4
  it("Tests context maintained in the HBS template before, after and inside 'each' statements", () => {
5
5
  const EXPTECTED_LOOP_CONTENT = "Root text: root, Item text: positives";
6
6
  const EXPTECTED_NESTED_LOOP_CONTENT = "Root Text: root, Word text: word1_good";
7
7
 
8
- cy.mount(`<ui5-test-complex-template></ui5-test-complex-template>`);
8
+ cy.mount(<WithComplexTemplate />);
9
9
 
10
10
  cy.get("[ui5-test-complex-template]")
11
11
  .shadow()
@@ -8,6 +8,8 @@
8
8
  "outDir": "dist",
9
9
  "composite": true,
10
10
  "tsBuildInfoFile": "dist/.tsbuildinfobuild",
11
+ "module": "NodeNext",
12
+ "moduleResolution": "nodenext",
11
13
  },
12
14
  "references": [
13
15
  {