Skip to content

Commit

Permalink
[qa] clean tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoPennec committed Aug 5, 2024
1 parent 4c749b1 commit 495fd13
Show file tree
Hide file tree
Showing 19 changed files with 35 additions and 36 deletions.
3 changes: 3 additions & 0 deletions tests/unit/fixtures/production-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ export default {
{ id: 'asset-type-1', name: 'Characters' },
{ id: 'asset-type-2', name: 'Sets' }
],
productionShotTaskTypes: () => [
{ id: 'task-type-1', name: 'Animation' },
],
isTVShow: () => false
},
actions: {}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/lib/array.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
intersection
} from '../../../src/lib/array'
} from '@/lib/array'

describe('array', () => {
it('intersection', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/lib/auth.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import auth from '../../../src/lib/auth'
import auth from '@/lib/auth'

describe('auth', () => {
test('isPasswordValid', () => {
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/lib/filtering.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable no-undef */

import {
applyFilters,
getKeyWords,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/lib/func.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import func from '../../../src/lib/func'
import func from '@/lib/func'

describe('func', () => {
test('runPromiseMapAsSeries', () => new Promise((done) => {
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/lib/indexing.spec.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
/* eslint-disable no-undef */
import {
buildNameIndex,
buildAssetIndex,
buildShotIndex,
buildTaskIndex,
indexSearch
} from '../../../src/lib/indexing'
} from '@/lib/indexing'

describe('lib/indexing', () => {
it('buildNameIndex', () => {
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/lib/lang.spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import moment from 'moment-timezone'
import lang from '../../../src/lib/lang'
import timezone from '../../../src/lib/timezone'
import lang from '@/lib/lang'
import timezone from '@/lib/timezone'

import i18n from '../../../src/lib/i18n'
import store from '../../../src/store'
import i18n from '@/lib/i18n'
import store from '@/store'

class ColorHash {
constructor (colorData) {
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/lib/models.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import test from '../../../src/lib/string'
import {
addToIdList,
removeFromIdList,
Expand All @@ -7,9 +6,8 @@ import {
findModelInList,
populateTask,
updateModelFromList,
remove,
removeModelFromList
} from '../../../src/lib/models'
} from '@/lib/models'

describe('lib/helpers', () => {
it('populateTask', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/lib/query.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildQueryString } from '../../../src/lib/query'
import { buildQueryString } from '@/lib/query'

describe('query', () => {
describe('Mount', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/lib/stats.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
computeStats,
getChartData,
getChartColors
} from '../../../src/lib/stats'
} from '@/lib/stats'

const taskMap = new Map(Object.entries({
'task-1': {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/lib/string.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import stringHelpers from '../../../src/lib/string'
import stringHelpers from '@/lib/string'

describe('lib/string', () => {
it('generateNextName', () => {
Expand Down
4 changes: 1 addition & 3 deletions tests/unit/lib/video.spec.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
/* eslint-disable no-undef */

import {
formatFrame,
formatTime,
frameToSeconds,
roundToFrame
} from '../../../src/lib/video'
} from '@/lib/video'

describe('video', () => {
it('roundToFrame', () => {
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/modals/buildfiltermodal.spec.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-disable no-undef */

import { shallowMount, createLocalVue } from '@vue/test-utils'
import Vuex from 'vuex'
import VueRouter from 'vue-router'

import i18n from '../../../src/lib/i18n'
import BuildFilterModal from '../../../src/components/modals/BuildFilterModal'
import productionStoreFixture from '../fixtures/production-store.js'
import i18n from '@/lib/i18n'

import BuildFilterModal from '@/components/modals/BuildFilterModal.vue'

import productionStoreFixture from '../fixtures/production-store'

const localVue = createLocalVue()
localVue.use(Vuex)
Expand Down
11 changes: 7 additions & 4 deletions tests/unit/modals/shothistorymodal.spec.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import Vue from 'vue'
import { shallowMount, createLocalVue } from '@vue/test-utils'
import Vuex from 'vuex'
import i18n from '../../../src/lib/i18n'
import ShotHistoryModal from '../../../src/components/modals/ShotHistoryModal'
import TableInfo from '../../../src/components/widgets/TableInfo'
import peopleStoreFixture from '../fixtures/person-store.js'

import i18n from '@/lib/i18n'

import ShotHistoryModal from '@/components/modals/ShotHistoryModal.vue'
import TableInfo from '@/components/widgets/TableInfo.vue'

import peopleStoreFixture from '../fixtures/person-store'

const localVue = createLocalVue()
localVue.use(Vuex)
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/store/breakdown.spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { createLocalVue } from '@vue/test-utils'
import Vuex from 'vuex'

import store from '../../../src/store/modules/breakdown'
import breakdownApi from '../../../src/store/api/breakdown'
import store from '@/store/modules/breakdown'
import breakdownApi from '@/store/api/breakdown'

breakdownApi.updateCasting = vi.fn()
breakdownApi.getSequenceCasting = vi.fn()
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/store/departments.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import store from '../../../src/store/modules/departments'
import store from '@/store/modules/departments'

const departments = [
{
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/store/news.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import store from '../../../src/store/modules/news'
import store from '@/store/modules/news'

const timezone = 'Europe/Paris'

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/store/productions.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import store from '../../../src/store/modules/productions'
import store from '@/store/modules/productions'

import productionApi from '../../../src/store/api/productions.js'
import productionApi from '@/store/api/productions.js'
import {
ADD_METADATA_DESCRIPTOR_END,
ADD_PRODUCTION,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/store/studios.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import store from '../../../src/store/modules/studios'
import store from '@/store/modules/studios'

const studios = [
{
Expand Down

0 comments on commit 495fd13

Please sign in to comment.