A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
ciphermask/ui/components/app/app-loading-spinner/app-loading-spinner.test.js

27 lines
771 B

import React from 'react';
import { screen } from '@testing-library/react';
import { renderWithProvider } from '../../../../test/lib/render-helpers';
import configureStore from '../../../store/store';
import AppLoadingSpinner from './app-loading-spinner';
const render = (params) => {
const store = configureStore({
...params,
});
return renderWithProvider(<AppLoadingSpinner />, store);
};
describe('AppLoadingSpinner', () => {
it('should return null if app state is not loading', () => {
render();
expect(screen.queryByRole('alert')).not.toBeInTheDocument();
});
it('should show spinner if app state is loading', () => {
render({ appState: { isLoading: true } });
expect(screen.queryByRole('alert')).toBeInTheDocument();
});
});