Files
2023-05-16 19:34:42 +03:00

248 lines
6.2 KiB
JSON

{
"description": "Input with base properties",
"platforms": [
"android",
"ios",
"web"
],
"div_data": {
"card": {
"log_id": "tests",
"variables": [
{
"name": "alpha",
"type": "number",
"value": 1.0
},
{
"name": "background_color",
"type": "color",
"value": "#FFFFCC"
},
{
"name": "border_corner_radius",
"type": "integer",
"value": 0
},
{
"name": "border_stroke_color",
"type": "color",
"value": "#0000FF"
},
{
"name": "border_stroke_width",
"type": "number",
"value": 1
},
{
"name": "margins",
"type": "integer",
"value": 0
},
{
"name": "paddings",
"type": "integer",
"value": 0
},
{
"name": "height_value",
"type": "integer",
"value": 250
},
{
"name": "width_value",
"type": "integer",
"value": 300
},
{
"name": "alignment_horizontal",
"type": "string",
"value": "left"
},
{
"name": "alignment_vertical",
"type": "string",
"value": "top"
},
{
"name": "input_value",
"type": "string",
"value": ""
}
],
"states": [
{
"state_id": 0,
"div": {
"type": "input",
"alpha": "@{alpha}",
"alignment_horizontal": "@{alignment_horizontal}",
"alignment_vertical": "@{alignment_vertical}",
"background": [
{
"type": "solid",
"color": "@{background_color}"
}
],
"border": {
"corner_radius": "@{border_corner_radius}",
"stroke": {
"color": "@{border_stroke_color}",
"width": "@{border_stroke_width}"
}
},
"paddings": {
"left": "@{paddings}",
"top": "@{paddings}",
"right": "@{paddings}",
"bottom": "@{paddings}"
},
"margins": {
"left": "@{margins}",
"top": "@{margins}",
"right": "@{margins}",
"bottom": "@{margins}"
},
"width": {
"type": "fixed",
"value": "@{width_value}"
},
"height": {
"type": "fixed",
"value": "@{height_value}"
},
"text_variable": "input_value",
"line_height": 40
}
}
]
}
},
"steps": [
{
"expected_screenshot": "step0.png"
},
{
"div_actions": [
{
"url": "div-action://set_variable?name=background_color&value=%2370A1A1A1",
"log_id": "background_color"
}
]
},
{
"div_actions": [
{
"url": "div-action://set_variable?name=margins&value=15",
"log_id": "margins"
}
]
},
{
"div_actions": [
{
"url": "div-action://set_variable?name=paddings&value=15",
"log_id": "paddings"
}
]
},
{
"div_actions": [
{
"url": "div-action://set_variable?name=width_value&value=150",
"log_id": "width"
},
{
"url": "div-action://set_variable?name=height_value&value=100",
"log_id": "height"
}
]
},
{
"div_actions": [
{
"url": "div-action://set_variable?name=alignment_vertical&value=bottom",
"log_id": "alignment_vertical"
},
{
"url": "div-action://set_variable?name=alignment_horizontal&value=right",
"log_id": "alignment_horizontal"
}
]
},
{
"div_actions": [
{
"url": "div-action://set_variable?name=border_corner_radius&value=15",
"log_id": "border_corner_radius"
},
{
"url": "div-action://set_variable?name=border_stroke_color&value=%237000FF00",
"log_id": "border_stroke_color"
},
{
"url": "div-action://set_variable?name=border_stroke_width&value=3",
"log_id": "border_stroke_width"
}
]
},
{
"div_actions": [
{
"url": "div-action://set_variable?name=alpha&value=0.2",
"log_id": "alpha"
}
]
},
{
"div_actions": [
{
"url": "div-action://set_variable?name=alpha&value=1.0",
"log_id": "restore: alpha"
},
{
"url": "div-action://set_variable?name=background_color&value=%23FFFFCC",
"log_id": "restore: background_color"
},
{
"url": "div-action://set_variable?name=border_corner_radius&value=0",
"log_id": "restore: border_corner_radius"
},
{
"url": "div-action://set_variable?name=border_stroke_color&value=%230000FF",
"log_id": "restore: border_stroke_color"
},
{
"url": "div-action://set_variable?name=border_stroke_width&value=1",
"log_id": "restore: border_stroke_width"
},
{
"url": "div-action://set_variable?name=margins&value=0",
"log_id": "restore: margins"
},
{
"url": "div-action://set_variable?name=paddings&value=0",
"log_id": "restore: paddings"
},
{
"url": "div-action://set_variable?name=height_value&value=250",
"log_id": "restore: height_value"
},
{
"url": "div-action://set_variable?name=width_value&value=300",
"log_id": "restore: width_value"
},
{
"url": "div-action://set_variable?name=alignment_horizontal&value=left",
"log_id": "restore: alignment_horizontal"
},
{
"url": "div-action://set_variable?name=alignment_vertical&value=top",
"log_id": "restore: alignment_vertical"
}
],
"expected_screenshot": "step0.png"
}
]
}