fix(editor): Fix workflow history TS errors (#9433)
This commit is contained in:
@@ -138,7 +138,7 @@ const onItemMounted = ({
|
||||
<span>
|
||||
{{
|
||||
i18n.baseText('workflowHistory.limit', {
|
||||
interpolate: { evaluatedPruneTime: props.evaluatedPruneTime },
|
||||
interpolate: { evaluatedPruneTime: String(props.evaluatedPruneTime) },
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
|
||||
@@ -86,7 +86,7 @@ onMounted(() => {
|
||||
isActive: props.isActive,
|
||||
});
|
||||
isAuthorElementTruncated.value =
|
||||
authorElement.value?.scrollWidth > authorElement.value?.clientWidth;
|
||||
(authorElement.value?.scrollWidth ?? 0) > (authorElement.value?.clientWidth ?? 0);
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { vi } from 'vitest';
|
||||
import type { MockInstance } from 'vitest';
|
||||
import { createPinia, setActivePinia } from 'pinia';
|
||||
import { waitFor } from '@testing-library/vue';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
@@ -19,7 +20,7 @@ const actions: UserAction[] = actionTypes.map((value) => ({
|
||||
const renderComponent = createComponentRenderer(WorkflowHistoryContent);
|
||||
|
||||
let pinia: ReturnType<typeof createPinia>;
|
||||
let postMessageSpy: vi.SpyInstance;
|
||||
let postMessageSpy: MockInstance;
|
||||
|
||||
describe('WorkflowHistoryContent', () => {
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -31,7 +31,7 @@ let pinia: ReturnType<typeof createPinia>;
|
||||
|
||||
describe('WorkflowHistoryList', () => {
|
||||
beforeAll(() => {
|
||||
Element.prototype.scrollTo = vi.fn();
|
||||
Element.prototype.scrollTo = vi.fn(() => {});
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user