Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 1 addition & 36 deletions reposilite-frontend/eslint-suppressions.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,4 @@
{
"src/components/access/LdapPanel.test.ts": {
"@typescript-eslint/no-unsafe-assignment": {
"count": 1
}
},
"src/components/access/PrincipalActionsMenu.test.ts": {
"@typescript-eslint/no-unsafe-assignment": {
"count": 1
}
},
"src/components/access/PrincipalDetail.test.ts": {
"@typescript-eslint/no-unsafe-assignment": {
"count": 1
}
},
"src/components/access/SsoProvidersPanel.test.ts": {
"@typescript-eslint/no-unsafe-assignment": {
"count": 1
}
},
"src/components/access/check/CheckPermissionView.test.ts": {
"@typescript-eslint/no-unsafe-assignment": {
"count": 1
}
},
"src/components/access/nodes/NodeEditor.test.ts": {
"@typescript-eslint/no-unsafe-assignment": {
"count": 4
}
},
"src/components/console/ConsoleView.test.ts": {
"@typescript-eslint/no-unsafe-assignment": {
"count": 3
}
},
"src/components/console/ConsoleView.vue": {
"vue/multiline-html-element-content-newline": {
"count": 2
Expand Down Expand Up @@ -124,4 +89,4 @@
"count": 1
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('LdapPanel', () => {
wrapper = mount(LdapPanel, {
attachTo: document.body,
global: { provide: { [configurationStoreKey]: store } }
})
}) as VueWrapper
await flushPromises()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ describe('PrincipalActionsMenu', () => {
props: { principal: ALICE, api, ...props },
attachTo: document.body,
global: realTransition ? { stubs: { transition: false } } : {}
})
}) as VueWrapper
await flushPromises()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe('PrincipalDetail', () => {

const mountDetail = async (props: { name: string; kind: 'USER' | 'MACHINE' }) => {
router = await makeRouter()
wrapper = mount(PrincipalDetail, { props, attachTo: document.body, global: { plugins: [router] } })
wrapper = mount(PrincipalDetail, { props, attachTo: document.body, global: { plugins: [router] } }) as VueWrapper
await flushPromises()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe('SsoProvidersPanel', () => {
let auth: { testOidcProvider: Mock }

const mountPanel = async () => {
wrapper = mount(SsoProvidersPanel, { attachTo: document.body })
wrapper = mount(SsoProvidersPanel, { attachTo: document.body }) as VueWrapper
await flushPromises()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('CheckPermissionView', () => {
})
await router.push(url)
await router.isReady()
wrapper = mount(CheckPermissionView, { attachTo: document.body, global: { plugins: [router] } })
wrapper = mount(CheckPermissionView, { attachTo: document.body, global: { plugins: [router] } }) as VueWrapper
await flushPromises()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('NodeEditor', () => {
// Attached, so that the submit button of the template form really submits it.
attachTo: document.body,
global: { stubs: { VueFinalModal: { template: '<div><slot /></div>' } } }
})
}) as VueWrapper
return wrapper
}

Expand Down Expand Up @@ -505,7 +505,7 @@ describe('NodeEditor', () => {
await showTree()

const leaves = wrapper.findAll('[data-test="tree-leaf"] [data-allowed]')
const states = Object.fromEntries(leaves.map(leaf => [leaf.attributes('data-node'), leaf.attributes('data-allowed')]))
const states = Object.fromEntries<string | undefined>(leaves.map((leaf): [string, string | undefined] => [leaf.attributes('data-node') ?? '', leaf.attributes('data-allowed')]))
expect(states).toEqual({
'ingot.admin.users': 'false',
'ingot.repository.releases.read': 'true'
Expand Down Expand Up @@ -917,7 +917,7 @@ describe('NodeEditor artifact nodes', () => {
...props,
'onUpdate:nodes': (value: unknown) => wrapper.setProps({ nodes: value })
}
})
}) as VueWrapper
return wrapper
}

Expand Down Expand Up @@ -1001,7 +1001,7 @@ describe('NodeEditor artifact templates', () => {
'onUpdate:nodes': (value: unknown) => wrapper.setProps({ nodes: value })
},
attachTo: document.body
})
}) as VueWrapper
return wrapper
}

Expand Down
10 changes: 5 additions & 5 deletions reposilite-frontend/src/components/console/ConsoleView.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ describe('ConsoleView', () => {
// Settles the hello before the test goes on: a server without protocol 1 has refused it by then, and the view has
// opened the event stream in its place.
const mountView = async () => {
const { default: ConsoleView } = await import('./ConsoleView.vue')
wrapper = mount(ConsoleView, { attachTo: document.body })
const { default: ConsoleView } = await import('./ConsoleView.vue') as { default: Component }
wrapper = mount(ConsoleView, { attachTo: document.body }) as VueWrapper
await flushPromises()
return wrapper
}
Expand Down Expand Up @@ -558,7 +558,7 @@ describe('ConsoleView', () => {
Object.defineProperty(panel, 'scrollTop', {
configurable: true,
get: () => position,
set: (value) => { position = value }
set: (value: number) => { position = value }
})
Object.defineProperty(panel, 'scrollHeight', { configurable: true, value: height })
Object.defineProperty(panel, 'clientHeight', { configurable: true, value: view })
Expand Down Expand Up @@ -731,8 +731,8 @@ describe('ConsoleView', () => {

describe('address', () => {
const mountWith = async (props: { level?: string; search?: string } = {}) => {
const { default: ConsoleView } = await import('./ConsoleView.vue')
wrapper = mount(ConsoleView, { props, attachTo: document.body })
const { default: ConsoleView } = await import('./ConsoleView.vue') as { default: Component }
wrapper = mount(ConsoleView, { props, attachTo: document.body }) as VueWrapper
return wrapper
}

Expand Down
Loading