You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
790 B
TypeScript
26 lines
790 B
TypeScript
/* eslint-disable import/no-extraneous-dependencies */
|
|
import { expect } from 'chai';
|
|
import Sinon from 'sinon';
|
|
import { SessionInput } from '../../components/inputs';
|
|
import { TestUtils } from '../test-utils';
|
|
import { findAllByElementType, renderComponent } from './renderComponent';
|
|
|
|
// TODO[epic=SES-2418] migrate to Storybook
|
|
describe('SessionInput', () => {
|
|
beforeEach(() => {
|
|
TestUtils.stubSVGElement();
|
|
TestUtils.stubWindowLog();
|
|
});
|
|
|
|
afterEach(() => {
|
|
Sinon.restore();
|
|
});
|
|
|
|
it('should render an input', async () => {
|
|
const result = renderComponent(<SessionInput type="text" />);
|
|
const inputElements = findAllByElementType(result, 'input');
|
|
expect(inputElements.length, 'should have an input element').to.equal(1);
|
|
result.unmount();
|
|
});
|
|
});
|