Commit 2dd739e9 authored by Axel Bocciarelli's avatar Axel Bocciarelli

Fix tests

parent ddc19b49
Pipeline #32499 passed with stage
in 3 minutes and 14 seconds
......@@ -860,9 +860,7 @@ class LogbookContainer extends React.Component {
*/
isAppProperlyConfigured() {
if (!UI.logbook) {
console.log(
'[ERROR] [CONFIG] logbook section is missing in File src/config/ui/config'
);
console.log('[ERROR] [CONFIG] logbook section is missing from UI config');
return false;
}
if (!UI.logbook.SORT_EVENTS_BY) {
......
......@@ -33,7 +33,7 @@ describe.skip('LogbookContainerIntegrationTests', () => {
const mockGetUIConfiguration = getUIConfiguration({
AUTOREFRESH_EVENTLIST: false,
});
jest.mock('../../config/ui/config', () => mockGetUIConfiguration);
jest.mock('../../config/ui', () => mockGetUIConfiguration);
// require logbook class after the configuration mocking
const LogbookContainerClass = require('../../containers/Logbook/LogbookContainer')
......@@ -85,7 +85,7 @@ describe.skip('LogbookContainerIntegrationTests', () => {
SORTING_ORDER: element.SORTING_ORDER,
AUTOREFRESH_EVENTLIST: false,
});
jest.mock('../../config/ui/config', () => mockGetUIConfiguration);
jest.mock('../../config/ui', () => mockGetUIConfiguration);
// require logbook class after the configuration mocking
const LogbookContainerClass = require('../../containers/Logbook/LogbookContainer')
......@@ -149,7 +149,7 @@ describe.skip('LogbookContainerIntegrationTests', () => {
AUTOREFRESH_EVENTLIST: true,
AUTOREFRESH_DELAY: element.AUTOREFRESH_DELAY,
});
jest.mock('../../config/ui/config', () => mockGetUIConfiguration);
jest.mock('../../config/ui', () => mockGetUIConfiguration);
// require logbook class after the configuration mocking
const LogbookContainerClass = require('../../containers/Logbook/LogbookContainer')
......@@ -295,7 +295,7 @@ describe.skip('logbookPages', () => {
EVENTS_PER_DOWNLOAD: element.EVENTS_PER_DOWNLOAD,
SORT_EVENTS_BY: '_id',
});
jest.mock('../../config/ui/config', () => mockGetUIConfiguration);
jest.mock('../../config/ui', () => mockGetUIConfiguration);
// Require logbook class after the configuration mocking
const LogbookContainerClass = require('../../containers/Logbook/LogbookContainer')
......
......@@ -27,7 +27,7 @@ describe.skip('NewlyAvailableEventsDialogueIntegrationTests', () => {
AUTOREFRESH_EVENTLIST: false,
AUTOREFRESH_DELAY: 100,
});
jest.mock('../../config/ui/config', () => mockGetUIConfiguration);
jest.mock('../../config/ui', () => mockGetUIConfiguration);
// require logbook class after the configuration mocking
const LogbookContainerClass = require('../../containers/Logbook/LogbookContainer')
......@@ -83,7 +83,7 @@ describe.skip('NewlyAvailableEventsDialogueIntegrationTests', () => {
AUTOREFRESH_EVENTLIST: false,
AUTOREFRESH_DELAY: 100,
});
jest.mock('../../config/ui/config', () => mockGetUIConfiguration);
jest.mock('../../config/ui', () => mockGetUIConfiguration);
// require logbook class after the configuration mocking
const LogbookContainerClass = require('../../containers/Logbook/LogbookContainer')
......
......@@ -25,7 +25,7 @@ describe.skip('LogbookContainerUnitTests', () => {
const mockGetUIConfiguration = getUIConfiguration({
AUTOREFRESH_EVENTLIST: false,
});
jest.mock('../../config/ui/config', () => mockGetUIConfiguration);
jest.mock('../../config/ui', () => mockGetUIConfiguration);
// require logbook class after the configuration mocking
const LogbookContainerClass = require('../../containers/Logbook/LogbookContainer')
......
......@@ -21,7 +21,7 @@ describe('LogbookPagerUnitTests', () => {
const mockGetUIConfiguration = getUIConfiguration({
EVENTS_PER_PAGE: element.EVENTS_PER_PAGE,
});
jest.mock('../../config/ui/config', () => mockGetUIConfiguration);
jest.mock('../../config/ui', () => mockGetUIConfiguration);
expect(getWrapper(element.eventCount).get(0)).toBeNull();
}
next();
......@@ -38,7 +38,7 @@ describe('LogbookPagerUnitTests', () => {
const mockGetUIConfiguration = getUIConfiguration({
EVENTS_PER_PAGE: element.EVENTS_PER_PAGE,
});
jest.mock('../../config/ui/config', () => mockGetUIConfiguration);
jest.mock('../../config/ui', () => mockGetUIConfiguration);
expect(
getWrapper(element.eventCount).instance().getTotalPageNumber()
).toBe(element.expected);
......
......@@ -53,7 +53,7 @@ describe('selectionFilterHelper', () => {
SORT_EVENTS_BY: element.SORT_EVENTS_BY,
SORTING_ORDER: element.SORTING_ORDER,
});
jest.mock('../../config/ui/config', () => mockGetUIConfiguration);
jest.mock('../../config/ui', () => mockGetUIConfiguration);
const getSelectionFiltersForMongoQuery = require('../../containers/Logbook/SelectionFilterHelper')
.getSelectionFiltersForMongoQuery;
expect(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment