Skip to content

Commit

Permalink
Clean up test file
Browse files Browse the repository at this point in the history
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
  • Loading branch information
codyml and michael-s-molina authored Jun 21, 2022
1 parent 33090fe commit 105ee69
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions superset-frontend/src/addSlice/AddSliceContainer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,37 +70,37 @@ async function getWrapper(user = mockUser) {
return wrapper;
}

it('renders a select and a VizTypeControl', async () => {
test('renders a select and a VizTypeControl', async () => {
const wrapper = await getWrapper();
expect(wrapper.find(Select)).toExist();
expect(wrapper.find(VizTypeGallery)).toExist();
});

it('renders dataset help text when user lacks dataset write permissions', async () => {
test('renders dataset help text when user lacks dataset write permissions', async () => {
const wrapper = await getWrapper();
expect(wrapper.find('[data-test="dataset-write"]')).not.toExist();
expect(wrapper.find('[data-test="no-dataset-write"]')).toExist();
});

it('renders dataset help text when user has dataset write permissions', async () => {
test('renders dataset help text when user has dataset write permissions', async () => {
const wrapper = await getWrapper(mockUserWithDatasetWrite);
expect(wrapper.find('[data-test="dataset-write"]')).toExist();
expect(wrapper.find('[data-test="no-dataset-write"]')).not.toExist();
});

it('renders a button', async () => {
test('renders a button', async () => {
const wrapper = await getWrapper();
expect(wrapper.find(Button)).toExist();
});

it('renders a disabled button if no datasource is selected', async () => {
test('renders a disabled button if no datasource is selected', async () => {
const wrapper = await getWrapper();
expect(
wrapper.find(Button).find({ disabled: true }).hostNodes(),
).toHaveLength(1);
});

it('renders an enabled button if datasource and viz type is selected', async () => {
test('renders an enabled button if datasource and viz type are selected', async () => {
const wrapper = await getWrapper();
wrapper.setState({
datasource,
Expand All @@ -111,7 +111,7 @@ it('renders an enabled button if datasource and viz type is selected', async ()
).toHaveLength(0);
});

it('formats explore url', async () => {
test('formats Explore url', async () => {
const wrapper = await getWrapper();
wrapper.setState({
datasource,
Expand Down

0 comments on commit 105ee69

Please sign in to comment.