Skip to content

Commit

Permalink
Fix snapshots / type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lawrencewin committed Mar 21, 2024
1 parent 5df7386 commit 69bf5b7
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/components/Divider/src/Divider.styling.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useMemo } from 'react';
import type { ViewProps, ColorValue, StyleProp, ViewStyle } from 'react-native';
import type { ViewProps, ColorValue } from 'react-native';
import { Platform } from 'react-native';

import { memoize, mergeProps, mergeStyles } from '@fluentui-react-native/framework';
Expand Down
5 changes: 0 additions & 5 deletions packages/components/Divider/src/__tests__/Divider.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';

import { checkReRender } from '@fluentui-react-native/test-tools';
import * as renderer from 'react-test-renderer';

import { Divider } from '../Divider';
Expand Down Expand Up @@ -95,8 +94,4 @@ describe('Divider component tests', () => {
const tree = renderer.create(<CustomDivider {...props}>Hello</CustomDivider>).toJSON();
expect(tree).toMatchSnapshot();
});

it('Divider re-renders correctly', () => {
checkReRender(() => <Divider />, 2);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

exports[`Divider component tests Branded Divider 1`] = `
<View
alignContent="center"
appearance="brand"
insetSize={0}
style={
{
"alignItems": "center",
Expand Down Expand Up @@ -31,6 +34,9 @@ exports[`Divider component tests Branded Divider 1`] = `

exports[`Divider component tests Custom Divider 1`] = `
<View
alignContent="center"
appearance="default"
insetSize={0}
style={
{
"alignItems": "center",
Expand Down Expand Up @@ -60,6 +66,9 @@ exports[`Divider component tests Custom Divider 1`] = `

exports[`Divider component tests Divider default 1`] = `
<View
alignContent="center"
appearance="default"
insetSize={0}
style={
{
"alignItems": "center",
Expand Down Expand Up @@ -89,6 +98,18 @@ exports[`Divider component tests Divider default 1`] = `

exports[`Divider component tests Divider with all props + tokens set 1`] = `
<View
alignContent="start"
appearance="strong"
icon={
{
"fontSource": {
"codepoint": 9827,
"fontFamily": "Arial",
"fontSize": 32,
},
}
}
insetSize={16}
style={
{
"alignItems": "center",
Expand All @@ -98,7 +119,7 @@ exports[`Divider component tests Divider with all props + tokens set 1`] = `
"justifyContent": "center",
"maxHeight": 200,
"maxWidth": 200,
"minHeight": 40,
"minHeight": 84,
"minWidth": 10,
"padding": 10,
"paddingEnd": 10,
Expand Down Expand Up @@ -167,6 +188,18 @@ exports[`Divider component tests Divider with all props + tokens set 1`] = `

exports[`Divider component tests Divider with icon 1`] = `
<View
alignContent="center"
appearance="default"
icon={
{
"fontSource": {
"codepoint": 9827,
"fontFamily": "Arial",
"fontSize": 32,
},
}
}
insetSize={0}
style={
{
"alignItems": "center",
Expand Down Expand Up @@ -229,6 +262,9 @@ exports[`Divider component tests Divider with icon 1`] = `

exports[`Divider component tests Divider with text 1`] = `
<View
alignContent="center"
appearance="default"
insetSize={0}
style={
{
"alignItems": "center",
Expand Down Expand Up @@ -296,6 +332,9 @@ exports[`Divider component tests Divider with text 1`] = `

exports[`Divider component tests Horizontal Divider with Inset 1`] = `
<View
alignContent="center"
appearance="default"
insetSize={16}
style={
{
"alignItems": "center",
Expand Down Expand Up @@ -325,6 +364,9 @@ exports[`Divider component tests Horizontal Divider with Inset 1`] = `

exports[`Divider component tests Strong Divider 1`] = `
<View
alignContent="center"
appearance="strong"
insetSize={0}
style={
{
"alignItems": "center",
Expand Down Expand Up @@ -354,6 +396,9 @@ exports[`Divider component tests Strong Divider 1`] = `

exports[`Divider component tests Subtle Divider 1`] = `
<View
alignContent="center"
appearance="subtle"
insetSize={0}
style={
{
"alignItems": "center",
Expand Down Expand Up @@ -383,6 +428,9 @@ exports[`Divider component tests Subtle Divider 1`] = `

exports[`Divider component tests Vertical Divider 1`] = `
<View
alignContent="center"
appearance="default"
insetSize={0}
style={
{
"alignItems": "center",
Expand Down Expand Up @@ -413,6 +461,9 @@ exports[`Divider component tests Vertical Divider 1`] = `

exports[`Divider component tests Vertical Divider with Inset 1`] = `
<View
alignContent="center"
appearance="default"
insetSize={16}
style={
{
"alignItems": "center",
Expand Down

0 comments on commit 69bf5b7

Please sign in to comment.