about summary refs log tree commit diff
path: root/__tests__/view/shell/mobile/__snapshots__/index.test.tsx.snap
diff options
context:
space:
mode:
authorJoão Ferreiro <ferreiro@pinkroom.dev>2022-12-22 15:32:39 +0000
committerGitHub <noreply@github.com>2022-12-22 09:32:39 -0600
commit7517b65dcd676f36d38f31c991929c32168b3e12 (patch)
tree65793d2575b205365c2997b4bbddc1ba6424d2ba /__tests__/view/shell/mobile/__snapshots__/index.test.tsx.snap
parent4913a07e3365d2004e67e9131dd4b4c15094dd33 (diff)
downloadvoidsky-7517b65dcd676f36d38f31c991929c32168b3e12.tar.zst
Unit testing (#32)
* add testing lib

* remove coverage folder from git

* finished basic test setup

* fix tests typescript and import paths

* add first snapshot

* testing utils

* rename test files; update script flags; ++tests

* testing utils functions

* testing downloadAndResize wip

* remove download test

* specify unwanted coverage paths;
remove update snapshots flag

* fix strings tests

* testing downloadAndResize method

* increasing testing

* fixing snapshots wip

* fixed shell mobile snapshot

* adding snapshots for the screens

* fix onboard snapshot

* fix typescript issues

* fix TabsSelector snapshot

* Account for testing device's locale in ago() tests

* Remove platform detection on regex

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to '__tests__/view/shell/mobile/__snapshots__/index.test.tsx.snap')
-rw-r--r--__tests__/view/shell/mobile/__snapshots__/index.test.tsx.snap421
1 files changed, 421 insertions, 0 deletions
diff --git a/__tests__/view/shell/mobile/__snapshots__/index.test.tsx.snap b/__tests__/view/shell/mobile/__snapshots__/index.test.tsx.snap
new file mode 100644
index 000000000..793668b73
--- /dev/null
+++ b/__tests__/view/shell/mobile/__snapshots__/index.test.tsx.snap
@@ -0,0 +1,421 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`MobileShell renders correctly 1`] = `
+<BVLinearGradient
+  colors={
+    Array [
+      4278222079,
+      4278238463,
+    ]
+  }
+  endPoint={
+    Object {
+      "x": 0,
+      "y": 1,
+    }
+  }
+  locations={null}
+  startPoint={
+    Object {
+      "x": 0,
+      "y": 0.8,
+    }
+  }
+  style={
+    Object {
+      "flex": 1,
+      "height": "100%",
+    }
+  }
+>
+  <RCTSafeAreaView
+    emulateUnlessSupported={true}
+    style={
+      Object {
+        "flex": 1,
+      }
+    }
+  >
+    <View
+      style={
+        Object {
+          "flex": 1,
+        }
+      }
+    >
+      <View
+        style={
+          Object {
+            "flex": 2,
+            "justifyContent": "center",
+          }
+        }
+      >
+        <View
+          style={
+            Object {
+              "flexDirection": "row",
+              "justifyContent": "center",
+            }
+          }
+        >
+          <RNSVGSvgView
+            bbHeight="100"
+            bbWidth="100"
+            focusable={false}
+            height="100"
+            style={
+              Array [
+                Object {
+                  "backgroundColor": "transparent",
+                  "borderWidth": 0,
+                },
+                Object {
+                  "flex": 0,
+                  "height": 100,
+                  "width": 100,
+                },
+              ]
+            }
+            width="100"
+          >
+            <RNSVGGroup>
+              <RNSVGCircle
+                cx="50"
+                cy="50"
+                fill={null}
+                propList={
+                  Array [
+                    "fill",
+                    "stroke",
+                    "strokeWidth",
+                  ]
+                }
+                r="46"
+                stroke={4294967295}
+                strokeWidth={2}
+              />
+              <RNSVGLine
+                propList={
+                  Array [
+                    "stroke",
+                    "strokeWidth",
+                  ]
+                }
+                stroke={4294967295}
+                strokeWidth={1}
+                x1="30"
+                x2="30"
+                y1="0"
+                y2="100"
+              />
+              <RNSVGLine
+                propList={
+                  Array [
+                    "stroke",
+                    "strokeWidth",
+                  ]
+                }
+                stroke={4294967295}
+                strokeWidth={1}
+                x1="74"
+                x2="74"
+                y1="0"
+                y2="100"
+              />
+              <RNSVGLine
+                propList={
+                  Array [
+                    "stroke",
+                    "strokeWidth",
+                  ]
+                }
+                stroke={4294967295}
+                strokeWidth={1}
+                x1="0"
+                x2="100"
+                y1="22"
+                y2="22"
+              />
+              <RNSVGLine
+                propList={
+                  Array [
+                    "stroke",
+                    "strokeWidth",
+                  ]
+                }
+                stroke={4294967295}
+                strokeWidth={1}
+                x1="0"
+                x2="100"
+                y1="74"
+                y2="74"
+              />
+              <RNSVGText
+                content={null}
+                dx={Array []}
+                dy={Array []}
+                fill={null}
+                font={
+                  Object {
+                    "fontSize": "60",
+                    "fontWeight": "bold",
+                    "textAnchor": "middle",
+                  }
+                }
+                propList={
+                  Array [
+                    "fill",
+                    "stroke",
+                    "strokeWidth",
+                  ]
+                }
+                rotate={Array []}
+                stroke={4294967295}
+                strokeWidth={2}
+                x={
+                  Array [
+                    "52",
+                  ]
+                }
+                y={
+                  Array [
+                    "70",
+                  ]
+                }
+              >
+                <RNSVGTSpan
+                  content="B"
+                  dx={Array []}
+                  dy={Array []}
+                  font={Object {}}
+                  rotate={Array []}
+                  x={Array []}
+                  y={Array []}
+                />
+              </RNSVGText>
+            </RNSVGGroup>
+          </RNSVGSvgView>
+        </View>
+        <Text
+          style={
+            Array [
+              Object {
+                "color": "#000000",
+              },
+              Object {
+                "color": "#ffffff",
+                "fontSize": 68,
+                "fontWeight": "bold",
+                "textAlign": "center",
+              },
+            ]
+          }
+        >
+          Bluesky
+        </Text>
+        <Text
+          style={
+            Array [
+              Object {
+                "color": "#000000",
+              },
+              Object {
+                "color": "#ffffff",
+                "fontSize": 18,
+                "textAlign": "center",
+              },
+            ]
+          }
+        >
+          [ private beta ]
+        </Text>
+      </View>
+      <View
+        style={
+          Object {
+            "flex": 1,
+          }
+        }
+      >
+        <View
+          accessible={true}
+          collapsable={false}
+          focusable={true}
+          onClick={[Function]}
+          onResponderGrant={[Function]}
+          onResponderMove={[Function]}
+          onResponderRelease={[Function]}
+          onResponderTerminate={[Function]}
+          onResponderTerminationRequest={[Function]}
+          onStartShouldSetResponder={[Function]}
+          style={
+            Object {
+              "backgroundColor": "#0085ff",
+              "borderColor": "#ffffff",
+              "borderRadius": 10,
+              "borderWidth": 1,
+              "marginBottom": 20,
+              "marginHorizontal": 20,
+              "opacity": 1,
+              "paddingVertical": 16,
+            }
+          }
+        >
+          <Text
+            style={
+              Array [
+                Object {
+                  "color": "#000000",
+                },
+                Object {
+                  "color": "#ffffff",
+                  "fontSize": 18,
+                  "fontWeight": "bold",
+                  "textAlign": "center",
+                },
+              ]
+            }
+          >
+            Create a new account
+          </Text>
+        </View>
+        <View
+          style={
+            Object {
+              "marginBottom": 20,
+            }
+          }
+        >
+          <RNSVGSvgView
+            bbHeight="1"
+            bbWidth={750}
+            focusable={false}
+            height="1"
+            style={
+              Array [
+                Object {
+                  "backgroundColor": "transparent",
+                  "borderWidth": 0,
+                },
+                Object {
+                  "position": "absolute",
+                  "top": 10,
+                },
+                Object {
+                  "flex": 0,
+                  "height": 1,
+                  "width": 750,
+                },
+              ]
+            }
+            width={750}
+          >
+            <RNSVGGroup>
+              <RNSVGLine
+                propList={
+                  Array [
+                    "stroke",
+                    "strokeWidth",
+                  ]
+                }
+                stroke={4294967295}
+                strokeWidth="1"
+                x1="30"
+                x2={355}
+                y1="0"
+                y2="0"
+              />
+              <RNSVGLine
+                propList={
+                  Array [
+                    "stroke",
+                    "strokeWidth",
+                  ]
+                }
+                stroke={4294967295}
+                strokeWidth="1"
+                x1={395}
+                x2={720}
+                y1="0"
+                y2="0"
+              />
+            </RNSVGGroup>
+          </RNSVGSvgView>
+          <Text
+            style={
+              Array [
+                Object {
+                  "color": "#000000",
+                },
+                Object {
+                  "color": "#ffffff",
+                  "fontSize": 16,
+                  "textAlign": "center",
+                },
+              ]
+            }
+          >
+            or
+          </Text>
+        </View>
+        <View
+          accessible={true}
+          collapsable={false}
+          focusable={true}
+          onClick={[Function]}
+          onResponderGrant={[Function]}
+          onResponderMove={[Function]}
+          onResponderRelease={[Function]}
+          onResponderTerminate={[Function]}
+          onResponderTerminationRequest={[Function]}
+          onStartShouldSetResponder={[Function]}
+          style={
+            Object {
+              "backgroundColor": "#0085ff",
+              "borderColor": "#ffffff",
+              "borderRadius": 10,
+              "borderWidth": 1,
+              "marginBottom": 20,
+              "marginHorizontal": 20,
+              "opacity": 1,
+              "paddingVertical": 16,
+            }
+          }
+        >
+          <Text
+            style={
+              Array [
+                Object {
+                  "color": "#000000",
+                },
+                Object {
+                  "color": "#ffffff",
+                  "fontSize": 18,
+                  "fontWeight": "bold",
+                  "textAlign": "center",
+                },
+              ]
+            }
+          >
+            Sign in
+          </Text>
+        </View>
+      </View>
+    </View>
+  </RCTSafeAreaView>
+  <View
+    enablePanDownToClose={true}
+    index={-1}
+    keyboardBehavior="fillParent"
+    onChange={[Function]}
+    snapPoints={
+      Array [
+        "10%",
+      ]
+    }
+  >
+    <View />
+  </View>
+</BVLinearGradient>
+`;