@ui5/webcomponents-base 2.1.0 → 2.2.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.
Files changed (117) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/cypress/specs/Accessor.cy.ts +83 -0
  3. package/cypress/specs/Boot.cy.ts +23 -0
  4. package/cypress/specs/ConfigurationChange.cy.ts +41 -0
  5. package/cypress/specs/ConfigurationScript.cy.ts +116 -0
  6. package/cypress/specs/ConfigurationURL.cy.ts +182 -0
  7. package/cypress/specs/CustomMount.cy.ts +34 -0
  8. package/cypress/specs/CustomTheme.cy.ts +36 -0
  9. package/cypress/specs/EventProvider.cy.ts +59 -0
  10. package/cypress/specs/SystemDOMElements.cy.ts +8 -0
  11. package/cypress/specs/Theming.cy.ts +74 -0
  12. package/cypress/specs/UI5ElementInvalidation.cy.ts +207 -0
  13. package/cypress/specs/UI5ElementLifecycle.cy.ts +82 -0
  14. package/cypress/specs/UI5ElementListenForChildPropChanges.cy.ts +62 -0
  15. package/cypress/specs/UI5ElementMetadataExt.cy.ts +42 -0
  16. package/cypress/specs/UI5ElementPropertyValidation.cy.ts +17 -0
  17. package/cypress/specs/UI5ElementPropsAndAttrs.cy.ts +113 -0
  18. package/cypress/specs/UI5ElementShadowDOM.cy.ts +30 -0
  19. package/cypress/specs/UI5ElementSlots.cy.ts +116 -0
  20. package/cypress/specs/WithComplexTemplate.cy.ts +32 -0
  21. package/cypress/tsconfig.json +20 -0
  22. package/cypress.config.js +3 -0
  23. package/dist/.tsbuildinfobuild +1 -0
  24. package/dist/InitialConfiguration.d.ts +7 -1
  25. package/dist/InitialConfiguration.js +20 -3
  26. package/dist/InitialConfiguration.js.map +1 -1
  27. package/dist/Location.d.ts +10 -0
  28. package/dist/Location.js +43 -0
  29. package/dist/Location.js.map +1 -0
  30. package/dist/Runtimes.js +11 -0
  31. package/dist/Runtimes.js.map +1 -1
  32. package/dist/UI5Element.js +19 -11
  33. package/dist/UI5Element.js.map +1 -1
  34. package/dist/config/AnimationMode.js +4 -0
  35. package/dist/config/AnimationMode.js.map +1 -1
  36. package/dist/config/CalendarType.js +5 -0
  37. package/dist/config/CalendarType.js.map +1 -1
  38. package/dist/config/ConfigurationReset.d.ts +4 -0
  39. package/dist/config/ConfigurationReset.js +11 -0
  40. package/dist/config/ConfigurationReset.js.map +1 -0
  41. package/dist/config/Fonts.js +4 -0
  42. package/dist/config/Fonts.js.map +1 -1
  43. package/dist/config/FormatSettings.js +4 -0
  44. package/dist/config/FormatSettings.js.map +1 -1
  45. package/dist/config/Language.js +6 -1
  46. package/dist/config/Language.js.map +1 -1
  47. package/dist/config/NoConflict.js +4 -0
  48. package/dist/config/NoConflict.js.map +1 -1
  49. package/dist/config/Theme.js +4 -0
  50. package/dist/config/Theme.js.map +1 -1
  51. package/dist/config/ThemeRoot.js +4 -0
  52. package/dist/config/ThemeRoot.js.map +1 -1
  53. package/dist/config/Timezone.js +4 -0
  54. package/dist/config/Timezone.js.map +1 -1
  55. package/dist/config/Tooltips.d.ts +19 -0
  56. package/dist/config/Tooltips.js +29 -0
  57. package/dist/config/Tooltips.js.map +1 -0
  58. package/dist/custom-elements-internal.json +48 -0
  59. package/dist/custom-elements.json +48 -0
  60. package/dist/decorators/query.d.ts +25 -0
  61. package/dist/decorators/query.js +32 -0
  62. package/dist/decorators/query.js.map +1 -0
  63. package/dist/decorators/queryAll.d.ts +27 -0
  64. package/dist/decorators/queryAll.js +34 -0
  65. package/dist/decorators/queryAll.js.map +1 -0
  66. package/dist/generated/VersionInfo.js +4 -4
  67. package/dist/generated/VersionInfo.js.map +1 -1
  68. package/dist/prod/InitialConfiguration.js +1 -1
  69. package/dist/prod/InitialConfiguration.js.map +3 -3
  70. package/dist/prod/Location.js +2 -0
  71. package/dist/prod/Location.js.map +7 -0
  72. package/dist/prod/Runtimes.js +1 -1
  73. package/dist/prod/Runtimes.js.map +3 -3
  74. package/dist/prod/UI5Element.js +1 -1
  75. package/dist/prod/UI5Element.js.map +2 -2
  76. package/dist/prod/config/AnimationMode.js +1 -1
  77. package/dist/prod/config/AnimationMode.js.map +3 -3
  78. package/dist/prod/config/CalendarType.js +1 -1
  79. package/dist/prod/config/CalendarType.js.map +3 -3
  80. package/dist/prod/config/ConfigurationReset.js +2 -0
  81. package/dist/prod/config/ConfigurationReset.js.map +7 -0
  82. package/dist/prod/config/Fonts.js +1 -1
  83. package/dist/prod/config/Fonts.js.map +3 -3
  84. package/dist/prod/config/FormatSettings.js +1 -1
  85. package/dist/prod/config/FormatSettings.js.map +3 -3
  86. package/dist/prod/config/Language.js +1 -1
  87. package/dist/prod/config/Language.js.map +3 -3
  88. package/dist/prod/config/NoConflict.js +1 -1
  89. package/dist/prod/config/NoConflict.js.map +3 -3
  90. package/dist/prod/config/Theme.js +1 -1
  91. package/dist/prod/config/Theme.js.map +3 -3
  92. package/dist/prod/config/ThemeRoot.js +1 -1
  93. package/dist/prod/config/ThemeRoot.js.map +3 -3
  94. package/dist/prod/config/Timezone.js +1 -1
  95. package/dist/prod/config/Timezone.js.map +3 -3
  96. package/dist/prod/config/Tooltips.js +2 -0
  97. package/dist/prod/config/Tooltips.js.map +7 -0
  98. package/dist/prod/decorators/query.js +2 -0
  99. package/dist/prod/decorators/query.js.map +7 -0
  100. package/dist/prod/decorators/queryAll.js +2 -0
  101. package/dist/prod/decorators/queryAll.js.map +7 -0
  102. package/dist/prod/generated/VersionInfo.js +1 -1
  103. package/dist/prod/generated/VersionInfo.js.map +2 -2
  104. package/dist/prod/validateThemeRoot.js +1 -1
  105. package/dist/prod/validateThemeRoot.js.map +3 -3
  106. package/dist/validateThemeRoot.js +3 -2
  107. package/dist/validateThemeRoot.js.map +1 -1
  108. package/package-scripts.cjs +5 -3
  109. package/package.json +4 -3
  110. package/tsconfig.json +19 -19
  111. package/config/wdio.conf.cjs +0 -392
  112. package/dist/.tsbuildinfo +0 -1
  113. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.d.ts +0 -4
  114. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js +0 -9
  115. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.js.map +0 -1
  116. package/dist/prod/generated/templates/elements/WithComplexTemplateTemplate.lit.js +0 -2
  117. package/dist/prod/generated/templates/elements/WithComplexTemplateTemplate.lit.js.map +0 -7
@@ -1,392 +0,0 @@
1
- exports.config = {
2
- //
3
- // ====================
4
- // Runner Configuration
5
- // ====================
6
- //
7
- // WebdriverIO allows it to run your tests in arbitrary locations (e.g. locally or
8
- // on a remote machine).
9
- runner: 'local',
10
-
11
- //
12
- // ==================
13
- // Specify Test Files
14
- // ==================
15
- // Define which test specs should run. The pattern is relative to the directory
16
- // from which `wdio` was called. Notice that, if you are calling `wdio` from an
17
- // NPM script (see https://docs.npmjs.com/cli/run-script) then the current working
18
- // directory is where your package.json resides, so `wdio` will be called from there.
19
- //
20
- specs: [
21
- './test/specs/**/*.js'
22
- ],
23
- // Patterns to exclude.
24
- exclude: [
25
- // 'path/to/excluded/files'
26
- ],
27
- //
28
- // ============
29
- // Capabilities
30
- // ============
31
- // Define your capabilities here. WebdriverIO can run multiple capabilities at the same
32
- // time. Depending on the number of capabilities, WebdriverIO launches several test
33
- // sessions. Within your capabilities you can overwrite the spec and exclude options in
34
- // order to group specific specs to a specific capability.
35
- //
36
- // First, you can define how many instances should be started at the same time. Let's
37
- // say you have 3 different capabilities (Chrome, Firefox, and Safari) and you have
38
- // set maxInstances to 1; wdio will spawn 3 processes. Therefore, if you have 10 spec
39
- // files and you set maxInstances to 10, all spec files will get tested at the same time
40
- // and 30 processes will get spawned. The property handles how many capabilities
41
- // from the same test should run tests.
42
- //
43
- maxInstances: 10,
44
- //
45
- // If you have trouble getting all important capabilities together, check out the
46
- // Sauce Labs platform configurator - a great tool to configure your capabilities:
47
- // https://docs.saucelabs.com/reference/platforms-configurator
48
- //
49
- capabilities: [{
50
- // maxInstances can get overwritten per capability. So if you have an in-house Selenium
51
- // grid with only 5 firefox instances available you can make sure that not more than
52
- // 5 instances get started at a time.
53
- maxInstances: 5,
54
- //
55
- browserName: 'chrome',
56
- 'goog:chromeOptions': {
57
- // to run chrome headless the following flags are required
58
- // (see https://developers.google.com/web/updates/2017/04/headless-chrome)
59
- args: [
60
- 'headless', // start in headless mode
61
- 'start-maximized', // maximize the window
62
- 'no-sandbox', // disable sandbox isolation
63
- 'disable-infobars', // disable the infos
64
- 'disable-gpu', // on windows disable gpu hw acceleration
65
- 'disable-extensions', // disable extensions
66
- 'disable-dev-shm-usage' // disable /dev/shm in CI
67
- ],
68
- }
69
- }],
70
- //
71
- // port to find chromedriver
72
- port: 9515, // default
73
- // ===================
74
- // Test Configurations
75
- // ===================
76
- // Define all options that are relevant for the WebdriverIO instance here
77
- //
78
- // Level of logging verbosity: trace | debug | info | warn | error
79
- logLevel: 'error',
80
- //
81
- // Warns when a deprecated command is used
82
- deprecationWarnings: true,
83
- //
84
- // If you only want to run your tests until a specific amount of tests have failed use
85
- // bail (default is 0 - don't bail, run all tests).
86
- bail: 0,
87
- //
88
- // Set a base URL in order to shorten url command calls. If your `url` parameter starts
89
- // with `/`, the base url gets prepended, not including the path portion of your baseUrl.
90
- // If your `url` parameter starts without a scheme or `/` (like `some/path`), the base url
91
- // gets prepended directly.
92
- baseUrl: 'http://localhost:4567', // This is important since WDIO 7+ does not accept an empty string for baseUrl
93
- path: '',
94
- //
95
- // Default timeout for all waitFor* commands.
96
- waitforTimeout: 10000,
97
- //
98
- // Default timeout in milliseconds for request
99
- // if Selenium Grid doesn't send response
100
- connectionRetryTimeout: 90000,
101
- //
102
- // Default request retries count
103
- connectionRetryCount: 3,
104
- //
105
- // Test runner services
106
- // Services take over a specific job you don't want to take care of. They enhance
107
- // your test setup with almost no effort. Unlike plugins, they don't add new
108
- // commands. Instead, they hook themselves up into the test process.
109
- services: ['chromedriver', 'devtools',
110
- ['static-server', {
111
- folders: [
112
- { mount: '/', path: './dist' },
113
- ],
114
- port: '4567',
115
- }],
116
- ],
117
- // options
118
- chromeDriverArgs: ['--port=9515'], // default
119
- // Framework you want to run your specs with.
120
- // The following are supported: Mocha, Jasmine, and Cucumber
121
- // see also: https://webdriver.io/docs/frameworks.html
122
- //
123
- // Make sure you have the wdio adapter package for the specific framework installed
124
- // before running any tests.
125
- framework: 'mocha',
126
- //
127
- // Test reporter for stdout.
128
- // The only one supported by default is 'dot'
129
- // see also: https://webdriver.io/docs/dot-reporter.html
130
- reporters: ['dot', 'spec'],
131
-
132
- //
133
- // Options to be passed to Mocha.
134
- // See the full list at http://mochajs.org/
135
- mochaOpts: {
136
- ui: 'bdd',
137
- timeout: 60000
138
- },
139
- //
140
- // =====
141
- // Hooks
142
- // =====
143
- // WebdriverIO provides several hooks you can use to interfere with the test process in order to enhance
144
- // it and to build services around it. You can either apply a single function or an array of
145
- // methods to it. If one of them returns with a promise, WebdriverIO will wait until that promise got
146
- // resolved to continue.
147
- /**
148
- * Gets executed once before all workers get launched.
149
- * @param {Object} config wdio configuration object
150
- * @param {Array.<Object>} capabilities list of capabilities details
151
- */
152
- // onPrepare: function (config, capabilities) {
153
- // },
154
- /**
155
- * Gets executed just before initialising the webdriver session and test framework. It allows you
156
- * to manipulate configurations depending on the capability or spec.
157
- * @param {Object} config wdio configuration object
158
- * @param {Array.<Object>} capabilities list of capabilities details
159
- * @param {Array.<String>} specs List of spec file paths that are to be run
160
- */
161
- // beforeSession: function (config, capabilities, specs) {
162
- // },
163
- /**
164
- * Gets executed before test execution begins. At this point you can access to all global
165
- * variables like `browser`. It is the perfect place to define custom commands.
166
- * @param {Array.<Object>} capabilities list of capabilities details
167
- * @param {Array.<String>} specs List of spec file paths that are to be run
168
- */
169
- before: async function (capabilities, specs) {
170
- await browser.addCommand("isFocusedDeep", async function () {
171
- return browser.executeAsync(function (elem, done) {
172
- let activeElement = document.activeElement;
173
-
174
- while (activeElement.shadowRoot) {
175
- if (activeElement.shadowRoot.activeElement) {
176
- activeElement = activeElement.shadowRoot.activeElement;
177
- } else {
178
- break;
179
- }
180
- }
181
- done(elem === activeElement);
182
- }, this);
183
- }, true);
184
-
185
- await browser.addCommand("isFocusedDeepElement", async function (element) {
186
- return browser.executeAsync(function (elem, element, done) {
187
- let activeElement = document.activeElement;
188
-
189
- while (activeElement.shadowRoot) {
190
- if (activeElement.shadowRoot.activeElement) {
191
- activeElement = activeElement.shadowRoot.activeElement;
192
- } else {
193
- break;
194
- }
195
- }
196
- done(element === activeElement);
197
- }, this, element);
198
- }, true);
199
-
200
- await browser.addCommand("setProperty", async function(property, value) {
201
- return browser.executeAsync((elem, property, value, done) => {
202
- elem[property] = value;
203
- done();
204
- }, this, property, value);
205
- }, true);
206
-
207
- await browser.addCommand("setAttribute", async function(attribute, value) {
208
- return browser.executeAsync((elem, attribute, value, done) => {
209
- elem.setAttribute(attribute, value);
210
- done();
211
- }, this, attribute, value);
212
- }, true);
213
-
214
- await browser.addCommand("removeAttribute", async function(attribute) {
215
- return browser.executeAsync((elem, attribute, done) => {
216
- elem.removeAttribute(attribute);
217
- done();
218
- }, this, attribute);
219
- }, true);
220
-
221
- await browser.addCommand("hasClass", async function(className) {
222
- return browser.executeAsync((elem, className, done) => {
223
- done(elem.classList.contains(className));
224
- }, this, className);
225
- }, true);
226
-
227
- await browser.addCommand("hasAttribute", async function(attrName) {
228
- return browser.executeAsync((elem, attrName, done) => {
229
- done(elem.hasAttribute(attrName));
230
- }, this, attrName);
231
- }, true);
232
-
233
- await browser.addLocatorStrategy('activeElement', (selector) => {
234
- return document.querySelector(selector).shadowRoot.activeElement;
235
- });
236
- },
237
- /**
238
- * Runs before a WebdriverIO command gets executed.
239
- * @param {String} commandName hook command name
240
- * @param {Array} args arguments that command would receive
241
- */
242
- beforeCommand: async function (commandName, args) {
243
- const waitFor = [
244
- "$",
245
- "$$",
246
- "getAttribute",
247
- "hasAttribute", // custom
248
- "getCSSProperty",
249
- "getHTML",
250
- "getProperty",
251
- "getSize",
252
- "getText",
253
- "getValue",
254
- "hasClass", // custom
255
- "isDisplayed",
256
- "isDisplayedInViewport",
257
- "isEnabled",
258
- "isExisting",
259
- "isFocused",
260
- "isFocusedDeep", // custom
261
- "isFocusedDeepElement", // custom
262
- "shadow$",
263
- "shadow$$",
264
- ];
265
- if (waitFor.includes(commandName)) {
266
- await browser.executeAsync(function (done) {
267
- window["sap-ui-webcomponents-bundle"].renderFinished().then(done);
268
- });
269
- }
270
- },
271
-
272
- /**
273
- * Hook that gets executed before the suite starts
274
- * @param {Object} suite suite details
275
- */
276
- // beforeSuite: function (suite) {
277
- // },
278
- /**
279
- * Function to be executed before a test (in Mocha/Jasmine) or a step (in Cucumber) starts.
280
- * @param {Object} test test details
281
- */
282
- // beforeTest: function (test) {
283
- // },
284
- /**
285
- * Hook that gets executed _before_ a hook within the suite starts (e.g. runs before calling
286
- * beforeEach in Mocha)
287
- */
288
- // beforeHook: function () {
289
- // },
290
- /**
291
- * Hook that gets executed _after_ a hook within the suite starts (e.g. runs after calling
292
- * afterEach in Mocha)
293
- */
294
- // afterHook: function () {
295
- // },
296
- /**
297
- * Function to be executed after a test (in Mocha/Jasmine) or a step (in Cucumber) starts.
298
- * @param {Object} test test details
299
- */
300
- // afterTest: function (test) {
301
- // },
302
- /**
303
- * Hook that gets executed after the suite has ended
304
- * @param {Object} suite suite details
305
- */
306
- // afterSuite: function (suite) {
307
- // },
308
-
309
- /**
310
- * Runs after a WebdriverIO command gets executed
311
- * @param {String} commandName hook command name
312
- * @param {Array} args arguments that command would receive
313
- * @param {Number} result 0 - command success, 1 - command error
314
- * @param {Object} error error object if any
315
- */
316
- afterCommand: async function (commandName, args, result, error) {
317
-
318
- // url -> set configuration first
319
- if (commandName === "url" && !args[0].includes("do-not-change-configuration")) {
320
- await browser.executeAsync(function(done) {
321
- window["sap-ui-webcomponents-bundle"].configuration.setNoConflict(true);
322
- done();
323
- });
324
- }
325
-
326
- const waitFor = [
327
- "addValue",
328
- "clearValue",
329
- "click",
330
- "doubleClick",
331
- "dragAndDrop",
332
- "pause",
333
- "removeAttribute", // custom
334
- "scrollIntoView",
335
- "setAttribute", // custom
336
- "setProperty", // custom
337
- "setValue",
338
- "setWindowSize",
339
- "touchAction",
340
- "url",
341
- ];
342
-
343
- const waitForWithDelay = [
344
- "keys",
345
- ];
346
-
347
- if (waitFor.includes(commandName)) {
348
- await browser.executeAsync(function (done) {
349
- window["sap-ui-webcomponents-bundle"].renderFinished().then(done);
350
- });
351
- } else if (waitForWithDelay.includes(commandName)) {
352
- await browser.executeAsync(function (done) {
353
- setTimeout(() => {
354
- window["sap-ui-webcomponents-bundle"].renderFinished().then(done);
355
- }, 10);
356
- });
357
- }
358
- },
359
- /**
360
- * Gets executed after all tests are done. You still have access to all global variables from
361
- * the test.
362
- * @param {Number} result 0 - test pass, 1 - test fail
363
- * @param {Array.<Object>} capabilities list of capabilities details
364
- * @param {Array.<String>} specs List of spec file paths that ran
365
- */
366
- // after: function (result, capabilities, specs) {
367
- // },
368
- /**
369
- * Gets executed right after terminating the webdriver session.
370
- * @param {Object} config wdio configuration object
371
- * @param {Array.<Object>} capabilities list of capabilities details
372
- * @param {Array.<String>} specs List of spec file paths that ran
373
- */
374
- // afterSession: function (config, capabilities, specs) {
375
- // },
376
- /**
377
- * Gets executed after all workers got shut down and the process is about to exit.
378
- * @param {Object} exitCode 0 - success, 1 - fail
379
- * @param {Object} config wdio configuration object
380
- * @param {Array.<Object>} capabilities list of capabilities details
381
- * @param {<Object>} results object containing test results
382
- */
383
- // onComplete: function(exitCode, config, capabilities, results) {
384
- // },
385
- /**
386
- * Gets executed when a refresh happens.
387
- * @param {String} oldSessionId session ID of the old session
388
- * @param {String} newSessionId session ID of the new session
389
- */
390
- //onReload: function(oldSessionId, newSessionId) {
391
- //}
392
- }