mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 22:18:36 -05:00
* (lint) MOB-1063 enforce trailing commas * autofix trailing commas * manually fix newly introduced maxlen violations * add trailing comma convention to i18n build
20 lines
672 B
JavaScript
20 lines
672 B
JavaScript
import { fireEvent, screen } from "@testing-library/react-native";
|
|
import Developer from "components/Developer/Developer";
|
|
import React from "react";
|
|
import Mailer from "react-native-mail";
|
|
import { renderComponent } from "tests/helpers/render";
|
|
|
|
jest.mock( "react-native-mail", ( ) => ( {
|
|
mail: jest.fn( ),
|
|
} ) );
|
|
|
|
describe( "email logs button", ( ) => {
|
|
it( "should open the native email client", async ( ) => {
|
|
renderComponent( <Developer /> );
|
|
const debugLogButton = await screen.findByText( /EMAIL DEBUG LOGS/ );
|
|
expect( debugLogButton ).toBeTruthy( );
|
|
fireEvent.press( debugLogButton );
|
|
expect( Mailer.mail ).toHaveBeenCalled( );
|
|
} );
|
|
} );
|