@ui5/webcomponents-base 1.4.0 → 1.5.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 +14 -0
- package/README.md +27 -6
- package/bundle.esm.js +7 -9
- package/dist/CustomElementsRegistry.js +1 -1
- package/dist/asset-registries/LocaleData.js +1 -1
- package/dist/asset-registries/i18n.js +3 -1
- package/dist/assets/bundle.esm.a812dc7f.js +43 -0
- package/dist/delegate/ItemNavigation.js +9 -4
- package/dist/features/F6Navigation.js +4 -0
- package/dist/generated/VersionInfo.js +3 -3
- package/dist/updateShadowRoot.js +1 -2
- package/dist/util/Caret.js +1 -14
- package/dist/util/isDefaultSlotProvided.js +11 -0
- package/package-scripts.js +14 -16
- package/package.json +4 -3
- package/src/CustomElementsRegistry.js +1 -1
- package/src/asset-registries/LocaleData.js +1 -1
- package/src/asset-registries/i18n.js +3 -1
- package/src/delegate/ItemNavigation.js +9 -4
- package/src/features/F6Navigation.js +4 -0
- package/src/updateShadowRoot.js +1 -2
- package/src/util/Caret.js +1 -14
- package/src/util/isDefaultSlotProvided.js +11 -0
- package/config/.eslintrc.js +0 -3
- package/config/rollup.config.js +0 -1
- package/dist/isLegacyBrowser.js +0 -3
- package/dist/resources/bundle.esm.js +0 -32
- package/dist/resources/bundle.esm.js.map +0 -1
- package/dist/test-resources/assets/Themes.js +0 -17
- package/dist/test-resources/elements/Child.js +0 -35
- package/dist/test-resources/elements/Generic.js +0 -84
- package/dist/test-resources/elements/GenericExt.js +0 -26
- package/dist/test-resources/elements/NoShadowDOM.js +0 -13
- package/dist/test-resources/elements/Parent.js +0 -41
- package/dist/test-resources/elements/WithStaticArea.js +0 -77
- package/dist/test-resources/pages/AllTestElements.html +0 -42
- package/dist/test-resources/pages/Configuration.html +0 -18
- package/dist/test-resources/pages/ConfigurationScript.html +0 -34
- package/dist/test-resources/pages/assets/messagebundle_de.properties +0 -1
- package/dist/test-resources/pages/assets/messagebundle_en.properties +0 -1
- package/dist/test-resources/pages/assets/messagebundle_es.properties +0 -1
- package/dist/test-resources/pages/assets/messagebundle_fr.properties +0 -1
- package/dist/test-resources/pages/i18n.html +0 -33
- package/dist/test-resources/specs/ConfigurationChange.spec.js +0 -27
- package/dist/test-resources/specs/ConfigurationScript.spec.js +0 -63
- package/dist/test-resources/specs/ConfigurationURL.spec.js +0 -93
- package/dist/test-resources/specs/CustomTheme.spec.js +0 -27
- package/dist/test-resources/specs/EventProvider.spec.js +0 -63
- package/dist/test-resources/specs/StaticArea.spec.js +0 -78
- package/dist/test-resources/specs/Theming.spec.js +0 -44
- package/dist/test-resources/specs/UI5ElementInvalidation.js +0 -242
- package/dist/test-resources/specs/UI5ElementLifecycle.js +0 -98
- package/dist/test-resources/specs/UI5ElementListenForChildPropChanges.spec.js +0 -75
- package/dist/test-resources/specs/UI5ElementMetadataExt.js +0 -42
- package/dist/test-resources/specs/UI5ElementPropertyValidation.js +0 -14
- package/dist/test-resources/specs/UI5ElementPropsAndAttrs.spec.js +0 -67
- package/dist/test-resources/specs/UI5ElementShadowDOM.js +0 -24
- package/dist/test-resources/specs/UI5ElementSlots.js +0 -36
- package/src/isLegacyBrowser.js +0 -3
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
const assert = require("chai").assert;
|
|
2
|
-
|
|
3
|
-
describe("Properties and attributes convert to each other", () => {
|
|
4
|
-
before(async () => {
|
|
5
|
-
await browser.url("http://localhost:9191/test-resources/pages/AllTestElements.html");
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
it("Tests that properties with default values are initialized with the default value", async () => {
|
|
9
|
-
const el = await browser.$("#gen");
|
|
10
|
-
|
|
11
|
-
assert.strictEqual(await el.getProperty("defaultValueProp"), "Hello", "defaultValueProp is properly initialized");
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
it("Tests that prop-attr conversion works for string properties", async () => {
|
|
15
|
-
const el = await browser.$("#gen");
|
|
16
|
-
|
|
17
|
-
await el.setProperty("strProp", "test1");
|
|
18
|
-
assert.strictEqual(await el.getAttribute("str-prop"), "test1", "Attribute affected by property change");
|
|
19
|
-
|
|
20
|
-
await el.setAttribute("str-prop", "test2");
|
|
21
|
-
assert.strictEqual(await el.getProperty("strProp"), "test2", "Property affected by attribute change");
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it("Tests that prop-attr conversion works for boolean properties", async () => {
|
|
25
|
-
const el = await browser.$("#gen");
|
|
26
|
-
|
|
27
|
-
await el.setProperty("boolProp", true);
|
|
28
|
-
assert.strictEqual(await el.getAttribute("bool-prop"), "", "Attribute affected by property change");
|
|
29
|
-
|
|
30
|
-
await el.setProperty("boolProp", false);
|
|
31
|
-
assert.strictEqual(await el.getAttribute("bool-prop"), null, "Attribute affected by property change");
|
|
32
|
-
|
|
33
|
-
await el.setAttribute("bool-prop", "");
|
|
34
|
-
assert.strictEqual(await el.getProperty("boolProp"), true, "Property affected by attribute change");
|
|
35
|
-
|
|
36
|
-
await el.removeAttribute("bool-prop");
|
|
37
|
-
assert.strictEqual(await el.getProperty("boolProp"), false, "Property affected by attribute change");
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it("Tests that object properties have no attributes", async () => {
|
|
41
|
-
const el = await browser.$("#gen");
|
|
42
|
-
|
|
43
|
-
await el.setProperty("objectProp", {});
|
|
44
|
-
assert.strictEqual(await el.getAttribute("object-prop"), null, "Attribute not there");
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
it("Tests that array properties have no attributes", async () => {
|
|
48
|
-
const el = await browser.$("#gen");
|
|
49
|
-
|
|
50
|
-
await el.setProperty("multiProp", ["a", "b"]);
|
|
51
|
-
assert.strictEqual(await el.getAttribute("multi-prop"), null, "Attribute not there");
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it("Tests that noAttribute properties have no attributes", async () => {
|
|
55
|
-
const el = await browser.$("#gen");
|
|
56
|
-
|
|
57
|
-
await el.setProperty("noAttributeProp", "some value");
|
|
58
|
-
assert.strictEqual(await el.getAttribute("no-attribute-prop"), null, "Attribute not there");
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
it("Tests that properties with default values do not automatically set attributes", async () => {
|
|
62
|
-
const el = await browser.$("#gen");
|
|
63
|
-
|
|
64
|
-
assert.strictEqual(await el.getAttribute("default-value-prop"), null, "Attribute not there for defaultValueProp");
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
});
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
const assert = require("chai").assert;
|
|
2
|
-
|
|
3
|
-
describe("The framework can define web components", () => {
|
|
4
|
-
before(async () => {
|
|
5
|
-
await browser.url("http://localhost:9191/test-resources/pages/AllTestElements.html");
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
it("Tests that element's Shadow DOM is rendered if it has a template", async () => {
|
|
9
|
-
const res = await browser.executeAsync(done => {
|
|
10
|
-
done(document.getElementById("gen").shadowRoot);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
assert.strictEqual(!!res, true, "Shadow root created");
|
|
14
|
-
assert.strictEqual(await browser.$("#gen").shadow$("div>p").isExisting(), true, "Shadow root content created");
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
it("Tests that element's Shadow DOM is not rendered if it has no template", async () => {
|
|
18
|
-
const res = await browser.executeAsync(done => {
|
|
19
|
-
done(document.getElementById("noShadow").shadowRoot);
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
assert.strictEqual(!!res, false, "Shadow root not created");
|
|
23
|
-
});
|
|
24
|
-
});
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
const assert = require("chai").assert;
|
|
2
|
-
|
|
3
|
-
describe("Slots work properly", () => {
|
|
4
|
-
before(async () => {
|
|
5
|
-
await browser.url("http://localhost:9191/test-resources/pages/AllTestElements.html");
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
it("Tests that properties exist on the element for each slot", async () => {
|
|
9
|
-
const res = await browser.executeAsync(done => {
|
|
10
|
-
const expectedValues = {};
|
|
11
|
-
|
|
12
|
-
const el = document.getElementById("withContent");
|
|
13
|
-
|
|
14
|
-
expectedValues.default = el.default.length > 0;
|
|
15
|
-
expectedValues.other = el.other.length === 2;
|
|
16
|
-
expectedValues.individual = el.individual.length === 2;
|
|
17
|
-
expectedValues.items = el.items.length === 2;
|
|
18
|
-
expectedValues.named = el.named === undefined;
|
|
19
|
-
|
|
20
|
-
done(expectedValues);
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
assert.strictEqual(res.default, true, "There are elements in the default property");
|
|
24
|
-
assert.strictEqual(res.other, true, "There are 2 elements in the other property");
|
|
25
|
-
assert.strictEqual(res.individual, true, "There are 2 elements in the individual property");
|
|
26
|
-
assert.strictEqual(res.items, true, "There are 2 elements in the items property");
|
|
27
|
-
assert.strictEqual(res.named, true, "There is no named property as propertyName changed it to items");
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it("Tests that individualSlots modifies the slot property of slotted children", async () => {
|
|
31
|
-
assert.strictEqual((await browser.$$("#withContent>[slot=individual]")).length, 0, "There are no children with slot=individual");
|
|
32
|
-
assert.strictEqual((await browser.$$("#withContent>[slot=individual-1]")).length, 1, "The slot of the first child became individual-1");
|
|
33
|
-
assert.strictEqual((await browser.$$("#withContent>[slot=individual-2]")).length, 1, "The slot of the second child became individual-2");
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
});
|
package/src/isLegacyBrowser.js
DELETED