diff --git a/tests/unit/components/Match/AdditionalSuggestionsScroll.test.js b/tests/unit/components/Match/AdditionalSuggestionsScroll.test.js
index 3bde97ba9..e13291b51 100644
--- a/tests/unit/components/Match/AdditionalSuggestionsScroll.test.js
+++ b/tests/unit/components/Match/AdditionalSuggestionsScroll.test.js
@@ -27,7 +27,7 @@ describe( "AdditionalSuggestionsScroll", () => {
onSuggestionChosen={jest.fn()}
/>
);
- expect( screen.getByRole( "progressbar" ) ).toBeTruthy();
+ expect( screen.getByRole( "progressbar" ) ).toBeVisible();
} );
it( "renders heading when noTopSuggestion is true", () => {
@@ -47,6 +47,6 @@ describe( "AdditionalSuggestionsScroll", () => {
/>
);
- expect( screen.getByText( "It might be one of these" ) ).toBeTruthy();
+ expect( screen.getByText( "It might be one of these" ) ).toBeVisible();
} );
} );
diff --git a/tests/unit/components/Match/EmptyMapSection.test.js b/tests/unit/components/Match/EmptyMapSection.test.js
index 7c9739073..4c2f985d5 100644
--- a/tests/unit/components/Match/EmptyMapSection.test.js
+++ b/tests/unit/components/Match/EmptyMapSection.test.js
@@ -14,7 +14,7 @@ describe( "EmptyMapSection", () => {
);
const locationIndicator = screen.getByTestId( "Map.LocationIndicator" );
- expect( locationIndicator ).toBeTruthy();
+ expect( locationIndicator ).toBeVisible();
} );
it( "calls handleAddLocationPressed when button is pressed", () => {
diff --git a/tests/unit/components/Match/IconicSuggestion.test.js b/tests/unit/components/Match/IconicSuggestion.test.js
index 452fd64ea..6db4a1ff4 100644
--- a/tests/unit/components/Match/IconicSuggestion.test.js
+++ b/tests/unit/components/Match/IconicSuggestion.test.js
@@ -25,8 +25,8 @@ describe( "IconicSuggestion", () => {
it( "renders taxon with common name and scientific name", () => {
renderComponent( );
- expect( screen.getByText( "Ray-finned Fishes" ) ).toBeTruthy();
- expect( screen.getByText( "actinopterygii" ) ).toBeTruthy();
+ expect( screen.getByText( "Ray-finned Fishes" ) ).toBeVisible();
+ expect( screen.getByText( "actinopterygii" ) ).toBeVisible();
} );
it( "calls handlePress when pressed", () => {
@@ -52,8 +52,8 @@ describe( "IconicSuggestion", () => {
renderComponent( );
- expect( screen.getByText( "Birds" ) ).toBeTruthy();
- expect( screen.getByText( "Aves" ) ).toBeTruthy();
+ expect( screen.getByText( "Birds" ) ).toBeVisible();
+ expect( screen.getByText( "Aves" ) ).toBeVisible();
} );
it( "handles taxon without common name", () => {
@@ -69,6 +69,6 @@ describe( "IconicSuggestion", () => {
renderComponent( );
- expect( screen.getByText( "Mollusca" ) ).toBeTruthy();
+ expect( screen.getByText( "Mollusca" ) ).toBeVisible();
} );
} );
diff --git a/tests/unit/components/Match/MatchHeader.test.js b/tests/unit/components/Match/MatchHeader.test.js
index 7908d13da..0dd58c4ca 100644
--- a/tests/unit/components/Match/MatchHeader.test.js
+++ b/tests/unit/components/Match/MatchHeader.test.js
@@ -20,7 +20,7 @@ describe( "MatchHeader", () => {
renderComponent( );
- expect( screen.getByText( "You observed this species" ) ).toBeTruthy();
+ expect( screen.getByText( "You observed this species" ) ).toBeVisible();
} );
it( "displays high confidence message for taxa above species", () => {
@@ -31,9 +31,9 @@ describe( "MatchHeader", () => {
renderComponent( );
- expect( screen.getByText( "You observed a species in this group" ) ).toBeTruthy();
- expect( screen.getByText( "95%" ) ).toBeTruthy();
- expect( screen.getByText( "Confidence" ) ).toBeTruthy();
+ expect( screen.getByText( "You observed a species in this group" ) ).toBeVisible();
+ expect( screen.getByText( "95%" ) ).toBeVisible();
+ expect( screen.getByText( "Confidence" ) ).toBeVisible();
} );
it( "displays likely confidence message for species", () => {
@@ -44,7 +44,7 @@ describe( "MatchHeader", () => {
renderComponent( );
- expect( screen.getByText( "You likely observed this species" ) ).toBeTruthy();
+ expect( screen.getByText( "You likely observed this species" ) ).toBeVisible();
} );
it( "displays may have observed message", () => {
@@ -55,7 +55,7 @@ describe( "MatchHeader", () => {
renderComponent( );
- expect( screen.getByText( "You may have observed this species" ) ).toBeTruthy();
+ expect( screen.getByText( "You may have observed this species" ) ).toBeVisible();
} );
it( "hides observation status when hideObservationStatus is true", () => {
diff --git a/tests/unit/components/Match/SuggestionsResult.test.js b/tests/unit/components/Match/SuggestionsResult.test.js
index cb61681fb..482a368b2 100644
--- a/tests/unit/components/Match/SuggestionsResult.test.js
+++ b/tests/unit/components/Match/SuggestionsResult.test.js
@@ -25,10 +25,10 @@ describe( "SuggestionsResult", () => {
/>
);
- expect( screen.getByText( "Cup Plant" ) ).toBeTruthy();
- expect( screen.getByText( "Silphium perfoliatum" ) ).toBeTruthy();
- expect( screen.getByText( "87% confidence" ) ).toBeTruthy();
- expect( screen.getByTestId( "SuggestionsResult.745.photo" ) ).toBeTruthy();
+ expect( screen.getByText( "Cup Plant" ) ).toBeVisible();
+ expect( screen.getByText( "Silphium perfoliatum" ) ).toBeVisible();
+ expect( screen.getByText( "87% confidence" ) ).toBeVisible();
+ expect( screen.getByTestId( "SuggestionsResult.745.photo" ) ).toBeVisible();
} );
it( "handles non valid Realm taxon and returns null", () => {