mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-30 11:56:18 -05:00
Creating a new Collection model for use in organizing FileGroups.
Replacing Channels and Domains with Collection. Moving downloading relationships from Channel to Collection. Created domains.yaml config to manage tagged domain collections. Adding turn-key upgrade solution in the UI.
This commit is contained in:
parent
1ed0d63bac
commit
a1e0fb4e92
115 changed files with 13309 additions and 986 deletions
48
app/src/setupTests.js
Normal file
48
app/src/setupTests.js
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
// Jest setup file for React Testing Library
|
||||
// This file is automatically loaded by Create React App before running tests
|
||||
|
||||
import '@testing-library/jest-dom';
|
||||
|
||||
// Mock window.matchMedia (used by Semantic UI Media components)
|
||||
Object.defineProperty(window, 'matchMedia', {
|
||||
writable: true,
|
||||
value: jest.fn().mockImplementation(query => ({
|
||||
matches: false,
|
||||
media: query,
|
||||
onchange: null,
|
||||
addListener: jest.fn(), // deprecated
|
||||
removeListener: jest.fn(), // deprecated
|
||||
addEventListener: jest.fn(),
|
||||
removeEventListener: jest.fn(),
|
||||
dispatchEvent: jest.fn(),
|
||||
})),
|
||||
});
|
||||
|
||||
// Mock IntersectionObserver (if needed for lazy loading)
|
||||
global.IntersectionObserver = class IntersectionObserver {
|
||||
constructor() {}
|
||||
disconnect() {}
|
||||
observe() {}
|
||||
takeRecords() {
|
||||
return [];
|
||||
}
|
||||
unobserve() {}
|
||||
};
|
||||
|
||||
// Suppress console errors during tests (optional - uncomment if needed)
|
||||
// const originalError = console.error;
|
||||
// beforeAll(() => {
|
||||
// console.error = (...args) => {
|
||||
// if (
|
||||
// typeof args[0] === 'string' &&
|
||||
// args[0].includes('Warning: ReactDOM.render')
|
||||
// ) {
|
||||
// return;
|
||||
// }
|
||||
// originalError.call(console, ...args);
|
||||
// };
|
||||
// });
|
||||
//
|
||||
// afterAll(() => {
|
||||
// console.error = originalError;
|
||||
// });
|
||||
Loading…
Add table
Add a link
Reference in a new issue