redbadger/pride-london-app

View on GitHub
src/components/__snapshots__/Header.test.js.snap

Summary

Maintainability
Test Coverage
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Header renders correctly with all props 1`] = `
<View
  style={
    Object {
      "backgroundColor": "#2d2f7f",
    }
  }
>
  <ContentPadding
    padding={Object {}}
    style={
      Object {
        "alignItems": "center",
        "alignSelf": "center",
        "flexDirection": "row",
        "height": 48,
        "justifyContent": "space-between",
        "maxWidth": 440,
        "width": "100%",
      }
    }
  >
    <View
      style={
        Object {
          "alignItems": "flex-start",
          "flex": 1,
          "marginRight": "auto",
        }
      }
    >
      <Text>
        Left
      </Text>
    </View>
    <View
      style={
        Object {
          "alignItems": "center",
          "flex": 0,
          "paddingTop": 4,
        }
      }
    >
      <Text
        accessibilityLabel="Center"
        accessibilityLiveRegion="polite"
        accessibilityTraits={
          Array [
            "header",
          ]
        }
        accessible={true}
        color="whiteColor"
        markdown={false}
        markdownStyle={Object {}}
        type="h2"
      >
        Center
      </Text>
    </View>
    <View
      style={
        Object {
          "alignItems": "flex-end",
          "flex": 1,
          "marginLeft": "auto",
        }
      }
    >
      <Text>
        Right
      </Text>
    </View>
  </ContentPadding>
</View>
`;

exports[`Header renders correctly with default props 1`] = `
<View
  style={
    Object {
      "backgroundColor": "#2d2f7f",
    }
  }
>
  <ContentPadding
    padding={Object {}}
    style={
      Object {
        "alignItems": "center",
        "alignSelf": "center",
        "flexDirection": "row",
        "height": 48,
        "justifyContent": "space-between",
        "maxWidth": 440,
        "width": "100%",
      }
    }
  >
    <View
      style={
        Object {
          "alignItems": "flex-start",
          "flex": 1,
          "marginRight": "auto",
        }
      }
    />
    <View
      style={
        Object {
          "alignItems": "center",
          "flex": 0,
          "paddingTop": 4,
        }
      }
    >
      <Text
        accessibilityLiveRegion="polite"
        accessibilityTraits={
          Array [
            "header",
          ]
        }
        accessible={true}
        color="whiteColor"
        markdown={false}
        markdownStyle={Object {}}
        type="h2"
      />
    </View>
    <View
      style={
        Object {
          "alignItems": "flex-end",
          "flex": 1,
          "marginLeft": "auto",
        }
      }
    />
  </ContentPadding>
</View>
`;

exports[`Header renders correctly with only onBack and rightElement 1`] = `
<View
  style={
    Object {
      "backgroundColor": "#2d2f7f",
    }
  }
>
  <ContentPadding
    padding={Object {}}
    style={
      Object {
        "alignItems": "center",
        "alignSelf": "center",
        "flexDirection": "row",
        "height": 48,
        "justifyContent": "space-between",
        "maxWidth": 440,
        "width": "100%",
      }
    }
  >
    <View
      style={
        Object {
          "alignItems": "flex-start",
          "flex": 1,
          "marginRight": "auto",
        }
      }
    >
      <Text>
        Left
      </Text>
    </View>
    <View
      style={
        Object {
          "alignItems": "center",
          "flex": 0,
          "paddingTop": 4,
        }
      }
    >
      <Text
        accessibilityLiveRegion="polite"
        accessibilityTraits={
          Array [
            "header",
          ]
        }
        accessible={true}
        color="whiteColor"
        markdown={false}
        markdownStyle={Object {}}
        type="h2"
      />
    </View>
    <View
      style={
        Object {
          "alignItems": "flex-end",
          "flex": 1,
          "marginLeft": "auto",
        }
      }
    >
      <Text>
        Right
      </Text>
    </View>
  </ContentPadding>
</View>
`;

exports[`Header renders correctly with only title 1`] = `
<View
  style={
    Object {
      "backgroundColor": "#2d2f7f",
    }
  }
>
  <ContentPadding
    padding={Object {}}
    style={
      Object {
        "alignItems": "center",
        "alignSelf": "center",
        "flexDirection": "row",
        "height": 48,
        "justifyContent": "space-between",
        "maxWidth": 440,
        "width": "100%",
      }
    }
  >
    <View
      style={
        Object {
          "alignItems": "flex-start",
          "flex": 1,
          "marginRight": "auto",
        }
      }
    />
    <View
      style={
        Object {
          "alignItems": "center",
          "flex": 0,
          "paddingTop": 4,
        }
      }
    >
      <Text
        accessibilityLabel="Center"
        accessibilityLiveRegion="polite"
        accessibilityTraits={
          Array [
            "header",
          ]
        }
        accessible={true}
        color="whiteColor"
        markdown={false}
        markdownStyle={Object {}}
        type="h2"
      >
        Center
      </Text>
    </View>
    <View
      style={
        Object {
          "alignItems": "flex-end",
          "flex": 1,
          "marginLeft": "auto",
        }
      }
    />
  </ContentPadding>
</View>
`;

exports[`Header.BackButton renders correctly with default props 1`] = `
<IconButton
  accessibilityLabel="Back"
  onPress={[Function]}
  source={1}
/>
`;