Skip to content

Commit

Permalink
fixup! Fix(web-react): FileUploaderInput className #DS-1508
Browse files Browse the repository at this point in the history
  • Loading branch information
curdaj committed Oct 22, 2024
1 parent 9836b8d commit 71ae106
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react';
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import { renderToString } from 'react-dom/server';
import { classNamePrefixProviderTest } from '../../../../tests/providerTests/classNamePrefixProviderTest';
import { restPropsTest } from '../../../../tests/providerTests/restPropsTest';
import { validationTextPropsTest } from '../../../../tests/providerTests/validationTextPropsTest';
Expand All @@ -23,12 +23,10 @@ describe('FileUploaderInput', () => {
});

it('should not have drag-and-drop class in Server component', () => {
const container = document.createElement('div');
document.body.appendChild(container);
container.innerHTML = ReactDOMServer.renderToString(
const container = renderToString(
<FileUploaderInput id="test-uploader" name="test-uploader" label="upload" data-testid="test" />,
);

expect(container).not.toContainHTML('has-drag-and-drop');
expect(container).not.toContain('has-drag-and-drop');
});
});

0 comments on commit 71ae106

Please sign in to comment.