fix(editor): Remove isOwner from IUser interface (#8888)

This commit is contained in:
Csaba Tuncsik
2024-03-18 11:39:15 +01:00
committed by GitHub
parent 024be62693
commit 6955e8991c
24 changed files with 74 additions and 65 deletions

View File

@@ -2,6 +2,8 @@ import { render } from '@testing-library/vue';
import V1Banner from '../V1Banner.vue';
import { createPinia, setActivePinia } from 'pinia';
import { useUsersStore } from '@/stores/users.store';
import { ROLE } from '@/constants';
import type { IUser } from '@/Interface';
describe('V1 Banner', () => {
let pinia: ReturnType<typeof createPinia>;
@@ -22,8 +24,8 @@ describe('V1 Banner', () => {
it('should render banner with dismiss call if user is owner', () => {
vi.spyOn(usersStore, 'currentUser', 'get').mockReturnValue({
role: 'global:owner',
});
role: ROLE.Owner,
} as IUser);
const { container } = render(V1Banner);
expect(container).toMatchSnapshot();