diff --git a/instrumented/integration/src/androidTest/assets/consent_granted_sr_test_payload.json b/instrumented/integration/src/androidTest/assets/consent_granted_sr_test_payload.json index b8467ce607..08903b1058 100644 --- a/instrumented/integration/src/androidTest/assets/consent_granted_sr_test_payload.json +++ b/instrumented/integration/src/androidTest/assets/consent_granted_sr_test_payload.json @@ -1,18 +1,15 @@ [{ - "timestamp": 1693225480146, "type": 4, "data": { "width": 411, "height": 914 } }, { - "timestamp": 1693225480146, "type": 6, "data": { "has_focus": true } }, { - "timestamp": 1693225480146, "type": 11, "data": { "source": 4, @@ -20,11 +17,9 @@ "height": 914 } }, { - "timestamp": 1693225480146, "type": 10, "data": { "wireframes": [{ - "id": 140747450, "x": 0, "y": 0, "width": 411, @@ -35,7 +30,6 @@ }, "type": "shape" }, { - "id": 203335949, "x": 0, "y": 104, "width": 172, @@ -60,7 +54,6 @@ } } }, { - "id": 228466882, "x": 0, "y": 134, "width": 88, @@ -89,7 +82,6 @@ } } }, { - "id": 137378320, "x": 0, "y": 48, "width": 411, diff --git a/instrumented/integration/src/androidTest/assets/sr_text_fields_allow_payload.json b/instrumented/integration/src/androidTest/assets/sr_text_fields_allow_payload.json new file mode 100644 index 0000000000..2f40a4c46b --- /dev/null +++ b/instrumented/integration/src/androidTest/assets/sr_text_fields_allow_payload.json @@ -0,0 +1,355 @@ +[{ + "type": 4, + "data": { + "width": 411, + "height": 914 + } +}, { + "type": 6, + "data": { + "has_focus": true + } +}, { + "type": 11, + "data": { + "source": 4, + "width": 411, + "height": 914 + } +}, { + "type": 10, + "data": { + "wireframes": [{ + "x": 0, + "y": 0, + "width": 411, + "height": 914, + "shapeStyle": { + "backgroundColor": "#303030ff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 112, + "width": 395, + "height": 19, + "type": "text", + "text": "Default Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#a538afff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "alignment": { + "horizontal": "left", + "vertical": "top" + } + } + }, { + "x": 8, + "y": 140, + "width": 395, + "height": 19, + "type": "text", + "text": "Material Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#cc0000ff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "alignment": { + "horizontal": "left", + "vertical": "top" + } + } + }, { + "x": 8, + "y": 167, + "width": 395, + "height": 19, + "type": "text", + "text": "App Compat Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#ffbb33ff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "alignment": { + "horizontal": "left", + "vertical": "top" + } + } + }, { + "x": 8, + "y": 195, + "width": 395, + "height": 44, + "type": "text", + "text": "Edit Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#a538afff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 238, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#a538afff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 248, + "width": 395, + "height": 44, + "type": "text", + "text": "Default Auto Complete Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#ffbb33ff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 291, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#ffbb33ff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 300, + "width": 395, + "height": 44, + "type": "text", + "text": "App Compat Edit Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#ffbb33ff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 343, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#ffbb33ff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 353, + "width": 395, + "height": 44, + "type": "text", + "text": "App Compat Auto Complete Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#a538afff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 396, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#a538afff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 406, + "width": 395, + "height": 44, + "type": "text", + "text": "Material Auto Complete Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#a538afff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 449, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#a538afff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 459, + "width": 395, + "height": 32, + "type": "text", + "text": "Checked Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#ffffffff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 12, + "left": 0, + "right": 32 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 371, + "y": 459, + "width": 19, + "height": 19, + "border": { + "color": "#ffffffff", + "width": 1 + }, + "type": "shape" + }, { + "x": 8, + "y": 499, + "width": 395, + "height": 32, + "type": "text", + "text": "App Compat Checked Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#ffffffff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 12, + "left": 0, + "right": 32 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 371, + "y": 499, + "width": 19, + "height": 19, + "shapeStyle": { + "backgroundColor": "#ffffffff", + "opacity": 1.0 + }, + "border": { + "color": "#ffffffff", + "width": 1 + }, + "type": "shape" + }, { + "x": 0, + "y": 48, + "width": 411, + "height": 56, + "type": "placeholder", + "label": "Toolbar" + }] + } +}] \ No newline at end of file diff --git a/instrumented/integration/src/androidTest/assets/sr_text_fields_mask_payload.json b/instrumented/integration/src/androidTest/assets/sr_text_fields_mask_payload.json new file mode 100644 index 0000000000..71ded7a2fc --- /dev/null +++ b/instrumented/integration/src/androidTest/assets/sr_text_fields_mask_payload.json @@ -0,0 +1,351 @@ +[{ + "type": 4, + "data": { + "width": 411, + "height": 914 + } +}, { + "type": 6, + "data": { + "has_focus": true + } +}, { + "type": 11, + "data": { + "source": 4, + "width": 411, + "height": 914 + } +}, { + "type": 10, + "data": { + "wireframes": [{ + "x": 0, + "y": 0, + "width": 411, + "height": 914, + "shapeStyle": { + "backgroundColor": "#303030ff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 112, + "width": 395, + "height": 19, + "type": "text", + "text": "xxxxxxx xxxx xxxx", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#a538afff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "alignment": { + "horizontal": "left", + "vertical": "top" + } + } + }, { + "x": 8, + "y": 140, + "width": 395, + "height": 19, + "type": "text", + "text": "xxxxxxxx xxxx xxxx", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#cc0000ff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "alignment": { + "horizontal": "left", + "vertical": "top" + } + } + }, { + "x": 8, + "y": 167, + "width": 395, + "height": 19, + "type": "text", + "text": "xxx xxxxxx xxxx xxxx", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#ffbb33ff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "alignment": { + "horizontal": "left", + "vertical": "top" + } + } + }, { + "x": 8, + "y": 195, + "width": 395, + "height": 44, + "type": "text", + "text": "***", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#a538afff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 238, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#a538afff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 248, + "width": 395, + "height": 44, + "type": "text", + "text": "***", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#ffbb33ff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 291, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#ffbb33ff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 300, + "width": 395, + "height": 44, + "type": "text", + "text": "***", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#ffbb33ff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 343, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#ffbb33ff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 353, + "width": 395, + "height": 44, + "type": "text", + "text": "***", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#a538afff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 396, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#a538afff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 406, + "width": 395, + "height": 44, + "type": "text", + "text": "***", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#a538afff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 449, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#a538afff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 459, + "width": 395, + "height": 32, + "type": "text", + "text": "xxxxxxx xxxx xxxx", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#ffffffff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 12, + "left": 0, + "right": 32 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 371, + "y": 459, + "width": 19, + "height": 19, + "border": { + "color": "#ffffffff", + "width": 1 + }, + "type": "shape" + }, { + "x": 8, + "y": 499, + "width": 395, + "height": 32, + "type": "text", + "text": "xxx xxxxxx xxxxxxx xxxx xxxx", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#ffffffff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 12, + "left": 0, + "right": 32 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 371, + "y": 499, + "width": 19, + "height": 19, + "border": { + "color": "#ffffffff", + "width": 1 + }, + "type": "shape" + }, { + "x": 0, + "y": 48, + "width": 411, + "height": 56, + "type": "placeholder", + "label": "Toolbar" + }] + } +}] \ No newline at end of file diff --git a/instrumented/integration/src/androidTest/assets/sr_text_fields_mask_user_input_payload.json b/instrumented/integration/src/androidTest/assets/sr_text_fields_mask_user_input_payload.json new file mode 100644 index 0000000000..5f314a9016 --- /dev/null +++ b/instrumented/integration/src/androidTest/assets/sr_text_fields_mask_user_input_payload.json @@ -0,0 +1,351 @@ +[{ + "type": 4, + "data": { + "width": 411, + "height": 914 + } +}, { + "type": 6, + "data": { + "has_focus": true + } +}, { + "type": 11, + "data": { + "source": 4, + "width": 411, + "height": 914 + } +}, { + "type": 10, + "data": { + "wireframes": [{ + "x": 0, + "y": 0, + "width": 411, + "height": 914, + "shapeStyle": { + "backgroundColor": "#303030ff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 112, + "width": 395, + "height": 19, + "type": "text", + "text": "Default Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#a538afff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "alignment": { + "horizontal": "left", + "vertical": "top" + } + } + }, { + "x": 8, + "y": 140, + "width": 395, + "height": 19, + "type": "text", + "text": "Material Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#cc0000ff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "alignment": { + "horizontal": "left", + "vertical": "top" + } + } + }, { + "x": 8, + "y": 167, + "width": 395, + "height": 19, + "type": "text", + "text": "App Compat Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#ffbb33ff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "alignment": { + "horizontal": "left", + "vertical": "top" + } + } + }, { + "x": 8, + "y": 195, + "width": 395, + "height": 44, + "type": "text", + "text": "Edit Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#a538afff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 238, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#a538afff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 248, + "width": 395, + "height": 44, + "type": "text", + "text": "Default Auto Complete Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#ffbb33ff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 291, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#ffbb33ff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 300, + "width": 395, + "height": 44, + "type": "text", + "text": "App Compat Edit Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#ffbb33ff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 343, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#ffbb33ff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 353, + "width": 395, + "height": 44, + "type": "text", + "text": "App Compat Auto Complete Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#a538afff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 396, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#a538afff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 406, + "width": 395, + "height": 44, + "type": "text", + "text": "Material Auto Complete Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#a538afff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 449, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#a538afff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 459, + "width": 395, + "height": 32, + "type": "text", + "text": "Checked Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#ffffffff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 12, + "left": 0, + "right": 32 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 371, + "y": 459, + "width": 19, + "height": 19, + "border": { + "color": "#ffffffff", + "width": 1 + }, + "type": "shape" + }, { + "x": 8, + "y": 499, + "width": 395, + "height": 32, + "type": "text", + "text": "App Compat Checked Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#ffffffff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 12, + "left": 0, + "right": 32 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 371, + "y": 499, + "width": 19, + "height": 19, + "border": { + "color": "#ffffffff", + "width": 1 + }, + "type": "shape" + }, { + "x": 0, + "y": 48, + "width": 411, + "height": 56, + "type": "placeholder", + "label": "Toolbar" + }] + } +}] \ No newline at end of file diff --git a/instrumented/integration/src/androidTest/assets/sr_text_fields_with_input_mask_user_input_payload.json b/instrumented/integration/src/androidTest/assets/sr_text_fields_with_input_mask_user_input_payload.json new file mode 100644 index 0000000000..270be803a0 --- /dev/null +++ b/instrumented/integration/src/androidTest/assets/sr_text_fields_with_input_mask_user_input_payload.json @@ -0,0 +1,351 @@ +[{ + "type": 4, + "data": { + "width": 411, + "height": 914 + } +}, { + "type": 6, + "data": { + "has_focus": true + } +}, { + "type": 11, + "data": { + "source": 4, + "width": 411, + "height": 914 + } +}, { + "type": 10, + "data": { + "wireframes": [{ + "x": 0, + "y": 0, + "width": 411, + "height": 914, + "shapeStyle": { + "backgroundColor": "#303030ff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 112, + "width": 395, + "height": 19, + "type": "text", + "text": "Default Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#a538afff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "alignment": { + "horizontal": "left", + "vertical": "top" + } + } + }, { + "x": 8, + "y": 140, + "width": 395, + "height": 19, + "type": "text", + "text": "Material Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#cc0000ff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "alignment": { + "horizontal": "left", + "vertical": "top" + } + } + }, { + "x": 8, + "y": 167, + "width": 395, + "height": 19, + "type": "text", + "text": "App Compat Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#ffbb33ff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 0, + "left": 0, + "right": 0 + }, + "alignment": { + "horizontal": "left", + "vertical": "top" + } + } + }, { + "x": 8, + "y": 195, + "width": 395, + "height": 44, + "type": "text", + "text": "***", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#ffffffff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 238, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#a538afff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 248, + "width": 395, + "height": 44, + "type": "text", + "text": "***", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#ffffffff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 291, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#ffbb33ff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 300, + "width": 395, + "height": 44, + "type": "text", + "text": "***", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#ffffffff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 343, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#ffbb33ff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 353, + "width": 395, + "height": 44, + "type": "text", + "text": "***", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#ffffffff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 396, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#a538afff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 406, + "width": 395, + "height": 44, + "type": "text", + "text": "***", + "textStyle": { + "family": "roboto, sans-serif", + "size": 17, + "color": "#ffffffff" + }, + "textPosition": { + "padding": { + "top": 9, + "bottom": 11, + "left": 3, + "right": 3 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 8, + "y": 449, + "width": 395, + "height": 1, + "shapeStyle": { + "backgroundColor": "#a538afff", + "opacity": 1.0 + }, + "type": "shape" + }, { + "x": 8, + "y": 459, + "width": 395, + "height": 32, + "type": "text", + "text": "Checked Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#ffffffff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 12, + "left": 0, + "right": 32 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 371, + "y": 459, + "width": 19, + "height": 19, + "border": { + "color": "#ffffffff", + "width": 1 + }, + "type": "shape" + }, { + "x": 8, + "y": 499, + "width": 395, + "height": 32, + "type": "text", + "text": "App Compat Checked Text View", + "textStyle": { + "family": "roboto, sans-serif", + "size": 14, + "color": "#ffffffff" + }, + "textPosition": { + "padding": { + "top": 0, + "bottom": 12, + "left": 0, + "right": 32 + }, + "alignment": { + "horizontal": "left", + "vertical": "center" + } + } + }, { + "x": 371, + "y": 499, + "width": 19, + "height": 19, + "border": { + "color": "#ffffffff", + "width": 1 + }, + "type": "shape" + }, { + "x": 0, + "y": 48, + "width": 411, + "height": 56, + "type": "placeholder", + "label": "Toolbar" + }] + } +}] \ No newline at end of file diff --git a/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/SrTest.kt b/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/SrTest.kt index 467257100b..3b58e00163 100644 --- a/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/SrTest.kt +++ b/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/SrTest.kt @@ -25,20 +25,21 @@ import java.util.zip.Inflater internal abstract class SrTest> { - protected abstract fun runInstrumentationScenario(mockServerRule: T): ExpectedSrData + protected abstract fun runInstrumentationScenario(mockServerRule: T) protected fun verifyExpectedSrData( handledRequests: List, - expectedPayloadFileName: String + expectedPayloadFileName: String, + matchingStrategy: MatchingStrategy = MatchingStrategy.EXACT ) { val records = handledRequests .mapNotNull { it.extractSrSegmentAsJson()?.asJsonObject } .flatMap { it.getAsJsonArray("records") } - .map { it.sanitizedForAssertion() } + .map { it.dropInconsistentProperties() } val expectedPayload = resolveTestExpectedPayload(expectedPayloadFileName) .asJsonArray - .map { it.sanitizedForAssertion() } - assertThat(records) + .map { it.dropInconsistentProperties() } + val assertion = assertThat(records) .usingRecursiveFieldByFieldElementComparator( RecursiveComparisonConfiguration .builder() @@ -47,7 +48,10 @@ internal abstract class SrTest> JsonPrimitive::class.java ).build() ) - .containsExactlyInAnyOrderElementsOf(expectedPayload) + when (matchingStrategy) { + MatchingStrategy.EXACT -> assertion.containsExactlyElementsOf(expectedPayload) + MatchingStrategy.CONTAINS -> assertion.containsAll(expectedPayload) + } } private fun resolveTestExpectedPayload(fileName: String): JsonElement { @@ -136,26 +140,36 @@ internal abstract class SrTest> (o1.asNumber is LazilyParsedNumber || o2.asNumber is LazilyParsedNumber) } - private fun JsonElement.sanitizedForAssertion(): JsonObject { - // We need to remove all the not deterministic fields from the payload as they will alter + private fun JsonElement.dropInconsistentProperties(): JsonObject { + // We need to remove all the inconsistent properties from the payload as they will alter // the tests. The timestamps and ids are auto - generated and we could not predict them. - // For the wireframes dimensions and positions we need to remove them because the tests - // will be executed in CI on different device models and we cannot predict the exact values. - // We will need to have an additional task at the end where we will try to solve this by - // maybe providing specific payloads to assess based on the device model. + // For the wireframes x,y and positions we need to remove them because the tests + // will be executed in Bitrise and currently Bitrise does not own a specific model for the + // API 33. They only have a standard emulator for this API with the required screen size and + // X,Y positions are different from the ones we have in our local emulator. return this.asJsonObject.apply { remove("timestamp") - get("data")?.asJsonObject?.get("wireframes")?.asJsonArray?.forEach { dataElement -> - val asJsonObject = dataElement.asJsonObject - asJsonObject.remove("id") - asJsonObject.remove("x") - asJsonObject.remove("y") - asJsonObject.remove("width") - asJsonObject.remove("height") + get("data")?.asJsonObject?.let { + it.get("wireframes")?.asJsonArray?.forEach { dataElement -> + val asJsonObject = dataElement.asJsonObject + asJsonObject.remove("id") + asJsonObject.remove("x") + asJsonObject.remove("y") + } } } } + /** + * The matching strategy to use when comparing the expected payload with the actual one. + * @see EXACT will compare the payloads exactly as they are. + * @see CONTAINS will check if the actual payload contains all the expected elements. + */ + enum class MatchingStrategy { + EXACT, + CONTAINS + } + companion object { internal val INITIAL_WAIT_MS = TimeUnit.SECONDS.toMillis(60) private val SEGMENT_FORM_DATA_REGEX = diff --git a/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/textfields/SrTextFieldsAllowTest.kt b/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/textfields/SrTextFieldsAllowTest.kt new file mode 100644 index 0000000000..3e55a09758 --- /dev/null +++ b/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/textfields/SrTextFieldsAllowTest.kt @@ -0,0 +1,50 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2016-Present Datadog, Inc. + */ + +package com.datadog.android.sdk.integration.sessionreplay.textfields + +import androidx.test.platform.app.InstrumentationRegistry +import com.datadog.android.privacy.TrackingConsent +import com.datadog.android.sdk.integration.RuntimeConfig +import com.datadog.android.sdk.integration.sessionreplay.SessionReplayTextFieldsActivity +import com.datadog.android.sdk.integration.sessionreplay.SrSnapshotTest +import com.datadog.android.sdk.rules.SessionReplayTestRule +import com.datadog.android.sdk.utils.SR_PRIVACY_LEVEL +import com.datadog.android.sessionreplay.SessionReplayPrivacy +import com.datadog.tools.unit.ConditionWatcher +import org.junit.Rule +import org.junit.Test + +internal class SrTextFieldsAllowTest : SrSnapshotTest() { + + @get:Rule + val rule = SessionReplayTestRule( + SessionReplayTextFieldsActivity::class.java, + trackingConsent = TrackingConsent.GRANTED, + keepRequests = true, + intentExtras = mapOf(SR_PRIVACY_LEVEL to SessionReplayPrivacy.ALLOW) + ) + + @Test + fun verifySessionFirstSnapshot() { + // Wait to make sure all batches are consumed + InstrumentationRegistry.getInstrumentation().waitForIdleSync() + runInstrumentationScenario(rule) + ConditionWatcher { + // verify the captured log events into the MockedWebServer + verifyExpectedSrData( + rule.getRequests(RuntimeConfig.sessionReplayEndpointUrl), + EXPECTED_PAYLOAD_FILE_NAME, + MatchingStrategy.CONTAINS + ) + true + }.doWait(timeoutMs = INITIAL_WAIT_MS) + } + + companion object { + const val EXPECTED_PAYLOAD_FILE_NAME = "sr_text_fields_allow_payload.json" + } +} diff --git a/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/textfields/SrTextFieldsMaskTest.kt b/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/textfields/SrTextFieldsMaskTest.kt new file mode 100644 index 0000000000..2111531d33 --- /dev/null +++ b/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/textfields/SrTextFieldsMaskTest.kt @@ -0,0 +1,50 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2016-Present Datadog, Inc. + */ + +package com.datadog.android.sdk.integration.sessionreplay.textfields + +import androidx.test.platform.app.InstrumentationRegistry +import com.datadog.android.privacy.TrackingConsent +import com.datadog.android.sdk.integration.RuntimeConfig +import com.datadog.android.sdk.integration.sessionreplay.SessionReplayTextFieldsActivity +import com.datadog.android.sdk.integration.sessionreplay.SrSnapshotTest +import com.datadog.android.sdk.rules.SessionReplayTestRule +import com.datadog.android.sdk.utils.SR_PRIVACY_LEVEL +import com.datadog.android.sessionreplay.SessionReplayPrivacy +import com.datadog.tools.unit.ConditionWatcher +import org.junit.Rule +import org.junit.Test + +internal class SrTextFieldsMaskTest : SrSnapshotTest() { + + @get:Rule + val rule = SessionReplayTestRule( + SessionReplayTextFieldsActivity::class.java, + trackingConsent = TrackingConsent.GRANTED, + keepRequests = true, + intentExtras = mapOf(SR_PRIVACY_LEVEL to SessionReplayPrivacy.MASK) + ) + + @Test + fun verifySessionFirstSnapshot() { + // Wait to make sure all batches are consumed + InstrumentationRegistry.getInstrumentation().waitForIdleSync() + runInstrumentationScenario(rule) + ConditionWatcher { + // verify the captured log events into the MockedWebServer + verifyExpectedSrData( + rule.getRequests(RuntimeConfig.sessionReplayEndpointUrl), + EXPECTED_PAYLOAD_FILE_NAME, + MatchingStrategy.CONTAINS + ) + true + }.doWait(timeoutMs = INITIAL_WAIT_MS) + } + + companion object { + const val EXPECTED_PAYLOAD_FILE_NAME = "sr_text_fields_mask_payload.json" + } +} diff --git a/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/textfields/SrTextFieldsMaskUserInputTest.kt b/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/textfields/SrTextFieldsMaskUserInputTest.kt new file mode 100644 index 0000000000..6ff0604292 --- /dev/null +++ b/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/textfields/SrTextFieldsMaskUserInputTest.kt @@ -0,0 +1,50 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2016-Present Datadog, Inc. + */ + +package com.datadog.android.sdk.integration.sessionreplay.textfields + +import androidx.test.platform.app.InstrumentationRegistry +import com.datadog.android.privacy.TrackingConsent +import com.datadog.android.sdk.integration.RuntimeConfig +import com.datadog.android.sdk.integration.sessionreplay.SessionReplayTextFieldsActivity +import com.datadog.android.sdk.integration.sessionreplay.SrSnapshotTest +import com.datadog.android.sdk.rules.SessionReplayTestRule +import com.datadog.android.sdk.utils.SR_PRIVACY_LEVEL +import com.datadog.android.sessionreplay.SessionReplayPrivacy +import com.datadog.tools.unit.ConditionWatcher +import org.junit.Rule +import org.junit.Test + +internal class SrTextFieldsMaskUserInputTest : SrSnapshotTest() { + + @get:Rule + val rule = SessionReplayTestRule( + SessionReplayTextFieldsActivity::class.java, + trackingConsent = TrackingConsent.GRANTED, + keepRequests = true, + intentExtras = mapOf(SR_PRIVACY_LEVEL to SessionReplayPrivacy.MASK_USER_INPUT) + ) + + @Test + fun verifySessionFirstSnapshot() { + // Wait to make sure all batches are consumed + InstrumentationRegistry.getInstrumentation().waitForIdleSync() + runInstrumentationScenario(rule) + ConditionWatcher { + // verify the captured log events into the MockedWebServer + verifyExpectedSrData( + rule.getRequests(RuntimeConfig.sessionReplayEndpointUrl), + EXPECTED_PAYLOAD_FILE_NAME, + MatchingStrategy.CONTAINS + ) + true + }.doWait(timeoutMs = INITIAL_WAIT_MS) + } + + companion object { + const val EXPECTED_PAYLOAD_FILE_NAME = "sr_text_fields_mask_user_input_payload.json" + } +} diff --git a/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/textfields/SrTextFieldsWithInputMaskUserInputTest.kt b/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/textfields/SrTextFieldsWithInputMaskUserInputTest.kt new file mode 100644 index 0000000000..b86abf150a --- /dev/null +++ b/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/integration/sessionreplay/textfields/SrTextFieldsWithInputMaskUserInputTest.kt @@ -0,0 +1,54 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2016-Present Datadog, Inc. + */ + +package com.datadog.android.sdk.integration.sessionreplay.textfields + +import androidx.test.platform.app.InstrumentationRegistry +import com.datadog.android.privacy.TrackingConsent +import com.datadog.android.sdk.integration.RuntimeConfig +import com.datadog.android.sdk.integration.sessionreplay.SessionReplayTextFieldsWithInputActivity +import com.datadog.android.sdk.integration.sessionreplay.SrSnapshotTest +import com.datadog.android.sdk.rules.SessionReplayTestRule +import com.datadog.android.sdk.utils.SR_PRIVACY_LEVEL +import com.datadog.android.sessionreplay.SessionReplayPrivacy +import com.datadog.tools.unit.ConditionWatcher +import org.junit.Rule +import org.junit.Test + +internal class SrTextFieldsWithInputMaskUserInputTest : + SrSnapshotTest() { + + @get:Rule + val rule = SessionReplayTestRule( + SessionReplayTextFieldsWithInputActivity::class.java, + trackingConsent = TrackingConsent.GRANTED, + keepRequests = true, + intentExtras = mapOf(SR_PRIVACY_LEVEL to SessionReplayPrivacy.MASK_USER_INPUT) + ) + + @Test + fun verifySessionFirstSnapshot() { + // Wait to make sure all batches are consumed + InstrumentationRegistry.getInstrumentation().waitForIdleSync() + runInstrumentationScenario(rule) + ConditionWatcher { + // verify the captured log events into the MockedWebServer + // Here we are going to look for a payload where all edit texts that have + // predefined text are masked. + verifyExpectedSrData( + rule.getRequests(RuntimeConfig.sessionReplayEndpointUrl), + EXPECTED_PAYLOAD_FILE_NAME, + MatchingStrategy.CONTAINS + ) + true + }.doWait(timeoutMs = INITIAL_WAIT_MS) + } + + companion object { + const val EXPECTED_PAYLOAD_FILE_NAME = + "sr_text_fields_with_input_mask_user_input_payload.json" + } +} diff --git a/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/utils/ExtraIntentExtensions.kt b/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/utils/ExtraIntentExtensions.kt index 8d0d5a4aa7..2bdfbeffdf 100644 --- a/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/utils/ExtraIntentExtensions.kt +++ b/instrumented/integration/src/androidTest/kotlin/com/datadog/android/sdk/utils/ExtraIntentExtensions.kt @@ -9,6 +9,7 @@ package com.datadog.android.sdk.utils import android.content.Intent import com.datadog.android.privacy.TrackingConsent +// test fun Intent.addExtras(map: Map) { map.forEach { val value = it.value @@ -17,17 +18,13 @@ fun Intent.addExtras(map: Map) { is String -> putExtra(key, value) is Number -> putExtra(key, value) is Boolean -> putExtra(key, value) + is Enum<*> -> putExtra(key, value) } } } fun Intent.addTrackingConsent(consent: TrackingConsent) { - val consentToInt = when (consent) { - TrackingConsent.PENDING -> PENDING - TrackingConsent.GRANTED -> GRANTED - else -> NOT_GRANTED - } - this.putExtra(TRACKING_CONSENT_KEY, consentToInt) + this.putExtra(TRACKING_CONSENT_KEY, consent) } fun Intent.addForgeSeed(seed: Long) = this.putExtra(FORGE_SEED_KEY, seed) diff --git a/instrumented/integration/src/main/AndroidManifest.xml b/instrumented/integration/src/main/AndroidManifest.xml index dc369af598..f68061e017 100644 --- a/instrumented/integration/src/main/AndroidManifest.xml +++ b/instrumented/integration/src/main/AndroidManifest.xml @@ -53,6 +53,14 @@ android:name=".sessionreplay.SessionReplayPlaygroundActivity" android:label="@string/session_replay_end_to_end" android:windowSoftInputMode="adjustResize"/> + + { - val displayMetrics = activity.resources.displayMetrics - val screenDensity = displayMetrics.density - val screenHeight: Long - val screenWidth: Long - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { - val currentWindowMetrics = windowManager.currentWindowMetrics - val screenBounds = currentWindowMetrics.bounds - screenHeight = (screenBounds.bottom - screenBounds.top).toLong() - .densityNormalized(screenDensity) - screenWidth = (screenBounds.right - screenBounds.left).toLong() - .densityNormalized(screenDensity) - } else { - val size = Point() - windowManager.defaultDisplay.getSize(size) - screenHeight = size.y.toLong().densityNormalized(screenDensity) - screenWidth = size.x.toLong().densityNormalized(screenDensity) - } - return screenWidth to screenHeight - } } diff --git a/instrumented/integration/src/main/kotlin/com/datadog/android/sdk/integration/sessionreplay/SessionReplayTextFieldsActivity.kt b/instrumented/integration/src/main/kotlin/com/datadog/android/sdk/integration/sessionreplay/SessionReplayTextFieldsActivity.kt new file mode 100644 index 0000000000..e968f1421f --- /dev/null +++ b/instrumented/integration/src/main/kotlin/com/datadog/android/sdk/integration/sessionreplay/SessionReplayTextFieldsActivity.kt @@ -0,0 +1,19 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2016-Present Datadog, Inc. + */ + +package com.datadog.android.sdk.integration.sessionreplay + +import android.os.Bundle +import com.datadog.android.sdk.integration.R + +internal open class SessionReplayTextFieldsActivity : BaseSessionReplayActivity() { + + @Suppress("CheckInternal") + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.sr_text_fields_layout) + } +} diff --git a/instrumented/integration/src/main/kotlin/com/datadog/android/sdk/integration/sessionreplay/SessionReplayTextFieldsWithInputActivity.kt b/instrumented/integration/src/main/kotlin/com/datadog/android/sdk/integration/sessionreplay/SessionReplayTextFieldsWithInputActivity.kt new file mode 100644 index 0000000000..cb7d852b75 --- /dev/null +++ b/instrumented/integration/src/main/kotlin/com/datadog/android/sdk/integration/sessionreplay/SessionReplayTextFieldsWithInputActivity.kt @@ -0,0 +1,19 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2016-Present Datadog, Inc. + */ + +package com.datadog.android.sdk.integration.sessionreplay + +import android.os.Bundle +import com.datadog.android.sdk.integration.R + +internal open class SessionReplayTextFieldsWithInputActivity : BaseSessionReplayActivity() { + + @Suppress("CheckInternal") + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContentView(R.layout.sr_text_fields_with_input_layout) + } +} diff --git a/instrumented/integration/src/main/kotlin/com/datadog/android/sdk/utils/IntentExtensions.kt b/instrumented/integration/src/main/kotlin/com/datadog/android/sdk/utils/IntentExtensions.kt index 673c581b3a..92427abf7e 100644 --- a/instrumented/integration/src/main/kotlin/com/datadog/android/sdk/utils/IntentExtensions.kt +++ b/instrumented/integration/src/main/kotlin/com/datadog/android/sdk/utils/IntentExtensions.kt @@ -7,34 +7,34 @@ package com.datadog.android.sdk.utils import android.content.Intent +import android.os.Build import com.datadog.android.privacy.TrackingConsent import com.datadog.android.sessionreplay.SessionReplayPrivacy internal const val TRACKING_CONSENT_KEY = "tracking_consent" internal const val SR_PRIVACY_LEVEL = "sr_privacy_level" internal const val SR_SAMPLE_RATE = "sr_sample_rate" -internal const val PENDING = 1 -internal const val GRANTED = 2 -internal const val NOT_GRANTED = 3 -internal const val ALLOW = 1 -internal const val MASK_USER_INPUT = 2 -internal const val MASK = 3 private const val SAMPLE_IN_ALL_SESSIONS = 100f internal fun Intent.getTrackingConsent(): TrackingConsent { - return when (getIntExtra(TRACKING_CONSENT_KEY, PENDING)) { - PENDING -> TrackingConsent.PENDING - GRANTED -> TrackingConsent.GRANTED - else -> TrackingConsent.NOT_GRANTED + return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + extras?.getSerializable(TRACKING_CONSENT_KEY, TrackingConsent::class.java) + ?: TrackingConsent.NOT_GRANTED + } else { + @Suppress("DEPRECATION") + extras?.getSerializable(TRACKING_CONSENT_KEY) as? TrackingConsent + ?: TrackingConsent.NOT_GRANTED } } internal fun Intent.getSessionReplayPrivacy(): SessionReplayPrivacy { - return when (getIntExtra(SR_PRIVACY_LEVEL, ALLOW)) { - ALLOW -> SessionReplayPrivacy.ALLOW - MASK_USER_INPUT -> SessionReplayPrivacy.MASK_USER_INPUT - MASK -> SessionReplayPrivacy.MASK - else -> SessionReplayPrivacy.ALLOW + return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + extras?.getSerializable(SR_PRIVACY_LEVEL, SessionReplayPrivacy::class.java) + ?: SessionReplayPrivacy.ALLOW + } else { + @Suppress("DEPRECATION") + extras?.getSerializable(SR_PRIVACY_LEVEL) as? SessionReplayPrivacy + ?: SessionReplayPrivacy.ALLOW } } diff --git a/instrumented/integration/src/main/res/layout/sr_text_fields_layout.xml b/instrumented/integration/src/main/res/layout/sr_text_fields_layout.xml new file mode 100644 index 0000000000..b6a176e497 --- /dev/null +++ b/instrumented/integration/src/main/res/layout/sr_text_fields_layout.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/instrumented/integration/src/main/res/layout/sr_text_fields_with_input_layout.xml b/instrumented/integration/src/main/res/layout/sr_text_fields_with_input_layout.xml new file mode 100644 index 0000000000..f424da6f45 --- /dev/null +++ b/instrumented/integration/src/main/res/layout/sr_text_fields_with_input_layout.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/instrumented/integration/src/main/res/values/colors.xml b/instrumented/integration/src/main/res/values/colors.xml new file mode 100644 index 0000000000..63022eea8e --- /dev/null +++ b/instrumented/integration/src/main/res/values/colors.xml @@ -0,0 +1,19 @@ + + + + + + + #FFFFFF + #000000 + + + #A538AF + #5B34A0 + #0F0616 + + \ No newline at end of file diff --git a/instrumented/integration/src/main/res/values/dimens.xml b/instrumented/integration/src/main/res/values/dimens.xml new file mode 100644 index 0000000000..04dfd47b64 --- /dev/null +++ b/instrumented/integration/src/main/res/values/dimens.xml @@ -0,0 +1,9 @@ + + + + 8dp + \ No newline at end of file diff --git a/instrumented/integration/src/main/res/values/strings.xml b/instrumented/integration/src/main/res/values/strings.xml index 9d817aa606..3078e1d970 100644 --- a/instrumented/integration/src/main/res/values/strings.xml +++ b/instrumented/integration/src/main/res/values/strings.xml @@ -16,6 +16,7 @@ Rum Activity View (End to End) Telemetry (End to End) Session Replay (End to End) + Session Replay Text Fields (End to End) Fragment A Fragment B Fragment C @@ -26,4 +27,19 @@ Start Kiosk Back End Session + + + + Default Text View + Material Text View + App Compat Text View + Default Auto Complete Text View + Edit Text View + App Compat Edit Text View + App Compat Auto Complete Text View + Material Auto Complete Text View + Text View Components + Checked Text View + App Compat Checked Text View + \ No newline at end of file