From c2019a9881ecec4cdb5d4b2ab355ed7e578b8752 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Mon, 12 Oct 2020 13:37:42 -0700 Subject: [PATCH] [fix] Pressable cursor and touch-action styles Also add unit tests for Pressable. Fix #1764 --- .../__snapshots__/index-test.js.snap | 187 ++++++++++++++++++ .../exports/Pressable/__tests__/index-test.js | 185 +++++++++++++++++ .../src/exports/Pressable/index.js | 14 +- 3 files changed, 383 insertions(+), 3 deletions(-) create mode 100644 packages/react-native-web/src/exports/Pressable/__tests__/__snapshots__/index-test.js.snap create mode 100644 packages/react-native-web/src/exports/Pressable/__tests__/index-test.js diff --git a/packages/react-native-web/src/exports/Pressable/__tests__/__snapshots__/index-test.js.snap b/packages/react-native-web/src/exports/Pressable/__tests__/__snapshots__/index-test.js.snap new file mode 100644 index 00000000..41cba9d2 --- /dev/null +++ b/packages/react-native-web/src/exports/Pressable/__tests__/__snapshots__/index-test.js.snap @@ -0,0 +1,187 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`components/Pressable default 1`] = ` +
+`; + +exports[`components/Pressable focus interaction 1`] = ` +
+`; + +exports[`components/Pressable focus interaction 2`] = ` +
+
+
+`; + +exports[`components/Pressable focus interaction 3`] = ` +
+`; + +exports[`components/Pressable hover interaction 1`] = ` +
+`; + +exports[`components/Pressable hover interaction 2`] = ` +
+
+
+`; + +exports[`components/Pressable hover interaction 3`] = ` +
+`; + +exports[`components/Pressable press interaction 1`] = ` +
+`; + +exports[`components/Pressable press interaction 2`] = ` +
+
+
+`; + +exports[`components/Pressable press interaction 3`] = ` +
+`; + +exports[`components/Pressable prop "accessibilityLabel" value is set 1`] = ` +
+`; + +exports[`components/Pressable prop "accessibilityLiveRegion" value is set 1`] = ` +
+`; + +exports[`components/Pressable prop "accessibilityRole" value alters HTML element 1`] = ` + +`; + +exports[`components/Pressable prop "accessibilityRole" value is "button" 1`] = ` +
+`; + +exports[`components/Pressable prop "accessibilityRole" value is set 1`] = ` +