mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
Comment out entire test and not only the expect call
This commit is contained in:
@@ -2,19 +2,21 @@ import { screen } from "@testing-library/react-native";
|
||||
import MediaViewer from "components/MediaViewer/MediaViewer";
|
||||
import React from "react";
|
||||
import factory from "tests/factory";
|
||||
import { renderComponent, wrapInNavigationContainer } from "tests/helpers/render";
|
||||
import {
|
||||
renderComponent
|
||||
} from "tests/helpers/render";
|
||||
|
||||
// Note: HeaderBackButton has accessibility issues
|
||||
jest.mock( "@react-navigation/elements" );
|
||||
|
||||
describe( "MediaViewer", ( ) => {
|
||||
describe( "without media", ( ) => {
|
||||
it( "should not have accessibility errors", async () => {
|
||||
const mediaViewer = wrapInNavigationContainer( <MediaViewer /> );
|
||||
// Disabled during the update to RN 0.78
|
||||
expect( mediaViewer ).toBeTruthy( );
|
||||
// expect( mediaViewer ).toBeAccessible( );
|
||||
} );
|
||||
// Disabled during the update to RN 0.78
|
||||
// it( "should not have accessibility errors", async () => {
|
||||
// const mediaViewer = wrapInNavigationContainer( <MediaViewer /> );
|
||||
// expect( mediaViewer ).toBeTruthy( );
|
||||
// expect( mediaViewer ).toBeAccessible( );
|
||||
// } );
|
||||
|
||||
it( "should not have any CustomImageZoom components", ( ) => {
|
||||
renderComponent( <MediaViewer /> );
|
||||
@@ -27,12 +29,12 @@ describe( "MediaViewer", ( ) => {
|
||||
// const urls = [faker.image.url( )];
|
||||
const photos = [factory( "LocalPhoto" )];
|
||||
|
||||
it( "should not have accessibility errors", async () => {
|
||||
const mediaViewer = wrapInNavigationContainer( <MediaViewer photos={photos} /> );
|
||||
// Disabled during the update to RN 0.78
|
||||
expect( mediaViewer ).toBeTruthy( );
|
||||
// expect( mediaViewer ).toBeAccessible( );
|
||||
} );
|
||||
// Disabled during the update to RN 0.78
|
||||
// it( "should not have accessibility errors", async () => {
|
||||
// const mediaViewer = wrapInNavigationContainer( <MediaViewer photos={photos} /> );
|
||||
// expect( mediaViewer ).toBeTruthy( );
|
||||
// expect( mediaViewer ).toBeAccessible( );
|
||||
// } );
|
||||
|
||||
it( "should have a CustomImageZoom component", async ( ) => {
|
||||
renderComponent( <MediaViewer photos={photos} /> );
|
||||
|
||||
@@ -4,7 +4,7 @@ import React from "react";
|
||||
import { View } from "react-native";
|
||||
import useStore from "stores/useStore";
|
||||
import factory from "tests/factory";
|
||||
import { renderComponent, wrapInNavigationContainer } from "tests/helpers/render";
|
||||
import { renderComponent } from "tests/helpers/render";
|
||||
|
||||
// eslint-disable-next-line i18next/no-literal-string
|
||||
const mockHeaderBackButton = <View testID="ObsEdit.BackButton">Mocked Back</View>;
|
||||
@@ -54,12 +54,12 @@ describe( "ObsEdit", () => {
|
||||
} );
|
||||
} );
|
||||
|
||||
it( "should not have accessibility errors", async ( ) => {
|
||||
const view = wrapInNavigationContainer( <ObsEdit /> );
|
||||
// Disabled during the update to RN 0.78
|
||||
expect( view ).toBeTruthy();
|
||||
// expect( view ).toBeAccessible();
|
||||
} );
|
||||
// Disabled during the update to RN 0.78
|
||||
// it( "should not have accessibility errors", async ( ) => {
|
||||
// const view = wrapInNavigationContainer( <ObsEdit /> );
|
||||
// expect( view ).toBeTruthy();
|
||||
// expect( view ).toBeAccessible();
|
||||
// } );
|
||||
|
||||
it( "displays the number of photos in global state obsPhotos", async ( ) => {
|
||||
renderComponent( <ObsEdit /> );
|
||||
|
||||
@@ -4,7 +4,9 @@ import React from "react";
|
||||
import { View } from "react-native";
|
||||
import factory from "tests/factory";
|
||||
import faker from "tests/helpers/faker";
|
||||
import { renderComponent, wrapInNavigationContainer } from "tests/helpers/render";
|
||||
import {
|
||||
renderComponent
|
||||
} from "tests/helpers/render";
|
||||
|
||||
// eslint-disable-next-line i18next/no-literal-string
|
||||
const mockHeaderBackButton = <View testID="ObsEdit.BackButton">Mocked Back</View>;
|
||||
@@ -22,17 +24,17 @@ const mockObservations = [
|
||||
];
|
||||
|
||||
describe( "ObsEditHeader", () => {
|
||||
it( "has no accessibility errors", () => {
|
||||
const button = wrapInNavigationContainer(
|
||||
<ObsEditHeader
|
||||
observations={mockObservations}
|
||||
/>
|
||||
);
|
||||
// Disabled during the update to RN 0.78
|
||||
// it( "has no accessibility errors", () => {
|
||||
// const button = wrapInNavigationContainer(
|
||||
// <ObsEditHeader
|
||||
// observations={mockObservations}
|
||||
// />
|
||||
// );
|
||||
|
||||
// Disabled during the update to RN 0.78
|
||||
expect( button ).toBeTruthy();
|
||||
// expect( button ).toBeAccessible();
|
||||
} );
|
||||
// expect( button ).toBeTruthy();
|
||||
// expect( button ).toBeAccessible();
|
||||
// } );
|
||||
|
||||
it( "renders a header title with 1 observation", async () => {
|
||||
renderComponent(
|
||||
|
||||
@@ -4,7 +4,9 @@ import ProjectDetailsContainer from "components/ProjectDetails/ProjectDetailsCon
|
||||
import React from "react";
|
||||
import factory from "tests/factory";
|
||||
import faker from "tests/helpers/faker";
|
||||
import { renderComponent, wrapInQueryClientContainer } from "tests/helpers/render";
|
||||
import {
|
||||
renderComponent
|
||||
} from "tests/helpers/render";
|
||||
|
||||
const mockProject = factory( "RemoteProject", {
|
||||
title: faker.lorem.sentence( ),
|
||||
@@ -61,15 +63,15 @@ beforeAll( async () => {
|
||||
jest.useFakeTimers( );
|
||||
} );
|
||||
|
||||
// Disabled during the update to RN 0.78
|
||||
describe( "ProjectDetails", ( ) => {
|
||||
test( "should not have accessibility errors", async ( ) => {
|
||||
const view = wrapInQueryClientContainer(
|
||||
<ProjectDetailsContainer />
|
||||
);
|
||||
// Disabled during the update to RN 0.78
|
||||
expect( view ).toBeTruthy();
|
||||
// expect( view ).toBeAccessible();
|
||||
} );
|
||||
// test( "should not have accessibility errors", async ( ) => {
|
||||
// const view = wrapInQueryClientContainer(
|
||||
// <ProjectDetailsContainer />
|
||||
// );
|
||||
// expect( view ).toBeTruthy();
|
||||
// expect( view ).toBeAccessible();
|
||||
// } );
|
||||
|
||||
test( "displays project details", ( ) => {
|
||||
renderComponent( <ProjectDetailsContainer /> );
|
||||
|
||||
Reference in New Issue
Block a user