mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
Added tests for visibility actions
commit_hash:ff47a969023c1ee0f85da57eadd99d744c659ac8
This commit is contained in:
@@ -27540,6 +27540,7 @@
|
||||
"test_data/regression_test_data/visibility_actions/states.json":"divkit/public/test_data/regression_test_data/visibility_actions/states.json",
|
||||
"test_data/regression_test_data/visibility_actions/swipe_div_pager.json":"divkit/public/test_data/regression_test_data/visibility_actions/swipe_div_pager.json",
|
||||
"test_data/regression_test_data/visibility_actions/visibility_action.json":"divkit/public/test_data/regression_test_data/visibility_actions/visibility_action.json",
|
||||
"test_data/regression_test_data/visibility_actions/visibility_action_with_local_variable_in_url.json":"divkit/public/test_data/regression_test_data/visibility_actions/visibility_action_with_local_variable_in_url.json",
|
||||
"test_data/samples/animations/action_animation.json":"divkit/public/test_data/samples/animations/action_animation.json",
|
||||
"test_data/samples/animations/transition_change.json":"divkit/public/test_data/samples/animations/transition_change.json",
|
||||
"test_data/samples/animations/transition_in_out_visibility.json":"divkit/public/test_data/samples/animations/transition_in_out_visibility.json",
|
||||
|
||||
@@ -4211,6 +4211,25 @@
|
||||
],
|
||||
"file": "input/input_cursor_position.json",
|
||||
"case_id": 496
|
||||
},
|
||||
{
|
||||
"title": "Visibility action with local variable in url",
|
||||
"platforms": [
|
||||
"android",
|
||||
"ios",
|
||||
"web"
|
||||
],
|
||||
"tags": [
|
||||
"visibility_actions",
|
||||
"variables"
|
||||
],
|
||||
"steps": [
|
||||
"Wait for visibility action to trigger (less than 1 second)"
|
||||
],
|
||||
"expected_results": [
|
||||
"Text changes from 'Waiting for visibility action...' to 'Triggered from local variable!'"
|
||||
],
|
||||
"file": "visibility_actions/visibility_action_with_local_variable_in_url.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"card": {
|
||||
"log_id": "test",
|
||||
"variables": [
|
||||
{
|
||||
"name": "result",
|
||||
"type": "string",
|
||||
"value": "Waiting for visibility action..."
|
||||
}
|
||||
],
|
||||
"states": [
|
||||
{
|
||||
"state_id": 0,
|
||||
"div": {
|
||||
"type": "container",
|
||||
"paddings": {
|
||||
"left": 20,
|
||||
"right": 20,
|
||||
"top": 20,
|
||||
"bottom": 20
|
||||
},
|
||||
"items": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "@{result}",
|
||||
"font_size": 18
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Element with local variable in visibility action url",
|
||||
"font_size": 16,
|
||||
"variables": [
|
||||
{
|
||||
"name": "local_value",
|
||||
"type": "string",
|
||||
"value": "Triggered from local variable!"
|
||||
}
|
||||
],
|
||||
"visibility_actions": [
|
||||
{
|
||||
"log_id": "visibility_with_local_var",
|
||||
"url": "div-action://set_variable?name=result&value=@{local_value}",
|
||||
"visibility_duration": 800
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user