mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-20 19:51:27 +10:00
Exported LoadingScreen testId and language Storage item key in order to be used in unit tests
This commit is contained in:
@ -10,7 +10,11 @@ import {
|
||||
|
||||
import FirebaseStub, { DatabaseConstants } from 'gatsby-plugin-firebase';
|
||||
|
||||
import { SettingsProvider } from '../../../contexts/SettingsContext';
|
||||
import { dataTestId as loadingScreenTestId } from '../../../components/router/LoadingScreen';
|
||||
import {
|
||||
SettingsProvider,
|
||||
languageStorageItemKey,
|
||||
} from '../../../contexts/SettingsContext';
|
||||
import { ModalProvider } from '../../../contexts/ModalContext';
|
||||
import { UserProvider } from '../../../contexts/UserContext';
|
||||
import {
|
||||
@ -25,7 +29,6 @@ describe('Builder', () => {
|
||||
let resumeId = null;
|
||||
let resume = null;
|
||||
let mockDatabaseUpdateFunction = null;
|
||||
const loadingScreenTestId = 'loading-screen';
|
||||
|
||||
async function setup(
|
||||
resumeIdParameter,
|
||||
@ -118,8 +121,6 @@ describe('Builder', () => {
|
||||
});
|
||||
|
||||
describe('settings', () => {
|
||||
const languageStorageItemKey = 'language';
|
||||
|
||||
beforeEach(async () => {
|
||||
await setup(DatabaseConstants.demoStateResume1Id);
|
||||
});
|
||||
|
||||
@ -9,6 +9,7 @@ import FirebaseStub, { DatabaseConstants } from 'gatsby-plugin-firebase';
|
||||
|
||||
import '../../../i18n/index';
|
||||
import '../../../utils/dayjs';
|
||||
import { dataTestId as loadingScreenTestId } from '../../../components/router/LoadingScreen';
|
||||
import { SettingsProvider } from '../../../contexts/SettingsContext';
|
||||
import { ModalProvider } from '../../../contexts/ModalContext';
|
||||
import { UserProvider } from '../../../contexts/UserContext';
|
||||
@ -20,7 +21,6 @@ import Dashboard from '../dashboard';
|
||||
describe('Dashboard', () => {
|
||||
let resumes = null;
|
||||
const user = DatabaseConstants.user1;
|
||||
const loadingScreenTestId = 'loading-screen';
|
||||
|
||||
async function setup(waitForLoadingScreenToDisappear = true) {
|
||||
FirebaseStub.database().initializeData();
|
||||
|
||||
Reference in New Issue
Block a user