Skip to content

Commit

Permalink
fix(editor): Fix unit test and lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cstuncsik committed Sep 12, 2024
1 parent 2804e91 commit a5f2a3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/editor-ui/src/stores/projects.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export const useProjectsStore = defineStore(STORES.PROJECTS, () => {
const globalProjectPermissions = computed(
() => getResourcePermissions(usersStore.currentUser?.globalScopes).project,
);
const availableProjects = computed(() => globalProjectPermissions.value.list ? projects.value : myProjects.value);
const availableProjects = computed(() =>
globalProjectPermissions.value.list ? projects.value : myProjects.value,
);

const currentProjectId = computed(
() =>
Expand Down
2 changes: 1 addition & 1 deletion packages/editor-ui/src/views/ProjectSettings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('ProjectSettings', () => {

vi.spyOn(usersStore, 'fetchUsers').mockImplementation(async () => await Promise.resolve());
vi.spyOn(projectsStore, 'getAvailableProjects').mockImplementation(async () => {});
vi.spyOn(projectsStore, 'projects', 'get').mockReturnValue(projects);
vi.spyOn(projectsStore, 'availableProjects', 'get').mockReturnValue(projects);
vi.spyOn(settingsStore, 'settings', 'get').mockReturnValue({
enterprise: {
projects: {
Expand Down

0 comments on commit a5f2a3b

Please sign in to comment.