Files
Ryan Stelly b78be9243d lint rule & autofix for "trailing comma" (#3299)
* (lint) MOB-1063 enforce trailing commas

* autofix trailing commas

* manually fix newly introduced maxlen violations

* add trailing comma convention to i18n build
2025-12-22 20:17:13 -06:00

46 lines
1007 B
JavaScript

import {
screen,
} from "@testing-library/react-native";
import ObsStatus from "components/SharedComponents/ObsStatus";
import React from "react";
import factory from "tests/factory";
import { renderComponent } from "tests/helpers/render";
const mockObservation = factory( "LocalObservation", {
identifications: [
factory( "LocalIdentification", {
current: true,
} ),
factory( "LocalIdentification", {
current: false,
} ),
],
comments: [],
} );
describe( "ObsStatus", () => {
it( "displays count for current ids, not withdrawn ids", () => {
renderComponent(
<ObsStatus
observation={mockObservation}
/>,
);
const idCount = screen.getByText( /1/ );
expect( idCount ).toBeVisible( );
} );
it( "displays comment count", () => {
renderComponent(
<ObsStatus
observation={mockObservation}
/>,
);
const commentCount = screen.getByText( /0/ );
expect( commentCount ).toBeVisible( );
} );
} );