teamdigitale/italia-app

View on GitHub
ts/components/__tests__/__snapshots__/LoadingSpinnerOverlay.test.tsx.snap

Summary

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

exports[`LoadingSpinnerOverlay Should match all-properties and loading snapshot 1`] = `
<View
  style={
    Object {
      "flex": 1,
    }
  }
  testID="overlayComponent"
>
  <View
    style={
      Array [
        Object {
          "backgroundColor": "#FFFFFF",
          "bottom": 0,
          "inset": 0,
          "justifyContent": "center",
          "left": 0,
          "position": "absolute",
          "right": 0,
          "top": 0,
          "zIndex": 1,
        },
        Object {
          "backgroundColor": "rgba(255,255,255,0.65)",
          "opacity": 1,
        },
      ]
    }
  >
    <View
      style={
        Array [
          Object {
            "alignItems": "center",
            "flex": 1,
            "height": 100,
            "justifyContent": "center",
          },
          undefined,
        ]
      }
    >
      <View
        accessibilityRole="progressbar"
        accessible={true}
        importantForAccessibility="no-hide-descendants"
        style={
          Object {
            "height": 24,
            "width": 24,
          }
        }
        testID="LoadingSpinnerTestID"
      >
        <View
          collapsable={false}
          style={
            Object {
              "transform": Array [
                Object {
                  "rotateZ": "0deg",
                },
              ],
            }
          }
          testID="LoadingSpinnerAnimatedTestID"
        >
          <RNSVGSvgView
            align="xMidYMid"
            bbHeight={24}
            bbWidth={24}
            fill="none"
            focusable={false}
            height={24}
            meetOrSlice={0}
            minX={0}
            minY={0}
            style={
              Array [
                Object {
                  "backgroundColor": "transparent",
                  "borderWidth": 0,
                },
                Object {
                  "flex": 0,
                  "height": 24,
                  "width": 24,
                },
              ]
            }
            vbHeight={24}
            vbWidth={24}
            width={24}
          >
            <RNSVGGroup
              fill={null}
              propList={
                Array [
                  "fill",
                ]
              }
            >
              <RNSVGDefs>
                <RNSVGLinearGradient
                  gradient={
                    Array [
                      0,
                      736995,
                      1,
                      -16040221,
                    ]
                  }
                  gradientTransform={null}
                  gradientUnits={0}
                  name="spinner-secondHalf"
                  x1="0%"
                  x2="100%"
                  y1="0%"
                  y2="0%"
                />
                <RNSVGLinearGradient
                  gradient={
                    Array [
                      0,
                      -16040221,
                      1,
                      -16040221,
                    ]
                  }
                  gradientTransform={null}
                  gradientUnits={0}
                  name="spinner-firstHalf"
                  x1="0%"
                  x2="100%"
                  y1="0%"
                  y2="0%"
                />
              </RNSVGDefs>
              <RNSVGGroup
                fill={
                  Object {
                    "payload": 4278190080,
                    "type": 0,
                  }
                }
                propList={
                  Array [
                    "strokeWidth",
                  ]
                }
                strokeWidth={3}
              >
                <RNSVGPath
                  d="M 1.5 12 A 10.5 10.5 0 0 1 22.5 12"
                  fill={
                    Object {
                      "payload": 4278190080,
                      "type": 0,
                    }
                  }
                  propList={
                    Array [
                      "stroke",
                    ]
                  }
                  stroke={
                    Object {
                      "brushRef": "spinner-secondHalf",
                      "type": 1,
                    }
                  }
                />
                <RNSVGPath
                  d="M 22.5 12 A 10.5 10.5 0 0 1 1.5 12"
                  fill={
                    Object {
                      "payload": 4278190080,
                      "type": 0,
                    }
                  }
                  propList={
                    Array [
                      "stroke",
                    ]
                  }
                  stroke={
                    Object {
                      "brushRef": "spinner-firstHalf",
                      "type": 1,
                    }
                  }
                />
                <RNSVGPath
                  d="M 1.5 12 A 10.5 10.5 0 0 1 1.5 11.25"
                  fill={
                    Object {
                      "payload": 4278190080,
                      "type": 0,
                    }
                  }
                  propList={
                    Array [
                      "stroke",
                      "strokeLinecap",
                    ]
                  }
                  stroke={
                    Object {
                      "payload": 4278927075,
                      "type": 0,
                    }
                  }
                  strokeLinecap={1}
                />
              </RNSVGGroup>
            </RNSVGGroup>
          </RNSVGSvgView>
        </View>
      </View>
      <View
        style={
          Object {
            "padding": 24,
          }
        }
      >
        <Text
          accessible={true}
          color="bluegrey"
          defaultColor="bluegrey"
          defaultWeight="Regular"
          font="TitilliumWeb"
          fontStyle={
            Object {
              "fontSize": 16,
              "lineHeight": 24,
            }
          }
          style={
            Array [
              Object {
                "textAlign": "center",
              },
              Object {
                "fontSize": 16,
                "lineHeight": 24,
              },
              Object {
                "color": "#475A6D",
                "fontFamily": "Titillium Web",
                "fontStyle": "normal",
                "fontWeight": "400",
              },
            ]
          }
          weight="Regular"
        >
          This is the loading caption
        </Text>
      </View>
      <View
        style={
          Object {
            "alignSelf": "center",
          }
        }
      >
        <View
          accessibilityLabel="Cancel"
          accessibilityRole="button"
          accessibilityState={
            Object {
              "disabled": false,
            }
          }
          accessible={true}
          collapsable={false}
          focusable={true}
          onBlur={[Function]}
          onClick={[Function]}
          onFocus={[Function]}
          onResponderGrant={[Function]}
          onResponderMove={[Function]}
          onResponderRelease={[Function]}
          onResponderTerminate={[Function]}
          onResponderTerminationRequest={[Function]}
          onStartShouldSetResponder={[Function]}
          style={
            Object {
              "alignSelf": "flex-start",
            }
          }
          testID="loadingSpinnerOverlayCancelButton"
        >
          <View
            style={
              Array [
                Object {
                  "alignItems": "center",
                  "borderRadius": 4,
                  "elevation": 0,
                  "flexDirection": "row",
                  "justifyContent": "center",
                  "paddingHorizontal": 16,
                  "textAlignVertical": "center",
                },
                false,
                Object {
                  "borderWidth": 1,
                },
                Object {
                  "height": 40,
                },
                false,
                Object {
                  "backgroundColor": "rgba(0,115,230,0)",
                  "borderColor": "#0073E6",
                },
                Object {
                  "backgroundColor": undefined,
                  "borderColor": undefined,
                  "transform": Array [
                    Object {
                      "scale": undefined,
                    },
                  ],
                },
              ]
            }
          >
            <Text
              accessibilityElementsHidden={true}
              accessible={false}
              allowFontScaling={false}
              ellipsizeMode="tail"
              importantForAccessibility="no-hide-descendants"
              maxFontSizeMultiplier={1.3}
              numberOfLines={1}
              style={
                Array [
                  Object {
                    "fontFamily": "Titillium Web",
                    "fontStyle": "normal",
                    "fontWeight": "700",
                  },
                  Object {
                    "alignSelf": "center",
                  },
                  Object {
                    "color": "#0073E6",
                  },
                  Object {
                    "color": undefined,
                  },
                ]
              }
            >
              Cancel
            </Text>
          </View>
        </View>
      </View>
    </View>
  </View>
  <View
    style={
      Array [
        Object {
          "flex": 1,
        },
        Object {
          "zIndex": 0,
        },
      ]
    }
  >
    <Text>
      This is a child
    </Text>
  </View>
</View>
`;

exports[`LoadingSpinnerOverlay Should match all-properties and not-loading snapshot 1`] = `
<View
  style={
    Object {
      "flex": 1,
    }
  }
  testID="overlayComponent"
>
  <View
    style={
      Array [
        Object {
          "flex": 1,
        },
        Object {
          "zIndex": 0,
        },
      ]
    }
  >
    <Text>
      This is a child
    </Text>
  </View>
</View>
`;

exports[`LoadingSpinnerOverlay Should match base loading snapshot 1`] = `
<View
  style={
    Object {
      "flex": 1,
    }
  }
  testID="overlayComponent"
>
  <View
    style={
      Array [
        Object {
          "backgroundColor": "#FFFFFF",
          "bottom": 0,
          "inset": 0,
          "justifyContent": "center",
          "left": 0,
          "position": "absolute",
          "right": 0,
          "top": 0,
          "zIndex": 1,
        },
        Object {
          "backgroundColor": "rgba(255,255,255,0.7)",
          "opacity": 1,
        },
      ]
    }
  >
    <View
      style={
        Array [
          Object {
            "alignItems": "center",
            "flex": 1,
            "height": 100,
            "justifyContent": "center",
          },
          undefined,
        ]
      }
    >
      <View
        accessibilityRole="progressbar"
        accessible={true}
        importantForAccessibility="no-hide-descendants"
        style={
          Object {
            "height": 24,
            "width": 24,
          }
        }
        testID="LoadingSpinnerTestID"
      >
        <View
          collapsable={false}
          style={
            Object {
              "transform": Array [
                Object {
                  "rotateZ": "0deg",
                },
              ],
            }
          }
          testID="LoadingSpinnerAnimatedTestID"
        >
          <RNSVGSvgView
            align="xMidYMid"
            bbHeight={24}
            bbWidth={24}
            fill="none"
            focusable={false}
            height={24}
            meetOrSlice={0}
            minX={0}
            minY={0}
            style={
              Array [
                Object {
                  "backgroundColor": "transparent",
                  "borderWidth": 0,
                },
                Object {
                  "flex": 0,
                  "height": 24,
                  "width": 24,
                },
              ]
            }
            vbHeight={24}
            vbWidth={24}
            width={24}
          >
            <RNSVGGroup
              fill={null}
              propList={
                Array [
                  "fill",
                ]
              }
            >
              <RNSVGDefs>
                <RNSVGLinearGradient
                  gradient={
                    Array [
                      0,
                      736995,
                      1,
                      -16040221,
                    ]
                  }
                  gradientTransform={null}
                  gradientUnits={0}
                  name="spinner-secondHalf"
                  x1="0%"
                  x2="100%"
                  y1="0%"
                  y2="0%"
                />
                <RNSVGLinearGradient
                  gradient={
                    Array [
                      0,
                      -16040221,
                      1,
                      -16040221,
                    ]
                  }
                  gradientTransform={null}
                  gradientUnits={0}
                  name="spinner-firstHalf"
                  x1="0%"
                  x2="100%"
                  y1="0%"
                  y2="0%"
                />
              </RNSVGDefs>
              <RNSVGGroup
                fill={
                  Object {
                    "payload": 4278190080,
                    "type": 0,
                  }
                }
                propList={
                  Array [
                    "strokeWidth",
                  ]
                }
                strokeWidth={3}
              >
                <RNSVGPath
                  d="M 1.5 12 A 10.5 10.5 0 0 1 22.5 12"
                  fill={
                    Object {
                      "payload": 4278190080,
                      "type": 0,
                    }
                  }
                  propList={
                    Array [
                      "stroke",
                    ]
                  }
                  stroke={
                    Object {
                      "brushRef": "spinner-secondHalf",
                      "type": 1,
                    }
                  }
                />
                <RNSVGPath
                  d="M 22.5 12 A 10.5 10.5 0 0 1 1.5 12"
                  fill={
                    Object {
                      "payload": 4278190080,
                      "type": 0,
                    }
                  }
                  propList={
                    Array [
                      "stroke",
                    ]
                  }
                  stroke={
                    Object {
                      "brushRef": "spinner-firstHalf",
                      "type": 1,
                    }
                  }
                />
                <RNSVGPath
                  d="M 1.5 12 A 10.5 10.5 0 0 1 1.5 11.25"
                  fill={
                    Object {
                      "payload": 4278190080,
                      "type": 0,
                    }
                  }
                  propList={
                    Array [
                      "stroke",
                      "strokeLinecap",
                    ]
                  }
                  stroke={
                    Object {
                      "payload": 4278927075,
                      "type": 0,
                    }
                  }
                  strokeLinecap={1}
                />
              </RNSVGGroup>
            </RNSVGGroup>
          </RNSVGSvgView>
        </View>
      </View>
      <View
        style={
          Object {
            "padding": 24,
          }
        }
      >
        <Text
          accessible={true}
          color="bluegrey"
          defaultColor="bluegrey"
          defaultWeight="Regular"
          font="TitilliumWeb"
          fontStyle={
            Object {
              "fontSize": 16,
              "lineHeight": 24,
            }
          }
          style={
            Array [
              Object {
                "textAlign": "center",
              },
              Object {
                "fontSize": 16,
                "lineHeight": 24,
              },
              Object {
                "color": "#475A6D",
                "fontFamily": "Titillium Web",
                "fontStyle": "normal",
                "fontWeight": "400",
              },
            ]
          }
          weight="Regular"
        >
          Wait a few seconds..
        </Text>
      </View>
    </View>
  </View>
  <View
    style={
      Array [
        Object {
          "flex": 1,
        },
        Object {
          "zIndex": 0,
        },
      ]
    }
  />
</View>
`;

exports[`LoadingSpinnerOverlay Should match base no-loading snapshot 1`] = `
<View
  style={
    Object {
      "flex": 1,
    }
  }
  testID="overlayComponent"
>
  <View
    style={
      Array [
        Object {
          "flex": 1,
        },
        Object {
          "zIndex": 0,
        },
      ]
    }
  />
</View>
`;