mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
iOS XCUI tests
commit_hash:5aeac8bafb97ad362d28ead2e85b4a64de0452f7
This commit is contained in:
@@ -2470,7 +2470,29 @@
|
||||
"Tooltips are hidden when tapping into an empty area",
|
||||
"The tooltip is closed by tapping on the cross button and disappears when the Disappear Action is called"
|
||||
],
|
||||
"file": "tooltips.json"
|
||||
"file": "tooltips/tooltips.json"
|
||||
},
|
||||
{
|
||||
"title": "Tooltip on different positions",
|
||||
"platforms": [
|
||||
"ios"
|
||||
],
|
||||
"automated": [
|
||||
"ios"
|
||||
],
|
||||
"tags": [
|
||||
"Tooltips"
|
||||
],
|
||||
"steps": [
|
||||
"Click on buttons to set different positions of the tooltip",
|
||||
"After that, click the \"tooltip with close button\" button to display the tooltip"
|
||||
],
|
||||
"expected_results": [
|
||||
"The tooltip is always fully visible on the screen",
|
||||
"Tooltips are hidden when tapping into an empty area",
|
||||
"The tooltip is closed by tapping on the cross button and disappears when the Disappear Action is called"
|
||||
],
|
||||
"file": "tooltips/tooltip-positions.json"
|
||||
},
|
||||
{
|
||||
"title": "Persistent values storage",
|
||||
|
||||
@@ -0,0 +1,219 @@
|
||||
{
|
||||
"templates": {
|
||||
"button": {
|
||||
"type": "text",
|
||||
"width": {
|
||||
"type": "match_parent"
|
||||
},
|
||||
"height": {
|
||||
"type": "wrap_content"
|
||||
},
|
||||
"paddings": {
|
||||
"left": 16,
|
||||
"top": 16,
|
||||
"right": 16,
|
||||
"bottom": 16
|
||||
},
|
||||
"margins": {
|
||||
"top": 16,
|
||||
"left": 12,
|
||||
"right": 12
|
||||
},
|
||||
"border": {
|
||||
"corner_radius": 8
|
||||
},
|
||||
"background": [
|
||||
{
|
||||
"type": "solid",
|
||||
"color": "#0E000000"
|
||||
}
|
||||
],
|
||||
"font_size": 16,
|
||||
"font_weight": "medium",
|
||||
"text_alignment_vertical": "center",
|
||||
"text_alignment_horizontal": "center",
|
||||
"text_color": "#000000",
|
||||
"alpha": 1,
|
||||
"alignment_horizontal": "center",
|
||||
"alignment_vertical": "center"
|
||||
}
|
||||
},
|
||||
"card": {
|
||||
"log_id": "visibility",
|
||||
"variables": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "position",
|
||||
"value": "bottom"
|
||||
}
|
||||
],
|
||||
"states": [
|
||||
{
|
||||
"state_id": 0,
|
||||
"div": {
|
||||
"type": "container",
|
||||
"height": {
|
||||
"type": "wrap_content"
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
"type": "button",
|
||||
"text": "tooltip with close button",
|
||||
"margins": {
|
||||
"top": 60
|
||||
},
|
||||
"tooltips": [
|
||||
{
|
||||
"id": "tooltip",
|
||||
"position": "@{position}",
|
||||
"duration": 0,
|
||||
"offset": {
|
||||
"x": {
|
||||
"value": 0
|
||||
},
|
||||
"y": {
|
||||
"value": 4
|
||||
}
|
||||
},
|
||||
"div": {
|
||||
"type": "container",
|
||||
"orientation": "overlap",
|
||||
"items": [
|
||||
{
|
||||
"type": "container",
|
||||
"paddings": {
|
||||
"left": 16,
|
||||
"top": 16,
|
||||
"right": 16,
|
||||
"bottom": 16
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
"type": "text",
|
||||
"width": {
|
||||
"type": "wrap_content"
|
||||
},
|
||||
"paddings": {
|
||||
"left": 16,
|
||||
"top": 16,
|
||||
"right": 16,
|
||||
"bottom": 16
|
||||
},
|
||||
"background": [
|
||||
{
|
||||
"type": "solid",
|
||||
"color": "#799eb7"
|
||||
}
|
||||
],
|
||||
"border": {
|
||||
"corner_radius": 6
|
||||
},
|
||||
"text_color": "#2C3E50",
|
||||
"text": "Title tooltip"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "image",
|
||||
"width": {
|
||||
"type": "fixed",
|
||||
"value": 20
|
||||
},
|
||||
"height": {
|
||||
"type": "fixed",
|
||||
"value": 20
|
||||
},
|
||||
"margins": {
|
||||
"left": 8,
|
||||
"top": 8
|
||||
},
|
||||
"action": {
|
||||
"log_id": "hide_tooltip",
|
||||
"url": "div-action://hide_tooltip?id=tooltip"
|
||||
},
|
||||
"image_url": "https://yastatic.net/s3/home/div/div_fullscreens/cross2.3.png",
|
||||
"tint_color": "#000000",
|
||||
"alignment_horizontal": "left",
|
||||
"alignment_vertical": "top"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"actions": [
|
||||
{
|
||||
"log_id": "show_tooltip",
|
||||
"url": "div-action://show_tooltip?id=tooltip&multiple=true"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Tooltip position: @{position}"
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"text": "Set top position",
|
||||
"margins": {
|
||||
"top": 150,
|
||||
"right": 15,
|
||||
"left": 15
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"log_id": "set_top_pos",
|
||||
"url": "div-action://set_variable?name=position&value=top"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"text": "Set right position",
|
||||
"margins": {
|
||||
"top": 15,
|
||||
"right": 15,
|
||||
"left": 15
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"log_id": "set_right_pos",
|
||||
"url": "div-action://set_variable?name=position&value=right"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"text": "Set center position",
|
||||
"margins": {
|
||||
"top": 15,
|
||||
"right": 15,
|
||||
"left": 15
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"log_id": "set_center_pos",
|
||||
"url": "div-action://set_variable?name=position&value=center"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"text": "Restore bottom position",
|
||||
"margins": {
|
||||
"top": 15,
|
||||
"right": 15,
|
||||
"left": 15
|
||||
},
|
||||
"actions": [
|
||||
{
|
||||
"log_id": "restore_bottom_pos",
|
||||
"url": "div-action://set_variable?name=position&value=bottom"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user