Skip to content

Commit

Permalink
test(Stepper): fix broken specs
Browse files Browse the repository at this point in the history
  • Loading branch information
tcK1 committed Aug 4, 2023
1 parent 8a0895d commit 7a6cf4b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
12 changes: 6 additions & 6 deletions packages/yoga/src/Stepper/native/Stepper.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Stepper from '..';
describe('<Stepper />', () => {
describe('Snapshots', () => {
it('should match snapshot with first step active', () => {
const { root, toJSON } = render(
const { toJSON } = render(
<ThemeProvider>
<Stepper activeStep={0}>
<Stepper.Step label="step one">
Expand All @@ -23,11 +23,11 @@ describe('<Stepper />', () => {
</ThemeProvider>,
);

expect(toJSON(root)).toMatchSnapshot();
expect(toJSON()).toMatchSnapshot();
});

it('should match snapshot with first step active and secondary color', () => {
const { container, toJSON } = render(
const { toJSON } = render(
<ThemeProvider>
<Stepper activeStep={0} secondary>
<Stepper.Step label="step one">
Expand All @@ -43,11 +43,11 @@ describe('<Stepper />', () => {
</ThemeProvider>,
);

expect(toJSON(container)).toMatchSnapshot();
expect(toJSON()).toMatchSnapshot();
});

it('should match snapshot with second step active', () => {
const { root, toJSON } = render(
const { toJSON } = render(
<ThemeProvider>
<Stepper activeStep={1}>
<Stepper.Step label="step one">
Expand All @@ -63,7 +63,7 @@ describe('<Stepper />', () => {
</ThemeProvider>,
);

expect(toJSON(root)).toMatchSnapshot();
expect(toJSON()).toMatchSnapshot();
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ exports[`<Stepper /> Snapshots should match snapshot with first step active 1`]
active={false}
secondary={false}
style={
Array [
Object {
[
{
"color": "#9898A6",
"fontFamily": "Rubik",
"fontSize": 12,
Expand All @@ -211,8 +211,8 @@ exports[`<Stepper /> Snapshots should match snapshot with first step active 1`]
<View
label="step one"
style={
Array [
Object {
[
{
"width": "100%",
},
]
Expand All @@ -228,17 +228,17 @@ exports[`<Stepper /> Snapshots should match snapshot with first step active 1`]
exports[`<Stepper /> Snapshots should match snapshot with first step active and secondary color 1`] = `
<View
style={
Array [
Object {
[
{
"width": "100%",
},
]
}
>
<View
style={
Array [
Object {
[
{
"paddingBottom": 0,
"paddingLeft": 40,
"paddingRight": 40,
Expand All @@ -250,17 +250,17 @@ exports[`<Stepper /> Snapshots should match snapshot with first step active and
>
<View
style={
Array [
Object {
[
{
"position": "relative",
},
]
}
>
<View
style={
Array [
Object {
[
{
"backgroundColor": "#F5F5FA",
"height": 4,
"position": "absolute",
Expand All @@ -273,8 +273,8 @@ exports[`<Stepper /> Snapshots should match snapshot with first step active and
<View
secondary={true}
style={
Array [
Object {
[
{
"backgroundColor": "#9898A6",
"height": 4,
"position": "absolute",
Expand All @@ -288,8 +288,8 @@ exports[`<Stepper /> Snapshots should match snapshot with first step active and
</View>
<View
style={
Array [
Object {
[
{
"flexDirection": "row",
"justifyContent": "space-between",
},
Expand All @@ -298,8 +298,8 @@ exports[`<Stepper /> Snapshots should match snapshot with first step active and
>
<View
style={
Array [
Object {
[
{
"width": 15,
},
]
Expand All @@ -309,8 +309,8 @@ exports[`<Stepper /> Snapshots should match snapshot with first step active and
active={true}
secondary={true}
style={
Array [
Object {
[
{
"backgroundColor": "#9898A6",
"borderRadius": 9999,
"height": 15,
Expand All @@ -324,8 +324,8 @@ exports[`<Stepper /> Snapshots should match snapshot with first step active and
active={true}
secondary={true}
style={
Array [
Object {
[
{
"color": "#9898A6",
"fontFamily": "Rubik",
"fontSize": 12,
Expand All @@ -343,8 +343,8 @@ exports[`<Stepper /> Snapshots should match snapshot with first step active and
</View>
<View
style={
Array [
Object {
[
{
"width": 15,
},
]
Expand All @@ -354,8 +354,8 @@ exports[`<Stepper /> Snapshots should match snapshot with first step active and
active={false}
secondary={true}
style={
Array [
Object {
[
{
"backgroundColor": "#F5F5FA",
"borderRadius": 9999,
"height": 15,
Expand All @@ -369,8 +369,8 @@ exports[`<Stepper /> Snapshots should match snapshot with first step active and
active={false}
secondary={true}
style={
Array [
Object {
[
{
"color": "#9898A6",
"fontFamily": "Rubik",
"fontSize": 12,
Expand All @@ -388,8 +388,8 @@ exports[`<Stepper /> Snapshots should match snapshot with first step active and
</View>
<View
style={
Array [
Object {
[
{
"width": 15,
},
]
Expand All @@ -399,8 +399,8 @@ exports[`<Stepper /> Snapshots should match snapshot with first step active and
active={false}
secondary={true}
style={
Array [
Object {
[
{
"backgroundColor": "#F5F5FA",
"borderRadius": 9999,
"height": 15,
Expand Down

0 comments on commit 7a6cf4b

Please sign in to comment.