2020-08-31 12:54:40 +01:00
|
|
|
// Copyright (C) 2020 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
2023-05-16 13:09:46 +01:00
|
|
|
import { shallowMount } from '@vue/test-utils';
|
2020-08-31 12:54:40 +01:00
|
|
|
|
2022-09-08 15:11:09 +01:00
|
|
|
import CreateProject from '@/components/project/CreateProject.vue';
|
2020-08-31 12:54:40 +01:00
|
|
|
|
|
|
|
describe('CreateProject.vue', (): void => {
|
|
|
|
it('renders correctly', (): void => {
|
2023-05-16 13:09:46 +01:00
|
|
|
const wrapper = shallowMount(CreateProject);
|
2020-08-31 12:54:40 +01:00
|
|
|
|
|
|
|
expect(wrapper).toMatchSnapshot();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('renders correctly with project name', async (): Promise<void> => {
|
2023-05-16 13:09:46 +01:00
|
|
|
const wrapper = shallowMount(CreateProject);
|
2020-08-31 12:54:40 +01:00
|
|
|
|
|
|
|
await wrapper.vm.setProjectName('testName');
|
|
|
|
|
|
|
|
expect(wrapper.findAll('.disabled').length).toBe(0);
|
|
|
|
});
|
|
|
|
});
|