Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-09-21 12:39:13 +0300
committerJoas Schilling <coding@schilljs.com>2021-09-21 12:39:13 +0300
commitcff4b0aac0fd07fac810275558eb54fd8151c234 (patch)
treea8a1696796004dee06fbdb9e9c1a17948b4fd432 /src
parent6a00e05685908f35e924b80967c706e084ef07d8 (diff)
Fix remaining linting issues
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'src')
-rw-r--r--src/components/LeftSidebar/ConversationsList/Conversation.spec.js22
-rw-r--r--src/components/LeftSidebar/LeftSidebar.spec.js18
-rw-r--r--src/components/MessagesList/MessagesGroup/Message/Message.spec.js14
-rw-r--r--src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.spec.js4
-rw-r--r--src/components/MessagesList/MessagesList.spec.js2
-rw-r--r--src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.spec.js16
-rw-r--r--src/services/conversationsService.spec.js6
-rw-r--r--src/store/callViewStore.spec.js4
-rw-r--r--src/store/messagesStore.spec.js16
-rw-r--r--src/store/participantsStore.spec.js12
10 files changed, 57 insertions, 57 deletions
diff --git a/src/components/LeftSidebar/ConversationsList/Conversation.spec.js b/src/components/LeftSidebar/ConversationsList/Conversation.spec.js
index 7c52ed820..88f6d613b 100644
--- a/src/components/LeftSidebar/ConversationsList/Conversation.spec.js
+++ b/src/components/LeftSidebar/ConversationsList/Conversation.spec.js
@@ -97,9 +97,9 @@ describe('Conversation.vue', () => {
describe('displayed subtitle', () => {
/**
- * @param item
- * @param expectedText
- * @param isSearchResult
+ * @param {object} item Conversation data
+ * @param {string} expectedText Expected subtitle of the conversation item
+ * @param {boolean} isSearchResult Whether or not the item is a search result (has no … menu)
*/
function testConversationLabel(item, expectedText, isSearchResult = false) {
const wrapper = mount(Conversation, {
@@ -274,9 +274,9 @@ describe('Conversation.vue', () => {
describe('unread messages counter', () => {
/**
- * @param item
- * @param expectedCounterText
- * @param expectedHighlighted
+ * @param {object} item Conversation data
+ * @param {string} expectedCounterText The expected unread counter
+ * @param {boolean} expectedHighlighted Whether or not the unread counter is highlighted with primary color
*/
function testCounter(item, expectedCounterText, expectedHighlighted) {
const wrapper = mount(Conversation, {
@@ -342,8 +342,8 @@ describe('Conversation.vue', () => {
})
/**
- * @param wrapper
- * @param text
+ * @param {object} wrapper Parent element to search the text in
+ * @param {string} text Text to find within the wrapper
*/
function findActionButton(wrapper, text) {
const actionButtons = wrapper.findAllComponents(ActionButton)
@@ -357,7 +357,7 @@ describe('Conversation.vue', () => {
}
/**
- * @param actionName
+ * @param {string} actionName The name of the action to shallow
*/
function shallowMountAndGetAction(actionName) {
const wrapper = shallowMount(Conversation, {
@@ -404,8 +404,8 @@ describe('Conversation.vue', () => {
describe('notification level', () => {
/**
- * @param actionName
- * @param level
+ * @param {string} actionName The label of the notification level to select
+ * @param {number} level The notification level to select
*/
async function testSetNotificationLevel(actionName, level) {
const setNotificationLevelAction = jest.fn().mockResolvedValueOnce()
diff --git a/src/components/LeftSidebar/LeftSidebar.spec.js b/src/components/LeftSidebar/LeftSidebar.spec.js
index c9123c72f..976a552c1 100644
--- a/src/components/LeftSidebar/LeftSidebar.spec.js
+++ b/src/components/LeftSidebar/LeftSidebar.spec.js
@@ -279,10 +279,10 @@ describe('LeftSidebar.vue', () => {
})
/**
- * @param searchTerm
- * @param possibleResults
- * @param listedResults
- * @param loadStateSettingsOverride
+ * @param {string} searchTerm The search term to filter by
+ * @param {Array} possibleResults Result options returned by the APIs
+ * @param {Array} listedResults The displayed results
+ * @param {object} loadStateSettingsOverride Allows to override some properties
*/
async function testSearch(searchTerm, possibleResults, listedResults, loadStateSettingsOverride) {
searchPossibleConversations.mockResolvedValueOnce({
@@ -463,11 +463,11 @@ describe('LeftSidebar.vue', () => {
describe('not found caption', () => {
/**
- * @param searchTerm
- * @param possibleResults
- * @param listedResults
- * @param loadStateSettingsOverride
- * @param expectedCaption
+ * @param {string} searchTerm The search term to filter by
+ * @param {Array} possibleResults Result options returned by the APIs
+ * @param {Array} listedResults The displayed results
+ * @param {object} loadStateSettingsOverride Allows to override some properties
+ * @param {string} expectedCaption The caption of the "No results found" section
*/
async function testSearchNotFound(searchTerm, possibleResults, listedResults, loadStateSettingsOverride, expectedCaption) {
const wrapper = await testSearch(searchTerm, possibleResults, listedResults, loadStateSettingsOverride)
diff --git a/src/components/MessagesList/MessagesGroup/Message/Message.spec.js b/src/components/MessagesList/MessagesGroup/Message/Message.spec.js
index 39c54f4f2..372524cba 100644
--- a/src/components/MessagesList/MessagesGroup/Message/Message.spec.js
+++ b/src/components/MessagesList/MessagesGroup/Message/Message.spec.js
@@ -269,9 +269,9 @@ describe('Message.vue', () => {
describe('rich objects', () => {
/**
- * @param message
- * @param messageParameters
- * @param expectedRichParameters
+ * @param {object} message The rich-object-string message text
+ * @param {object} messageParameters The rich-object-string parameters
+ * @param {object} expectedRichParameters The expected Vue objects for the parameters
*/
function renderRichObject(message, messageParameters, expectedRichParameters) {
messageProps.message = message
@@ -673,7 +673,7 @@ describe('Message.vue', () => {
})
/**
- * @param visible
+ * @param {boolean} visible Whether or not the reply-private action is visible
*/
function testPrivateReplyActionVisible(visible) {
store = new Vuex.Store(testStoreConfig)
@@ -764,9 +764,9 @@ describe('Message.vue', () => {
})
/**
- * @param visible
- * @param mockDate
- * @param participantType
+ * @param {boolean} visible Whether or not the delete action is visible
+ * @param {Date} mockDate The message date (deletion only works within 6h)
+ * @param {number} participantType The participant type of the user
*/
function testDeleteMessageVisible(visible, mockDate, participantType = PARTICIPANT.TYPE.USER) {
store = new Vuex.Store(testStoreConfig)
diff --git a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.spec.js b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.spec.js
index cee2cb2ca..18545b726 100644
--- a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.spec.js
+++ b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.spec.js
@@ -58,7 +58,7 @@ describe('FilePreview.vue', () => {
})
/**
- * @param url
+ * @param {string} url Relative URL to parse (starting with / )
*/
function parseRelativeUrl(url) {
return new URL('https://localhost' + url)
@@ -431,7 +431,7 @@ describe('FilePreview.vue', () => {
})
/**
- * @param visible
+ * @param {boolean} visible Whether or not the play button is visible
*/
async function testPlayButtonVisible(visible) {
const wrapper = shallowMount(FilePreview, {
diff --git a/src/components/MessagesList/MessagesList.spec.js b/src/components/MessagesList/MessagesList.spec.js
index 22d6a3e53..516be51e3 100644
--- a/src/components/MessagesList/MessagesList.spec.js
+++ b/src/components/MessagesList/MessagesList.spec.js
@@ -287,7 +287,7 @@ describe('MessagesList.vue', () => {
})
/**
- * @param messages
+ * @param {Array} messages List of messages that should not be grouped
*/
function testNotGrouped(messages) {
messagesListMock.mockReturnValue(messages)
diff --git a/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.spec.js b/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.spec.js
index f05ba8bf4..4da008251 100644
--- a/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.spec.js
+++ b/src/components/RightSidebar/Participants/ParticipantsList/Participant/Participant.spec.js
@@ -23,8 +23,8 @@ describe('Participant.vue', () => {
let tooltipMock
/**
- * @param wrapper
- * @param htmlEl
+ * @param {object} wrapper Wrapper where the tooltip is mounted in
+ * @param {HTMLElement} htmlEl Tooltip to find
*/
async function getLastTooltipValue(wrapper, htmlEl) {
tooltipMock.mockClear()
@@ -81,8 +81,8 @@ describe('Participant.vue', () => {
})
/**
- * @param participant
- * @param showUserStatus
+ * @param {object} participant Participant with optional user status data
+ * @param {boolean} showUserStatus Whether or not the user status should be shown
*/
function mountParticipant(participant, showUserStatus = false) {
return shallowMount(Participant, {
@@ -182,7 +182,7 @@ describe('Participant.vue', () => {
describe('user name', () => {
/**
- * @param wrapper
+ * @param {object} wrapper Wrapper where the tooltip is mounted in
*/
async function getUserTooltip(wrapper) {
const tooltipEl = wrapper.find('.participant-row__user-name').element
@@ -232,7 +232,7 @@ describe('Participant.vue', () => {
describe('user status', () => {
/**
- * @param wrapper
+ * @param {object} wrapper Wrapper where the tooltip is mounted in
*/
async function getStatusTooltip(wrapper) {
const tooltipEl = wrapper.find('.participant-row__status>span').element
@@ -273,7 +273,7 @@ describe('Participant.vue', () => {
let getParticipantRaisedHandMock
/**
- * @param wrapper
+ * @param {object} wrapper Wrapper where the tooltip is mounted in
*/
async function getCallIconTooltip(wrapper) {
const tooltipEl = wrapper.find('.participant-row__callstate-icon').element
@@ -607,7 +607,7 @@ describe('Participant.vue', () => {
})
/**
- * @param buttonText
+ * @param {string} buttonText Label of the remove action to find
*/
async function testCanRemove(buttonText = 'Remove participant') {
const wrapper = mountParticipant(participant)
diff --git a/src/services/conversationsService.spec.js b/src/services/conversationsService.spec.js
index ffea8cccb..843ce185c 100644
--- a/src/services/conversationsService.spec.js
+++ b/src/services/conversationsService.spec.js
@@ -10,9 +10,9 @@ describe('conversationsService', () => {
})
/**
- * @param token
- * @param onlyUsers
- * @param expectedShareTypes
+ * @param {string} token The conversation to search in
+ * @param {boolean} onlyUsers Whether or not to only search for users
+ * @param {Array} expectedShareTypes The expected search types to look for
*/
function testSearchPossibleConversations(token, onlyUsers, expectedShareTypes) {
searchPossibleConversations(
diff --git a/src/store/callViewStore.spec.js b/src/store/callViewStore.spec.js
index c787e865d..3158c9f01 100644
--- a/src/store/callViewStore.spec.js
+++ b/src/store/callViewStore.spec.js
@@ -115,8 +115,8 @@ describe('callViewStore', () => {
})
/**
- * @param conversationType
- * @param state
+ * @param {number} conversationType The type of the conversation
+ * @param {boolean} state Whether or not the grid is shown
*/
function testDefaultGridState(conversationType, state) {
localStorage.getItem.mockReturnValueOnce(null)
diff --git a/src/store/messagesStore.spec.js b/src/store/messagesStore.spec.js
index 8d416fb30..2db08b0c9 100644
--- a/src/store/messagesStore.spec.js
+++ b/src/store/messagesStore.spec.js
@@ -1062,8 +1062,8 @@ describe('messagesStore', () => {
})
/**
- * @param messages
- * @param expectedPayload
+ * @param {Array} messages List of messages the API call returned
+ * @param {object} expectedPayload The parameters that should be updated when receiving the messages
*/
async function testUpdateMessageCounters(messages, expectedPayload) {
const response = {
@@ -1203,8 +1203,8 @@ describe('messagesStore', () => {
})
/**
- * @param messageParameters
- * @param expectedValue
+ * @param {object} messageParameters The rich-object-string parameters of the message
+ * @param {boolean} expectedValue New state of the mention flag
*/
async function testMentionFlag(messageParameters, expectedValue) {
const messages = [{
@@ -1486,8 +1486,8 @@ describe('messagesStore', () => {
})
/**
- * @param statusCode
- * @param reasonCode
+ * @param {number} statusCode Return code of the API request
+ * @param {string} reasonCode The reason for the return code
*/
async function testMarkMessageErrors(statusCode, reasonCode) {
const temporaryMessage = {
@@ -1597,8 +1597,8 @@ describe('messagesStore', () => {
describe('hasMoreMessagesToLoad', () => {
/**
- * @param lastKnownMessageId
- * @param lastConversationMessageId
+ * @param {number} lastKnownMessageId The last known/loaded message id
+ * @param {number} lastConversationMessageId The last message id of the conversation
*/
function setupWithValues(lastKnownMessageId, lastConversationMessageId) {
store.dispatch('setLastKnownMessageId', { token: TOKEN, id: 123 })
diff --git a/src/store/participantsStore.spec.js b/src/store/participantsStore.spec.js
index 67463ed34..9a7fab4b5 100644
--- a/src/store/participantsStore.spec.js
+++ b/src/store/participantsStore.spec.js
@@ -210,8 +210,8 @@ describe('participantsStore', () => {
})
/**
- * @param participantType
- * @param expectedParticipantType
+ * @param {number} participantType Participant type before the action
+ * @param {number} expectedParticipantType Expected participant type after the action
*/
async function testPromoteModerator(participantType, expectedParticipantType) {
promoteToModerator.mockResolvedValue()
@@ -257,8 +257,8 @@ describe('participantsStore', () => {
})
/**
- * @param participantType
- * @param expectedParticipantType
+ * @param {number} participantType Participant type before the action
+ * @param {number} expectedParticipantType Expected participant type after the action
*/
async function testDemoteModerator(participantType, expectedParticipantType) {
promoteToModerator.mockResolvedValue()
@@ -569,8 +569,8 @@ describe('participantsStore', () => {
})
/**
- * @param lastPingAge
- * @param inCall
+ * @param {number} lastPingAge The unix timestamp of the last ping of the participant
+ * @param {number} inCall The in_call flag of the participant
*/
function prepareTestJoinWithMaxPingAge(lastPingAge, inCall) {
const mockDate = new Date('2020-01-01 20:00:00')