fix linting, raise coverage

This commit is contained in:
Moriz Wahl 2023-02-14 17:17:17 +01:00
parent f8fca7ab0c
commit 3e894d36bd
4 changed files with 300 additions and 301 deletions

View File

@ -108,7 +108,6 @@
"automaticContributions": "Automatische Beiträge", "automaticContributions": "Automatische Beiträge",
"logout": "Abmelden", "logout": "Abmelden",
"my-account": "Mein Konto", "my-account": "Mein Konto",
"open_creation": "Offene Schöpfungen",
"statistic": "Statistik", "statistic": "Statistik",
"user_search": "Nutzersuche" "user_search": "Nutzersuche"
}, },

View File

@ -108,7 +108,6 @@
"automaticContributions": "Automatic Contributions", "automaticContributions": "Automatic Contributions",
"logout": "Logout", "logout": "Logout",
"my-account": "My Account", "my-account": "My Account",
"open_creation": "Open creations",
"statistic": "Statistic", "statistic": "Statistic",
"user_search": "User search" "user_search": "User search"
}, },

View File

@ -5,7 +5,7 @@ import { toastErrorSpy } from '../../test/testSetup'
const localVue = global.localVue const localVue = global.localVue
const apolloQueryMock = jest.fn().mockResolvedValueOnce({ const apolloQueryMock = jest.fn().mockResolvedValue({
data: { data: {
listContributionLinks: { listContributionLinks: {
links: [ links: [
@ -47,6 +47,7 @@ describe('ContributionLinks', () => {
beforeEach(() => { beforeEach(() => {
wrapper = Wrapper() wrapper = Wrapper()
}) })
describe('apollo returns', () => { describe('apollo returns', () => {
it('calls listContributionLinks', () => { it('calls listContributionLinks', () => {
expect(apolloQueryMock).toBeCalledWith( expect(apolloQueryMock).toBeCalledWith(
@ -57,7 +58,7 @@ describe('ContributionLinks', () => {
}) })
}) })
describe.skip('query transaction with error', () => { describe('query transaction with error', () => {
beforeEach(() => { beforeEach(() => {
apolloQueryMock.mockRejectedValue({ message: 'OUCH!' }) apolloQueryMock.mockRejectedValue({ message: 'OUCH!' })
wrapper = Wrapper() wrapper = Wrapper()

View File

@ -71,22 +71,22 @@
</div> </div>
</template> </template>
<script> <script>
import Overlay from '../components/Overlay.vue' import Overlay from '../components/Overlay.vue'
import OpenCreationsTable from '../components/Tables/OpenCreationsTable.vue' import OpenCreationsTable from '../components/Tables/OpenCreationsTable.vue'
import { listAllContributions } from '../graphql/listAllContributions' import { listAllContributions } from '../graphql/listAllContributions'
import { adminDeleteContribution } from '../graphql/adminDeleteContribution' import { adminDeleteContribution } from '../graphql/adminDeleteContribution'
import { confirmContribution } from '../graphql/confirmContribution' import { confirmContribution } from '../graphql/confirmContribution'
import { denyContribution } from '../graphql/denyContribution' import { denyContribution } from '../graphql/denyContribution'
const FILTER_TAB_MAP = [ const FILTER_TAB_MAP = [
['IN_PROGRESS', 'PENDING'], ['IN_PROGRESS', 'PENDING'],
['CONFIRMED'], ['CONFIRMED'],
['DENIED'], ['DENIED'],
['DELETED'], ['DELETED'],
['IN_PROGRESS', 'PENDING', 'CONFIRMED', 'DENIED', 'DELETED'], ['IN_PROGRESS', 'PENDING', 'CONFIRMED', 'DENIED', 'DELETED'],
] ]
export default { export default {
name: 'CreationConfirm', name: 'CreationConfirm',
components: { components: {
OpenCreationsTable, OpenCreationsTable,
@ -369,7 +369,7 @@
}, },
}, },
}, },
} }
</script> </script>
<style> <style>
#overlay { #overlay {