support div-tooltip.mode

commit_hash:949be67575b7f3da8a6d40d3341bb8c681123d76
This commit is contained in:
babaevmm
2025-02-11 12:35:40 +03:00
parent 51d571108e
commit fa7bdf80f8
9 changed files with 214 additions and 60 deletions
+23 -19
View File
@@ -565,19 +565,19 @@
],
"steps": [
"Set russian language on device",
"Turn on Screen reader and set order of elements description to '\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435,\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435,\u0442\u0438\u043f'",
"Set focus on '\u042d\u043b\u0435\u043c\u0435\u043d\u0442 1'",
"Turn on Screen reader and set order of elements description to 'Состояние,название,тип'",
"Set focus on 'Элемент 1'",
"Listen to Screen reader",
"Double tap on screen",
"Set focus on '\u042d\u043b\u0435\u043c\u0435\u043d\u0442 2'",
"Set focus on 'Элемент 2'",
"Listen to Screen reader",
"Set focus on '\u042d\u043b\u0435\u043c\u0435\u043d\u0442 3'"
"Set focus on 'Элемент 3'"
],
"expected_results": [
"On '\u042d\u043b\u0435\u043c\u0435\u043d\u0442 1' Screen reader should say 'C\u0435\u0439\u0447\u0430\u0441 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 0; \u042d\u043b\u0435\u043c\u0435\u043d\u0442 1; \u041a\u043d\u043e\u043f\u043a\u0430; \u041a\u043e\u0441\u043d\u0438\u0442\u0435\u0441\u044c \u0434\u0432\u0430\u0436\u0434\u044b, \u0447\u0442\u043e\u0431\u044b \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c'",
"After double tap Screen reader should say '\u0421\u0435\u0439\u0447\u0430\u0441 \u0432 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 1'",
"On '\u042d\u043b\u0435\u043c\u0435\u043d\u0442 2' Screen reader should say '\u042d\u043b\u0435\u043c\u0435\u043d\u0442 2; \u041a\u043d\u043e\u043f\u043a\u0430; \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e'",
"On '\u042d\u043b\u0435\u043c\u0435\u043d\u0442 3' Screen reader should say '\u042d\u043b\u0435\u043c\u0435\u043d\u0442 3; \u041a\u043d\u043e\u043f\u043a\u0430'"
"On 'Элемент 1' Screen reader should say 'Cейчас в состоянии 0; Элемент 1; Кнопка; Коснитесь дважды, чтобы активировать'",
"After double tap Screen reader should say 'Сейчас в состоянии 1'",
"On 'Элемент 2' Screen reader should say 'Элемент 2; Кнопка; Нажмите на кнопку, чтобы что-то произошло'",
"On 'Элемент 3' Screen reader should say 'Элемент 3; Кнопка'"
],
"file": "accessibility/descriptions.json"
},
@@ -651,8 +651,8 @@
"Focus on items from top to bottom"
],
"expected_results": [
"When focusing on 1 item you'll hear '\u042d\u0442\u043e \u042d\u043b\u0435\u043c\u0435\u043d\u0442 1'",
"When focusing on group of 2 and 3 items you will hear '\u042d\u0442\u043e \u042d\u043b\u0435\u043c\u0435\u043d\u0442 2, \u042d\u0442\u043e \u042d\u043b\u0435\u043c\u0435\u043d\u0442 3'",
"When focusing on 1 item you'll hear 'Это Элемент 1'",
"When focusing on group of 2 and 3 items you will hear 'Это Элемент 2, Это Элемент 3'",
"Can't focus 4 element"
],
"file": "accessibility/mode/default.json"
@@ -672,9 +672,9 @@
],
"expected_results": [
"Focusing on all card",
"You will hear '\u042d\u0442\u043e \u042d\u043b\u0435\u043c\u0435\u043d\u0442 1, \u042d\u0442\u043e \u042d\u043b\u0435\u043c\u0435\u043d\u0442 2, \u042d\u0442\u043e \u042d\u043b\u0435\u043c\u0435\u043d\u0442 3'",
"On activation menu with text '\u042d\u043b\u0435\u043c\u0435\u043d\u0442 1, \u042d\u043b\u0435\u043c\u0435\u043d\u0442 2, \u042d\u043b\u0435\u043c\u0435\u043d\u0442 3' appears",
"On focus Screen reader should not say '\u041a\u043e\u0441\u043d\u0438\u0442\u0435\u0441\u044c \u0434\u0432\u0430\u0436\u0434\u044b \u0438 \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0439\u0442\u0435'"
"You will hear 'Это Элемент 1, Это Элемент 2, Это Элемент 3'",
"On activation menu with text 'Элемент 1, Элемент 2, Элемент 3' appears",
"On focus Screen reader should not say 'Коснитесь дважды и удерживайте'"
],
"file": "accessibility/mode/merge.json"
},
@@ -693,8 +693,8 @@
],
"expected_results": [
"Focus on 5-th item",
"\u0423\u0441\u043b\u044b\u0448\u0438\u043c '\u042d\u0442\u043e \u042d\u043b\u0435\u043c\u0435\u043d\u0442 5'",
"\u041f\u0440\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c Screen reader \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0435 \u043f\u0440\u0438 \u0442\u0430\u043f\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043c\u0435\u043d\u044e \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u044d\u0442\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438"
"Услышим 'Это Элемент 5'",
"При выключенном Screen reader на каждой кнопке при тапе должно появляться меню с названием этой кнопки"
],
"file": "accessibility/mode/exclude.json"
},
@@ -2082,7 +2082,7 @@
},
{
"title": "Custom card",
"case_id": 93,
"case_id": 93,
"platforms": [
"android",
"web"
@@ -2599,14 +2599,18 @@
"Try to tap outside of tooltip",
"Close tooltip by cross button",
"Tap on second button",
"Tap outside of tooltip"
"Tap outside of tooltip",
"Tap on third button",
"Tap on other buttons"
],
"expected_results": [
"First tooltip is shown",
"First tooltip isn't closed by tapping outside of the tooltip",
"First tooltip is closed",
"Second tooltip is shown",
"Label text changed to `Outside actions called: true`, label text color is green"
"Label text changed to `Outside actions called: true`, label text color is green",
"Third tooltip is shown",
"First and second buttons are clickable during showing of third non modal tooltip"
],
"file": "tooltips-with-tap-outside-properties.json"
},
@@ -2764,7 +2768,7 @@
{
"title": "Patch gallery with typed action",
"case_id": 192,
"platforms": [
"platforms": [
"android",
"web"
],
@@ -250,6 +250,98 @@
"type": "text",
"text": "Outside actions called: @{outside_actions_called}",
"text_color": "@{(outside_actions_called == 'true') ? '#00FF00' : '#000000'}"
},
{
"type": "button",
"text": "tooltip mode = non_modal",
"tooltips": [
{
"id": "tooltip_3",
"position": "bottom",
"duration": 0,
"offset": {
"x": {
"value": 0
},
"y": {
"value": 50
}
},
"mode": {
"type": "non_modal"
},
"close_by_tap_outside": true,
"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": "Non modal 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_3"
},
"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_3&multiple=true"
}
]
}
]
}