mirror of
				https://github.com/reduxjs/redux-devtools.git
				synced 2025-11-04 09:57:26 +03:00 
			
		
		
		
	* Update Chrome manifest.json * Remove use of window in background * Test devpanel * Inject pageScript using new API * Keep connection from devpanel to background alive * Keep connection from content script to background alive * Replace page action with action * Cleanup syncOptions * Update options to not rely on background page access * Start work on updating popup * Updates * Remove window * Get opening in a separate window working * Remove pageScriptWrap * Add socket to panelStore * Fix tests * Try to use MV3 for Firefox * Fix path * Fix Chrome E2E tests * Revert unintentional change * Skip Electron tests for now Looks like they're still working through stuff in https://github.com/electron/electron/issues/41613 * Better image centering The Firefox popup did not like the old CSS. This is still not perfect, but it's better than it was. * Create shaggy-taxis-cross.md
		
			
				
	
	
		
			43 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import React from 'react';
 | 
						|
import { render, screen, within } from '@testing-library/react';
 | 
						|
import { Provider } from 'react-redux';
 | 
						|
import configureStore from '../../../src/devpanel/store/panelStore';
 | 
						|
import App from '../../../src/app/App';
 | 
						|
 | 
						|
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(),
 | 
						|
  })),
 | 
						|
});
 | 
						|
 | 
						|
const { store } = configureStore();
 | 
						|
 | 
						|
describe('App container', () => {
 | 
						|
  it("should render inspector monitor's component", () => {
 | 
						|
    render(
 | 
						|
      <Provider store={store}>
 | 
						|
        <App position="devtools-left" />
 | 
						|
      </Provider>,
 | 
						|
    );
 | 
						|
    expect(screen.getByTestId('inspector')).toBeDefined();
 | 
						|
  });
 | 
						|
 | 
						|
  it('should contain an empty action list', () => {
 | 
						|
    render(
 | 
						|
      <Provider store={store}>
 | 
						|
        <App position="devtools-left" />
 | 
						|
      </Provider>,
 | 
						|
    );
 | 
						|
    const actionList = screen.getByTestId('actionList');
 | 
						|
    expect(within(actionList).queryByRole('button')).not.toBeInTheDocument();
 | 
						|
  });
 | 
						|
});
 |