chore: removing the failing tests that have been replaced with the other functionality
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -19,14 +19,14 @@ import { AzureRepoPicker } from './AzureRepoPicker';
|
||||
import { render, fireEvent } from '@testing-library/react';
|
||||
|
||||
describe('AzureRepoPicker', () => {
|
||||
it('renders the three input fields', async () => {
|
||||
it('renders the two input fields', async () => {
|
||||
const { getAllByRole } = render(
|
||||
<AzureRepoPicker onChange={jest.fn()} rawErrors={[]} state={{}} />,
|
||||
);
|
||||
|
||||
const allInputs = getAllByRole('textbox');
|
||||
|
||||
expect(allInputs).toHaveLength(3);
|
||||
expect(allInputs).toHaveLength(2);
|
||||
});
|
||||
|
||||
describe('org field', () => {
|
||||
@@ -58,19 +58,4 @@ describe('AzureRepoPicker', () => {
|
||||
expect(onChange).toHaveBeenCalledWith({ owner: 'owner' });
|
||||
});
|
||||
});
|
||||
|
||||
describe('repoName field', () => {
|
||||
it('calls onChange when the repoName changes', () => {
|
||||
const onChange = jest.fn();
|
||||
const { getAllByRole } = render(
|
||||
<AzureRepoPicker onChange={onChange} rawErrors={[]} state={{}} />,
|
||||
);
|
||||
|
||||
const repoNameInput = getAllByRole('textbox')[2];
|
||||
|
||||
fireEvent.change(repoNameInput, { target: { value: 'repoName' } });
|
||||
|
||||
expect(onChange).toHaveBeenCalledWith({ repoName: 'repoName' });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
+2
-21
@@ -26,7 +26,7 @@ describe('BitbucketRepoPicker', () => {
|
||||
<BitbucketRepoPicker onChange={jest.fn()} rawErrors={[]} state={state} />,
|
||||
);
|
||||
|
||||
expect(getAllByRole('textbox')).toHaveLength(3);
|
||||
expect(getAllByRole('textbox')).toHaveLength(2);
|
||||
expect(getAllByRole('textbox')[0]).toHaveValue('lolsWorkspace');
|
||||
});
|
||||
|
||||
@@ -39,7 +39,7 @@ describe('BitbucketRepoPicker', () => {
|
||||
<BitbucketRepoPicker onChange={jest.fn()} rawErrors={[]} state={state} />,
|
||||
);
|
||||
|
||||
expect(getAllByRole('textbox')).toHaveLength(2);
|
||||
expect(getAllByRole('textbox')).toHaveLength(1);
|
||||
});
|
||||
describe('workspace field', () => {
|
||||
it('calls onChange when the workspace changes', () => {
|
||||
@@ -78,23 +78,4 @@ describe('BitbucketRepoPicker', () => {
|
||||
expect(onChange).toHaveBeenCalledWith({ project: 'test-project' });
|
||||
});
|
||||
});
|
||||
|
||||
describe('repoName field', () => {
|
||||
it('calls onChange when the repoName changes', () => {
|
||||
const onChange = jest.fn();
|
||||
const { getAllByRole } = render(
|
||||
<BitbucketRepoPicker
|
||||
onChange={onChange}
|
||||
rawErrors={[]}
|
||||
state={{ host: 'bitbucket.org' }}
|
||||
/>,
|
||||
);
|
||||
|
||||
const repoNameInput = getAllByRole('textbox')[2];
|
||||
|
||||
fireEvent.change(repoNameInput, { target: { value: 'test-repo' } });
|
||||
|
||||
expect(onChange).toHaveBeenCalledWith({ repoName: 'test-repo' });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -56,23 +56,4 @@ describe('BitbucketRepoPicker', () => {
|
||||
expect(onChange).toHaveBeenCalledWith({ workspace: 'test-parent' });
|
||||
});
|
||||
});
|
||||
|
||||
describe('repoName field', () => {
|
||||
it('calls onChange when the repoName changes', () => {
|
||||
const onChange = jest.fn();
|
||||
const { getAllByRole } = render(
|
||||
<GerritRepoPicker
|
||||
onChange={onChange}
|
||||
rawErrors={[]}
|
||||
state={{ host: 'gerrithost.org' }}
|
||||
/>,
|
||||
);
|
||||
|
||||
const repoNameInput = getAllByRole('textbox')[2];
|
||||
|
||||
fireEvent.change(repoNameInput, { target: { value: 'test-repo' } });
|
||||
|
||||
expect(onChange).toHaveBeenCalledWith({ repoName: 'test-repo' });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -84,24 +84,4 @@ describe('GithubRepoPicker', () => {
|
||||
expect(onChange).toHaveBeenCalledWith({ owner: 'my-mock-owner' });
|
||||
});
|
||||
});
|
||||
|
||||
describe('repo name', () => {
|
||||
it('should render free text field for input of repo name', () => {
|
||||
const onChange = jest.fn();
|
||||
const { getAllByRole } = render(
|
||||
<GithubRepoPicker
|
||||
onChange={onChange}
|
||||
rawErrors={[]}
|
||||
state={{ repoName: 'repo' }}
|
||||
/>,
|
||||
);
|
||||
|
||||
const repoNameField = getAllByRole('textbox')[1];
|
||||
fireEvent.change(repoNameField, {
|
||||
target: { value: 'my-mock-repo-name' },
|
||||
});
|
||||
|
||||
expect(onChange).toHaveBeenCalledWith({ repoName: 'my-mock-repo-name' });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -84,24 +84,4 @@ describe('GitlabRepoPicker', () => {
|
||||
expect(onChange).toHaveBeenCalledWith({ owner: 'my-mock-owner' });
|
||||
});
|
||||
});
|
||||
|
||||
describe('repo name', () => {
|
||||
it('should render free text field for input of repo name', () => {
|
||||
const onChange = jest.fn();
|
||||
const { getAllByRole } = render(
|
||||
<GitlabRepoPicker
|
||||
onChange={onChange}
|
||||
rawErrors={[]}
|
||||
state={{ repoName: 'repo' }}
|
||||
/>,
|
||||
);
|
||||
|
||||
const repoNameField = getAllByRole('textbox')[1];
|
||||
fireEvent.change(repoNameField, {
|
||||
target: { value: 'my-mock-repo-name' },
|
||||
});
|
||||
|
||||
expect(onChange).toHaveBeenCalledWith({ repoName: 'my-mock-repo-name' });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user