The Drop
action is used to simulate drop on a control. The control should be droppable, as defined by its dnd aggregation configuration. The dropped control should be defined in a preceding sap.ui.test.actions.Drag action.
The Drop
action targets a special DOM element representing the control. This DOM element can be customized.
For most most controls, the target will be the DOM focus reference. You can choose a different DOM element by specifying its ID suffix. You can do this by directly passing the ID suffix to the Drop constructor, or by defining a control adapter function. You can also set the traget to be the root DOM element of a given aggregation, by specifying the aggregation name in the Drop constructor.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui.test.actions.Drop(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | Optional ID for the new instance; generated automatically if no non-empty ID is given. Note: this can be omitted, no matter whether |
|
mSettings? | object | Optional object with initial settings for the new instance |
Name | Type | Default Value | Description |
---|---|---|---|
after | boolean | Set `after` to true, to drop the source immediately before the target element. Visibility: public |
|
aggregationName | string | name of the droppable aggregation, whose root to use as drop target. This makes sense only for some controls, where this root DOM element is droppable. Visibility: public |
|
before | boolean | specify a position for the drop event, relative to the position of the control's representative DOM element. This makes sense only for the case when dropping right on top of the DOM element makes no sense, and instead, the drop should happen right before or after the element. e.g. sap.m.IconTabBar. Default position is "center", meaning the drop will be directly on the element. Set `before` to true, to drop the source immediately before the target element. Visibility: public |
Name | Type | Default Value | Description |
---|---|---|---|
idSuffix | string | Use this only if the target property or the default of the action does not work for your control. The id suffix of the DOM Element the press action will be executed on. For most of the controls you do not have to specify this, since the Control Adapters will find the correct DOM Element. But some controls have multiple DOM elements that could be target of your Action. Then you should set this property. For a detailed documentation of the suffix see sap.ui.core.Element#$ |
Method | Description |
---|---|
sap.ui.test.actions.Drop.extend |
Creates a new subclass of class sap.ui.test.actions.Drop with name
|
getAfter |
Gets current value of property after. Set `after` to true, to drop the source immediately before the target element. |
getAggregationName |
Gets current value of property aggregationName. name of the droppable aggregation, whose root to use as drop target. This makes sense only for some controls, where this root DOM element is droppable. |
getBefore |
Gets current value of property before. specify a position for the drop event, relative to the position of the control's representative DOM element. This makes sense only for the case when dropping right on top of the DOM element makes no sense, and instead, the drop should happen right before or after the element. e.g. sap.m.IconTabBar. Default position is "center", meaning the drop will be directly on the element. Set `before` to true, to drop the source immediately before the target element. |
sap.ui.test.actions.Drop.getMetadata |
Returns a metadata object for class sap.ui.test.actions.Drop. |
setAfter |
Sets a new value for property after. Set `after` to true, to drop the source immediately before the target element. When called with a value of |
setAggregationName |
Sets a new value for property aggregationName. name of the droppable aggregation, whose root to use as drop target. This makes sense only for some controls, where this root DOM element is droppable. When called with a value of |
setBefore |
Sets a new value for property before. specify a position for the drop event, relative to the position of the control's representative DOM element. This makes sense only for the case when dropping right on top of the DOM element makes no sense, and instead, the drop should happen right before or after the element. e.g. sap.m.IconTabBar. Default position is "center", meaning the drop will be directly on the element. Set `before` to true, to drop the source immediately before the target element. When called with a value of |
Creates a new subclass of class sap.ui.test.actions.Drop with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.test.actions.Action.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Gets current value of property after.
Set `after` to true, to drop the source immediately before the target element.
Gets current value of property aggregationName.
name of the droppable aggregation, whose root to use as drop target. This makes sense only for some controls, where this root DOM element is droppable.
Gets current value of property before.
specify a position for the drop event, relative to the position of the control's representative DOM element. This makes sense only for the case when dropping right on top of the DOM element makes no sense, and instead, the drop should happen right before or after the element. e.g. sap.m.IconTabBar. Default position is "center", meaning the drop will be directly on the element. Set `before` to true, to drop the source immediately before the target element.
Sets a new value for property after.
Set `after` to true, to drop the source immediately before the target element.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
bAfter | boolean |
New value for property |
Sets a new value for property aggregationName.
name of the droppable aggregation, whose root to use as drop target. This makes sense only for some controls, where this root DOM element is droppable.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sAggregationName | string |
New value for property |
Sets a new value for property before.
specify a position for the drop event, relative to the position of the control's representative DOM element. This makes sense only for the case when dropping right on top of the DOM element makes no sense, and instead, the drop should happen right before or after the element. e.g. sap.m.IconTabBar. Default position is "center", meaning the drop will be directly on the element. Set `before` to true, to drop the source immediately before the target element.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
bBefore | boolean |
New value for property |