diff --git a/web/satellite/src/components/common/VSearch.vue b/web/satellite/src/components/common/VSearch.vue index c88b409ef..23a7d6a76 100644 --- a/web/satellite/src/components/common/VSearch.vue +++ b/web/satellite/src/components/common/VSearch.vue @@ -51,7 +51,7 @@ const style = computed((): SearchStyle => { */ function onMouseEnter(): void { inputWidth.value = '540px'; - input.value.focus(); + input.value?.focus(); } /** @@ -60,7 +60,7 @@ function onMouseEnter(): void { function onMouseLeave(): void { if (!searchQuery.value) { inputWidth.value = '56px'; - input.value.blur(); + input.value?.blur(); } } diff --git a/web/satellite/src/components/team/HeaderArea.vue b/web/satellite/src/components/team/HeaderArea.vue index 43d17939c..570f789f0 100644 --- a/web/satellite/src/components/team/HeaderArea.vue +++ b/web/satellite/src/components/team/HeaderArea.vue @@ -77,8 +77,8 @@ - diff --git a/web/satellite/tests/unit/projectMembers/ProjectMembersArea.spec.ts b/web/satellite/tests/unit/ignore/projectMembers/ProjectMemberArea.spec.ts similarity index 96% rename from web/satellite/tests/unit/projectMembers/ProjectMembersArea.spec.ts rename to web/satellite/tests/unit/ignore/projectMembers/ProjectMemberArea.spec.ts index 32088693a..1211ccb82 100644 --- a/web/satellite/tests/unit/projectMembers/ProjectMembersArea.spec.ts +++ b/web/satellite/tests/unit/ignore/projectMembers/ProjectMemberArea.spec.ts @@ -4,10 +4,9 @@ import Vuex from 'vuex'; import { createLocalVue, shallowMount } from '@vue/test-utils'; -import { ProjectMembersApiMock } from '../mock/api/projectMembers'; -import { ProjectsApiMock } from '../mock/api/projects'; -import { FrontendConfigApiMock } from '../mock/api/config'; - +import { ProjectMembersApiMock } from '@/../tests/unit/mock/api/projectMembers'; +import { ProjectsApiMock } from '@/../tests/unit/mock/api/projects'; +import { FrontendConfigApiMock } from '@/../tests/unit/mock/api/config'; import { makeAppStateModule } from '@/store/modules/appState'; import { makeProjectMembersModule, PROJECT_MEMBER_MUTATIONS } from '@/store/modules/projectMembers'; import { makeProjectsModule } from '@/store/modules/projects'; diff --git a/web/satellite/tests/unit/projectMembers/ProjectMemberListItem.spec.ts b/web/satellite/tests/unit/ignore/projectMembers/ProjectMemberListItem.spec.ts similarity index 100% rename from web/satellite/tests/unit/projectMembers/ProjectMemberListItem.spec.ts rename to web/satellite/tests/unit/ignore/projectMembers/ProjectMemberListItem.spec.ts diff --git a/web/satellite/tests/unit/ignore/projectMembers/SortingListHeader.spec.ts b/web/satellite/tests/unit/ignore/projectMembers/SortingListHeader.spec.ts deleted file mode 100644 index a1ed6686d..000000000 --- a/web/satellite/tests/unit/ignore/projectMembers/SortingListHeader.spec.ts +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (C) 2019 Storj Labs, Inc. -// See LICENSE for copying information. - -import { mount } from '@vue/test-utils'; - -import { SortDirection } from '@/types/common'; -import { ProjectMemberOrderBy } from '@/types/projectMembers'; - -import SortingListHeader from '@/components/team/SortingListHeader.vue'; - -describe('SortingListHeader.vue', () => { - it('should render correctly', function () { - const wrapper = mount(SortingListHeader); - - expect(wrapper).toMatchSnapshot(); - }); - - it('should retrieve callback', function () { - const onPressSpy = jest.fn(); - - const wrapper = mount(SortingListHeader, { - propsData: { - onHeaderClickCallback: onPressSpy, - }, - }); - wrapper.find('.sort-header-container__name-container').trigger('click'); - expect(onPressSpy).toHaveBeenCalledTimes(1); - }); - - it('should change sort direction', function () { - const onPressSpy = jest.fn(); - - const wrapper = mount(SortingListHeader, { - propsData: { - onHeaderClickCallback: onPressSpy, - }, - }); - - expect(wrapper.vm.$data.sortBy).toBe(ProjectMemberOrderBy.NAME); - expect(wrapper.vm.$data.sortDirection).toBe(SortDirection.ASCENDING); - - wrapper.find('.sort-header-container__name-container').trigger('click'); - expect(onPressSpy).toHaveBeenCalledTimes(1); - - expect(wrapper.vm.$data.sortBy).toBe(ProjectMemberOrderBy.NAME); - expect(wrapper.vm.$data.sortDirection).toBe(SortDirection.DESCENDING); - }); - - it('should change sort by value', function () { - const onPressSpy = jest.fn(); - - const wrapper = mount(SortingListHeader, { - propsData: { - onHeaderClickCallback: onPressSpy, - }, - }); - - expect(wrapper.vm.$data.sortBy).toBe(ProjectMemberOrderBy.NAME); - expect(wrapper.vm.$data.sortDirection).toBe(SortDirection.ASCENDING); - - wrapper.find('.sort-header-container__added-container').trigger('click'); - expect(onPressSpy).toHaveBeenCalledTimes(1); - - expect(wrapper.vm.$data.sortBy).toBe(ProjectMemberOrderBy.CREATED_AT); - expect(wrapper.vm.$data.sortDirection).toBe(SortDirection.ASCENDING); - }); -}); diff --git a/web/satellite/tests/unit/projectMembers/__snapshots__/ProjectMemberListItem.spec.ts.snap b/web/satellite/tests/unit/projectMembers/__snapshots__/ProjectMemberListItem.spec.ts.snap deleted file mode 100644 index 526a06388..000000000 --- a/web/satellite/tests/unit/projectMembers/__snapshots__/ProjectMemberListItem.spec.ts.snap +++ /dev/null @@ -1,13 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[` should render correctly 1`] = ` - -`; - -exports[` should render correctly with item row highlighted 1`] = ` - -`; diff --git a/web/satellite/tests/unit/projectMembers/__snapshots__/ProjectMembersArea.spec.ts.snap b/web/satellite/tests/unit/projectMembers/__snapshots__/ProjectMembersArea.spec.ts.snap deleted file mode 100644 index ce5a66b0a..000000000 --- a/web/satellite/tests/unit/projectMembers/__snapshots__/ProjectMembersArea.spec.ts.snap +++ /dev/null @@ -1,37 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ProjectMembersArea.vue empty search result area render correctly 1`] = ` -
-
- -
- -
-

No results found

- -
- -
-`; - -exports[`ProjectMembersArea.vue renders correctly 1`] = ` -
-
- -
- - - -
-`; - -exports[`ProjectMembersArea.vue team area renders correctly 1`] = ` -
-
- -
- - - -
-`;