Skip to content

Commit a34dd7a

Browse files
committed
OpenUI5 Documentation Update 31.01.2024
1 parent 0188979 commit a34dd7a

4 files changed

+4
-55
lines changed

docs/Annotation_Helper_dbec058.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,6 @@ The formatter functions can be used in binding expressions and `<template:if>` i
3030
3131
The following formatter functions exist:
3232

33-
- `createPropertySetting`: Creates a property setting which is either a constant value or a binding info object from the given parts and from the optional root formatter function. Each part can have one of the following types:
34-
35-
- boolean, number, undefined: The part is a constant value.
36-
37-
- string: The part is a data binding expression with complex binding syntax \(for example, as created by format\) and is parsed accordingly to create either a constant value or a binding info object. Proper backslash escaping must be used for constant values with curly braces.
38-
39-
- object: The part is a binding info object if it has a "path" or "parts" property, otherwise it is a constant value.
40-
41-
42-
If a binding info object is not the only part and has a `parts` property itself, then it must have no other properties except `formatter`. This applies to expression bindings and data binding expressions that are created by `format`. If all parts are constant values, the resulting property setting is also a constant value computed by applying the root formatter function to the constant parts once. If at least one part is a binding info object, the resulting property setting is also a binding info object and the root formatter function will be applied again and again to the current values of all parts, no matter whether constant or variable.
43-
44-
> ### Note:
45-
> The root formatter function should not rely on its `this` value because it depends on how the function is called.
46-
>
47-
> A single data binding expression can be given directly to `applySettings`; you do **not** need to call `this` function first.
48-
4933
- `format`: General purpose method that handles proper escaping and formatting of constant values and provides binding expressions with suitable types. `format` supports the following constructs:
5034

5135
- The *"14.4 Constant Expressions"* for *"edm:Bool"*, *"edm:Date"*, *"edm:DateTimeOffset"*, *"edm:Decimal"*, *"edm:Float"*, *"edm:Guid"*, *"edm:Int"*, *"edm:TimeOfDay"*.

docs/Cookbook_for_Testing_Controls_with_QUnit_0ddcc60.md

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ QUnit.test("Test with fake timers", async() => {
176176

177177
// Release all timers at the end of the test
178178
// to avoid e.g. blocking the rendering within
179-
// following tests and to ensure, that other
179+
// following tests and to ensure that other
180180
// timeouts triggered through integration are
181181
// released
182182
oButton.destroy()
@@ -226,37 +226,6 @@ QUnit.test("Should suppress rerendering when tooltip is set", async(assert) => {
226226
});
227227
```
228228
229-
`applyChanges()` enforces a synchronous rendering and **must not** be used in productive code.
230-
231-
**For test scenarios only**, you may use the test helper module **`sap/ui/qunit/utils/nextUIUpdate`** instead.
232-
233-
> ### Restriction:
234-
> Using `nextUIUpdate` in combination with fake timers has some pitfalls. If fake timers are used, it is not possible to use `await`. In this case, you need to chain to the `nextUIUpdate` Promise and always use `clock.tick()` within the chaining in order to execute the rendering.
235-
>
236-
> The main difference to `applyChanges()` is that `nextUIUpdate()` does not synchronously trigger a re-rendering \(which by intention we wanted to get rid of\), but just waits for the next rendering cycle to complete. Due to this asynchronous nature, switching to it may be slightly more work than in other more straightforward cases.
237-
238-
As a replacement for `applyChanges()` **in tests only**, use:
239-
240-
```js
241-
QUnit.test("Simple Component Instance",
242-
async function(assert){
243-
await nextUIUpdate();
244-
...
245-
});
246-
247-
// nextUIUpdate with fake timers
248-
QUnit.test("Test with fake timers", function() {
249-
this.clock = sinon.useFakeTimers();
250-
251-
// Using runAll is not always necessary but ensures, that no timeouts are left unprocessed
252-
this.clock.runAll();
253-
nextUIUpdate().then(() => {
254-
this.clock.tick();
255-
// Continue with your test
256-
});
257-
}
258-
```
259-
260229
***
261230
262231
### Testing with Models
@@ -349,7 +318,7 @@ QUnit.test("Should do something with the model", async(assert) => {
349318
oMockServer = startMockServer(50);
350319

351320
// System under Test
352-
constoLabel = new Label({
321+
const oLabel = new Label({
353322
text : "{/myProperty}"
354323
});
355324

docs/How_to_Test_OpenUI5_Controls_with_QUnit_a6b0657.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,6 @@ Using fake timers can be error-prone. Fake timers should only be used with care
142142

143143
- For using fake timers in combination with rendering: [Rendering and Re-rendering Controls Within Tests](Cookbook_for_Testing_Controls_with_QUnit_0ddcc60.md#loio0ddcc60b05ee40dea1a3be09e8fee8f7__section_REREN)
144144

145-
If you are using `sinon.qunit`, it will automatically use fake timers by itself. Fake timers will prevent any `setTimeout/setIntervall` function from being executed, unless you call `this.clock.tick(milliseconds)` in your test. This means that a Mock Server with auto-respond will not respond and OPA will not be able to wait for controls.
146-
147-
In addition, control events might be fired inside of a `setTimeout(, 0)`, so the event might not be triggered at all.
148-
149145
***
150146

151147
#### I've set a property on my control: Why aren't the changes in the DOM?

docs/Legacy_Factories_Replacement_491bd9c.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ var oView = sap.ui.jsview({
294294
</td>
295295
<td valign="top">
296296

297-
For defining views, use `View.extend`. For loading and creating a view instance, use `View.create`. Refer also to the dedicated [Typed View](Typed_View_e6bb33d.md) documentation and the[code sample](https://sdk.openui5.org/entity/sap.ui.core.mvc.View/sample/sap.ui.core.sample.View.navigationTypedView).
297+
For defining views, use `View.extend`. For loading and creating a view instance, use `View.create`. Refer also to the dedicated [Typed View](Typed_View_e6bb33d.md) documentation and the [code sample](https://sdk.openui5.org/entity/sap.ui.core.mvc.View/sample/sap.ui.core.sample.View.navigationTypedView).
298298

299299
```
300300
@@ -449,7 +449,7 @@ var aControls = sap.ui.jsfragment({
449449

450450
```
451451
// XML Fragments
452-
var aControls = sap.ui.fragment({
452+
var aControls = sap.ui.xmlfragment({
453453
name: "my.fragment"
454454
});
455455

0 commit comments

Comments
 (0)