Skip to content

Commit

Permalink
fixup! fix(vtu): skip tests for @netxcloud/dialogs and @nextcloud/upload
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed May 27, 2024
1 parent f9b5b27 commit 3abfb3f
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import { CONVERSATION, PARTICIPANT, ATTENDEE } from '../../../constants.js'
import { leaveConversation } from '../../../services/participantsService.js'
import storeConfig from '../../../store/storeConfig.js'
import { findNcActionButton } from '../../../test-helpers.js'

/*
jest.mock('@nextcloud/dialogs', () => ({
showSuccess: jest.fn(),
showError: jest.fn(),
}))

*/
jest.mock('../../../services/participantsService', () => ({
leaveConversation: jest.fn(),
}))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jest.mock('../../../../../services/reactionsService', () => ({
addReactionToMessage: jest.fn(),
removeReactionFromMessage: jest.fn(),
}))

/*
jest.mock('@nextcloud/dialogs', () => ({
showError: jest.fn(),
}))

*/
describe('Reactions.vue', () => {
let reactionsStore
let token
Expand Down
3 changes: 2 additions & 1 deletion src/store/fileUploadStore.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ jest.mock('../services/filesSharingServices', () => ({
jest.mock('../services/settingsService', () => ({
setAttachmentFolder: jest.fn(),
}))
/*
jest.mock('@nextcloud/dialogs', () => ({
showError: jest.fn(),
}))

*/
describe('fileUploadStore', () => {
let storeConfig = null
let store = null
Expand Down
3 changes: 2 additions & 1 deletion src/store/messagesStore.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ jest.mock('../services/conversationsService', () => ({
}))

jest.mock('../utils/cancelableRequest')
/*
jest.mock('@nextcloud/dialogs', () => ({
showError: jest.fn(),
}))

*/
// Test actions with 'chat-read-last' feature
jest.mock('@nextcloud/capabilities', () => ({
getCapabilities: jest.fn(() => ({
Expand Down
4 changes: 2 additions & 2 deletions src/stores/__tests__/reactions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jest.mock('../../services/reactionsService', () => ({
addReactionToMessage: jest.fn(),
removeReactionFromMessage: jest.fn(),
}))

/*
jest.mock('@nextcloud/dialogs', () => ({
showSuccess: jest.fn(),
showError: jest.fn(),
}))

*/
describe('reactionsStore', () => {
let reactionsStore
let token
Expand Down
3 changes: 2 additions & 1 deletion src/stores/__tests__/talkHash.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ import { createPinia, setActivePinia } from 'pinia'

import { useTalkHashStore } from '../talkHash.js'

/*
jest.mock('@nextcloud/dialogs', () => ({
showError: jest.fn(),
}))

*/
describe('talkHashStore', () => {
let talkHashStore
let restoreConsole
Expand Down
4 changes: 2 additions & 2 deletions src/test-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ jest.mock('@nextcloud/initial-state', () => ({
return fallback
}),
}))

/*
jest.mock('@nextcloud/upload', () => ({
getUploader: jest.fn(),
}))

*/
window.IntersectionObserver = jest.fn(() => ({
observe: jest.fn(),
unobserve: jest.fn(),
Expand Down
4 changes: 2 additions & 2 deletions src/utils/__tests__/handleUrl.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import {
generateFullConversationLink,
copyConversationLinkToClipboard,
} from '../handleUrl.ts'

/*
jest.mock('@nextcloud/dialogs', () => ({
showSuccess: jest.fn(),
showError: jest.fn(),
}))

*/
describe('handleUrl', () => {
describe('generateAbsoluteUrl', () => {
it('should generate url with IS_DESKTOP=false correctly', () => {
Expand Down

0 comments on commit 3abfb3f

Please sign in to comment.