|
1 | 1 | import { mount } from 'enzyme'; |
2 | | -import { JSDOM } from 'jsdom'; |
3 | 2 | import { h } from 'preact'; |
4 | 3 | import { axe, toHaveNoViolations } from 'jest-axe'; |
5 | 4 | import { Config } from '../../src/config'; |
6 | 5 | import { Container } from '../../src/view/container'; |
7 | 6 | import StorageUtils from '../../src/storage/storageUtils'; |
8 | 7 | import Header from '../../src/header'; |
9 | 8 | import { PipelineProcessor, ProcessorType } from '../../src/pipeline/processor'; |
10 | | -import * as width from '../../src/util/width'; |
11 | 9 | import { flushPromises } from '../testUtil'; |
12 | 10 | import PipelineUtils from '../../src/pipeline/pipelineUtils'; |
13 | 11 | import { EventEmitter } from '../../src/util/eventEmitter'; |
@@ -264,51 +262,6 @@ describe('Container component', () => { |
264 | 262 | expect(await axe(container.html())).toHaveNoViolations(); |
265 | 263 | }); |
266 | 264 |
|
267 | | - it('should render a table with correct th widths', async () => { |
268 | | - const wrapper = new JSDOM('<div style="width: 500px"></div>'); |
269 | | - |
270 | | - const mock = jest.spyOn(width, 'getWidth'); |
271 | | - mock.mockReturnValue(42); |
272 | | - |
273 | | - config.container = wrapper; |
274 | | - config.header = new Header(); |
275 | | - config.header.columns = [ |
276 | | - { |
277 | | - name: 'hello world', |
278 | | - sort: { |
279 | | - enabled: false, |
280 | | - }, |
281 | | - }, |
282 | | - { |
283 | | - name: 'you are super cool', |
284 | | - sort: { |
285 | | - enabled: true, |
286 | | - }, |
287 | | - }, |
288 | | - { |
289 | | - name: 'actions', |
290 | | - width: '200px', |
291 | | - sort: { |
292 | | - enabled: true, |
293 | | - }, |
294 | | - }, |
295 | | - ]; |
296 | | - |
297 | | - const container = mount( |
298 | | - <Container |
299 | | - config={config} |
300 | | - pipeline={config.pipeline} |
301 | | - width={config.width} |
302 | | - height={config.height} |
303 | | - />, |
304 | | - ); |
305 | | - |
306 | | - return flushPromises().then(async () => { |
307 | | - await container.instance().componentDidMount(); |
308 | | - expect(container.html()).toMatchSnapshot(); |
309 | | - }); |
310 | | - }); |
311 | | - |
312 | 265 | it('should render a container with null array', async () => { |
313 | 266 | config.data = []; |
314 | 267 | config.storage = StorageUtils.createFromUserConfig(config); |
|
0 commit comments